|
@@ -140,40 +140,33 @@ On desktop systems Urho3D uses CMake (http://www.cmake.org) to build. The
|
|
|
process has two steps:
|
|
process has two steps:
|
|
|
|
|
|
|
|
1) Run CMake in the root directory with your preferred toolchain specified to
|
|
1) Run CMake in the root directory with your preferred toolchain specified to
|
|
|
-generate the build files. You can use the batch files or shell scripts provided:
|
|
|
|
|
-cmake_vs2008.bat, cmake_vs2010.bat or cmake_vs2012.bat on Windows,
|
|
|
|
|
-cmake_eclipse.sh on Linux,
|
|
|
|
|
-cmake_macosx.sh on Mac OS X, and
|
|
|
|
|
-cmake_gcc.sh on both Linux and Mac OS X.
|
|
|
|
|
|
|
+ generate the build files. You can use the provided batch files or shell
|
|
|
|
|
+ scripts:
|
|
|
|
|
+
|
|
|
|
|
+ cmake_vs2008.bat, cmake_vs2010.bat or cmake_vs2012.bat on Windows,
|
|
|
|
|
+ cmake_eclipse.sh on Linux,
|
|
|
|
|
+ cmake_macosx.sh on Mac OS X, and
|
|
|
|
|
+ cmake_gcc.sh on both Linux and Mac OS X.
|
|
|
|
|
|
|
|
2) For Visual Studio, open Urho3D.sln and build the configuration(s) you like.
|
|
2) For Visual Studio, open Urho3D.sln and build the configuration(s) you like.
|
|
|
-When compiling as 64bit on Visual Studio, you currently have to manually set
|
|
|
|
|
-the assembly source files (in AngelScript and LibCpuId projects) to compile
|
|
|
|
|
-using MASM. This is a CMake bug.
|
|
|
|
|
|
|
+
|
|
|
|
|
+ For Eclipse on Linux, import the Eclipse's project(s) generated by CMake into
|
|
|
|
|
+ the workspace. The Eclipse's projects are generated in "Urho3D-Eclipse-build"
|
|
|
|
|
+ sub-directory sibling to Urho3D project directory. See "Importing existing
|
|
|
|
|
+ projects" in Eclipse Help for detail steps. Select "Build All" or "Build
|
|
|
|
|
+ Project" in the menu. Note that Eclipse requires CDT plugin to build C/C++
|
|
|
|
|
+ projects.
|
|
|
|
|
+
|
|
|
|
|
+ For GCC, execute make (by default, cmake_gcc.sh specifies to make a
|
|
|
|
|
+ RelWithDebInfo build).
|
|
|
|
|
+
|
|
|
|
|
+ For Xcode on Mac OS X, open Urho3D.xcodeproj and build.
|
|
|
|
|
|
|
|
On Windows, using other compilers than Visual Studio is not officially
|
|
On Windows, using other compilers than Visual Studio is not officially
|
|
|
supported. MinGW may work (cmake -G "MinGW Makefiles"), but may lack required
|
|
supported. MinGW may work (cmake -G "MinGW Makefiles"), but may lack required
|
|
|
DirectX headers. They can be copied to a MinGW installation from the following
|
|
DirectX headers. They can be copied to a MinGW installation from the following
|
|
|
package: http://www.libsdl.org/extras/win32/common/directx-devel.tar.gz
|
|
package: http://www.libsdl.org/extras/win32/common/directx-devel.tar.gz
|
|
|
|
|
|
|
|
-For Eclipse on Linux, import the Eclipse's project(s) generated by CMake into
|
|
|
|
|
-the workspace. The Eclipse's projects are generated in "Urho3D-Eclipse-build"
|
|
|
|
|
-sub-directory sibling to Urho3D project directory.
|
|
|
|
|
-See "Importing existing projects" in Eclipse Help for detail steps. Select
|
|
|
|
|
-"Build All" or "Build Project" in the menu. Note that Eclipse requires CDT
|
|
|
|
|
-plugin to build C/C++ project.
|
|
|
|
|
-
|
|
|
|
|
-For GCC, execute make (by default, cmake_gcc.sh specifies to make a
|
|
|
|
|
-RelWithDebInfo build).
|
|
|
|
|
-
|
|
|
|
|
-For Xcode on Mac OS X, open Urho3D.xcodeproj and build.
|
|
|
|
|
-
|
|
|
|
|
-Currently CMake build configuration has been set to compile Urho3D as 32bit by
|
|
|
|
|
-default for non-MSVC/non-Windows platform. To enable 64bit build, pass the
|
|
|
|
|
-option "-DENABLE_64BIT=1" explicitly when invoking cmake_eclipse.sh/
|
|
|
|
|
-cmake_macosx.sh/cmake_gcc.sh. Alternatively, you can modify the main CMakeLists.txt
|
|
|
|
|
-to enable 64bit by default for non-MSVC/non-Windows platform.
|
|
|
|
|
-
|
|
|
|
|
After the build is complete, the programs can be run from the Bin directory.
|
|
After the build is complete, the programs can be run from the Bin directory.
|
|
|
|
|
|
|
|
To run from the Visual Studio debugger, set the Urho3D project as the startup
|
|
To run from the Visual Studio debugger, set the Urho3D project as the startup
|
|
@@ -187,9 +180,6 @@ To actually make Urho3D.exe do something useful, it must be supplied with the
|
|
|
name of the script file it should load and run. You can try for example the
|
|
name of the script file it should load and run. You can try for example the
|
|
|
following arguments: Scripts/NinjaSnowWar.as -w
|
|
following arguments: Scripts/NinjaSnowWar.as -w
|
|
|
|
|
|
|
|
-To make the Urho3D examples start faster on Windows & Direct3D9 mode, run
|
|
|
|
|
-CompileAllShaders.bat from the Bin directory first.
|
|
|
|
|
-
|
|
|
|
|
To run from Eclipse on Linux, locate and select the Urho3D executable in the
|
|
To run from Eclipse on Linux, locate and select the Urho3D executable in the
|
|
|
Project Explorer. From the menu, choose "Run Configurations" to create a new
|
|
Project Explorer. From the menu, choose "Run Configurations" to create a new
|
|
|
launch configuration for "C/C++ Application". Switch to "Arguments" tab, specify
|
|
launch configuration for "C/C++ Application". Switch to "Arguments" tab, specify
|
|
@@ -200,10 +190,6 @@ to execute "Urho3D" in the "Info" tab. In the "Arguments" tab, specify the
|
|
|
arguments required by Urho3D executable. Ensure the check boxes are ticked on
|
|
arguments required by Urho3D executable. Ensure the check boxes are ticked on
|
|
|
the argument entries that you want to be active.
|
|
the argument entries that you want to be active.
|
|
|
|
|
|
|
|
-When building with the Windows 8 SDK, copy d3dcompiler_46.dll from
|
|
|
|
|
-C:/Program Files (x86)/Windows Kits/8.0/bin/x86 to Urho3D Bin directory before
|
|
|
|
|
-running.
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
Android build process
|
|
Android build process
|
|
|
---------------------
|
|
---------------------
|
|
@@ -253,6 +239,42 @@ destination setting to "iPhone Simulator" or "iPad Simulator", and executable
|
|
|
to "Urho3D.app".
|
|
to "Urho3D.app".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+Desktop 64bit build
|
|
|
|
|
+-------------------
|
|
|
|
|
+
|
|
|
|
|
+To enable 64bit build for Visual Studio, run CMake using a 64bit solution
|
|
|
|
|
+generator, for example cmake -G "Visual Studio 9 2008 Win64". You will have to
|
|
|
|
|
+manually set the assembly source files (in AngelScript and LibCpuId projects)
|
|
|
|
|
+to compile using MASM. This is a CMake bug.
|
|
|
|
|
+
|
|
|
|
|
+Currently CMake build configuration has been set to compile Urho3D as 32bit by
|
|
|
|
|
+default for non-MSVC/non-Windows platform. To enable 64bit build, pass the
|
|
|
|
|
+option "-DENABLE_64BIT=1" explicitly when invoking cmake_eclipse.sh/
|
|
|
|
|
+cmake_macosx.sh/cmake_gcc.sh. Alternatively, you can modify the main
|
|
|
|
|
+CMakeLists.txt to enable 64bit by default for non-MSVC/non-Windows platform.
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+Compiling Direct3D shaders
|
|
|
|
|
+--------------------------
|
|
|
|
|
+
|
|
|
|
|
+When building with the Windows 8 SDK, copy d3dcompiler_46.dll from
|
|
|
|
|
+C:/Program Files (x86)/Windows Kits/8.0/bin/x86 to Urho3D Bin directory so that
|
|
|
|
|
+the ShaderCompiler program will run correctly.
|
|
|
|
|
+
|
|
|
|
|
+To make the Urho3D examples start faster on Windows & Direct3D9 mode, run
|
|
|
|
|
+CompileAllShaders.bat from the Bin directory first.
|
|
|
|
|
+
|
|
|
|
|
+Note that you can also enable OpenGL build on Visual Studio by modifying a
|
|
|
|
|
+section in the root CMakeLists.txt to read as follows:
|
|
|
|
|
+
|
|
|
|
|
+#if (NOT MSVC)
|
|
|
|
|
+ set (USE_OPENGL 1)
|
|
|
|
|
+ add_definitions (-DUSE_OPENGL)
|
|
|
|
|
+#endif ()
|
|
|
|
|
+
|
|
|
|
|
+OpenGL does not need a separate shader compilation step or utility.
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
History
|
|
History
|
|
|
-------
|
|
-------
|
|
|
|
|
|