Browse Source

Applied patch from Ali Kämäräinen. VS2013 support, ifexists checks when deleting old VS build files, and improved Tundra import.

Lasse Öörni 12 years ago
parent
commit
3c60b5f2d0
7 changed files with 52 additions and 23 deletions
  1. 4 4
      Bin/Data/Scripts/Editor/EditorImport.as
  2. 1 0
      Docs/Urho3D.dox
  3. 1 0
      Readme.txt
  4. 21 1
      cmake_vs2008.bat
  5. 1 1
      cmake_vs2010.bat
  6. 1 17
      cmake_vs2012.bat
  7. 23 0
      cmake_vs2013.bat

+ 4 - 4
Bin/Data/Scripts/Editor/EditorImport.as

@@ -199,7 +199,7 @@ void ImportTundraScene(const String&in fileName)
         {
             String compType = compElem.GetAttribute("type");
 
-            if (compType == "EC_Mesh")
+            if (compType == "EC_Mesh" || compType == "Mesh")
             {
                 Array<String> coords = GetComponentAttribute(compElem, "Transform").Split(',');
                 meshPos = GetVector3FromStrings(coords, 0);
@@ -214,9 +214,9 @@ void ImportTundraScene(const String&in fileName)
                 for (uint i = 0; i < materialNames.length; ++i)
                     ProcessRef(materialNames[i]);
             }
-            if (compType == "EC_Name")
+            if (compType == "EC_Name" || compType == "Name")
                 nodeName = GetComponentAttribute(compElem, "name");
-            if (compType == "EC_Placeable")
+            if (compType == "EC_Placeable" || compType == "Placeable")
             {
                 Array<String> coords = GetComponentAttribute(compElem, "Transform").Split(',');
                 pos = GetVector3FromStrings(coords, 0);
@@ -225,7 +225,7 @@ void ImportTundraScene(const String&in fileName)
                 scale = GetVector3FromStrings(coords, 6);
                 parentName = GetComponentAttribute(compElem, "Parent entity ref");
             }
-            if (compType == "EC_RigidBody")
+            if (compType == "EC_RigidBody" || compType == "RigidBody")
             {
                 shapeType = GetComponentAttribute(compElem, "Shape type").ToInt();
                 mass = GetComponentAttribute(compElem, "Mass").ToFloat();

+ 1 - 0
Docs/Urho3D.dox

@@ -59,6 +59,7 @@ Urho3D development, contributions and bugfixes by:
 - Chris Friesen
 - Alex Fuller
 - Mika Heinonen
+- Ali K&auml;m&auml;r&auml;inen
 - Jason Kinzer
 - Pete Leigh
 - Paul Noome

+ 1 - 0
Readme.txt

@@ -20,6 +20,7 @@ Urho3D development, contributions and bugfixes by:
 - Chris Friesen
 - Alex Fuller
 - Mika Heinonen
+- Ali Kämäräinen
 - Jason Kinzer
 - Pete Leigh
 - Paul Noome

+ 21 - 1
cmake_vs2008.bat

@@ -20,4 +20,24 @@
 :: THE SOFTWARE.
 ::
 
-@cmake_vs2012.bat -DVERSION="9 2008" %*
+@echo off
+cmake -E make_directory Build
+if exist Build\CMakeCache.txt. del /F Build\CMakeCache.txt
+if exist Source\CMakeCache.txt. del /F Source\CMakeCache.txt
+if exist CMakeCache.txt del /F CMakeCache.txt
+if exist Build\CMakeFiles. rd /S /Q Build\CMakeFiles
+if exist Source\CMakeFiles. rd /S /Q Source\CMakeFiles
+if exist CMakeFiles. rd /S /Q CMakeFiles.
+set "arch="
+set "version=9 2008"
+:loop
+if not "%1" == "" (
+    if "%1" == "-DENABLE_64BIT" if "%~2" == "1" set "arch= Win64"
+    if "%1" == "-DVERSION" set "version=%~2"
+    shift
+    shift
+    goto loop
+)
+cmake -E copy_if_different Docs\Doxyfile.in Doxyfile
+echo on
+cmake -E chdir Build cmake -G "Visual Studio %version%%arch%" ..\Source %*

+ 1 - 1
cmake_vs2010.bat

@@ -20,4 +20,4 @@
 :: THE SOFTWARE.
 ::
 
-@cmake_vs2012.bat -DVERSION=10 %*
+@cmake_vs2008.bat -DVERSION=10 %*

+ 1 - 17
cmake_vs2012.bat

@@ -20,20 +20,4 @@
 :: THE SOFTWARE.
 ::
 
-@echo off
-cmake -E make_directory Build
-del /F Build\CMakeCache.txt Source\CMakeCache.txt CMakeCache.txt
-rd /S /Q Build\CMakeFiles Source\CMakeFiles CMakeFiles
-set "arch="
-set "version=11"
-:loop
-if not "%1" == "" (
-    if "%1" == "-DENABLE_64BIT" if "%~2" == "1" set "arch= Win64"
-    if "%1" == "-DVERSION" set "version=%~2"
-    shift
-    shift
-    goto loop
-)
-cmake -E copy_if_different Docs\Doxyfile.in Doxyfile
-echo on
-cmake -E chdir Build cmake -G "Visual Studio %version%%arch%" ..\Source %*
+@cmake_vs2008.bat -DVERSION=11 %*

+ 23 - 0
cmake_vs2013.bat

@@ -0,0 +1,23 @@
+::
+:: Copyright (c) 2008-2013 the Urho3D project.
+::
+:: Permission is hereby granted, free of charge, to any person obtaining a copy
+:: of this software and associated documentation files (the "Software"), to deal
+:: in the Software without restriction, including without limitation the rights
+:: to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+:: copies of the Software, and to permit persons to whom the Software is
+:: furnished to do so, subject to the following conditions:
+::
+:: The above copyright notice and this permission notice shall be included in
+:: all copies or substantial portions of the Software.
+::
+:: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+:: IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+:: FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+:: AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+:: LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+:: OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+:: THE SOFTWARE.
+::
+
+@cmake_vs2008.bat -DVERSION=12 %*