Browse Source

Reorganized building documentation.

Lasse Öörni 12 years ago
parent
commit
31ef2dea57
2 changed files with 81 additions and 39 deletions
  1. 26 6
      Docs/GettingStarted.dox
  2. 55 33
      Readme.txt

+ 26 - 6
Docs/GettingStarted.dox

@@ -32,18 +32,17 @@ SSE requirement can be eliminated by commenting out lines that enable it from th
 
 
 Urho3D uses CMake (http://www.cmake.org) to build. The process has two steps:
 Urho3D uses CMake (http://www.cmake.org) to build. The process has two steps:
 
 
--# 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:\n
+-# Run CMake in the root directory with your preferred toolchain specified to generate the build files. You can use the provided batch files or shell scripts:\n
 cmake_vs2008.bat, cmake_vs2010.bat or cmake_vs2012.bat on Windows,\n
 cmake_vs2008.bat, cmake_vs2010.bat or cmake_vs2012.bat on Windows,\n
 cmake_eclipse.sh on Linux,\n
 cmake_eclipse.sh on Linux,\n
 cmake_macosx.sh on Mac OS X, and\n
 cmake_macosx.sh on Mac OS X, and\n
 cmake_gcc.sh on both Linux and Mac OS X.
 cmake_gcc.sh on both Linux and Mac OS X.
--# For Visual Studio, open Urho3D.sln and build the configuration(s) you like. When compiling as 64bit, you currently have to manually set the assembly source files (in AngelScript and LibCpuId projects) to compile using MASM. This is a CMake bug.\n
-On Windows, using other compilers than Visual Studio is not officially 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 package: http://www.libsdl.org/extras/win32/common/directx-devel.tar.gz.\n
+-# For Visual Studio, open Urho3D.sln and build the configuration(s) you like.\n
 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.\n
 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.\n
 For GCC, execute make (by default, cmake_gcc.sh specifies to make a RelWithDebInfo build).\n
 For GCC, execute make (by default, cmake_gcc.sh specifies to make a RelWithDebInfo build).\n
 For Xcode on Mac OS X, open Urho3D.xcodeproj and 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.
+On Windows, using other compilers than Visual Studio is not officially 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 package: http://www.libsdl.org/extras/win32/common/directx-devel.tar.gz.\n
 
 
 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.
 
 
@@ -53,8 +52,6 @@ To run from Eclipse on Linux, locate and select the Urho3D executable in the Pro
 
 
 To run from Xcode on Mac OS X, edit the Product Scheme to set "Run" setting 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 the argument entries that you want to be active.
 To run from Xcode on Mac OS X, edit the Product Scheme to set "Run" setting 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 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.
-
 \section Building_Android Android build process
 \section Building_Android Android build process
 
 
 First copy Bin/Data and Bin/CoreData directories to the Android/assets directory (you can use the provided batch file CopyData.bat.) Next, execute the following commands in the Android directory:
 First copy Bin/Data and Bin/CoreData directories to the Android/assets directory (you can use the provided batch file CopyData.bat.) Next, execute the following commands in the Android directory:
@@ -83,6 +80,29 @@ The Urho3D target will actually build the application bundle and copy resources
 
 
 To run from Xcode on iPhone/iPad Simulator, edit the Product Scheme to set "Run" destination setting to "iPhone Simulator" or "iPad Simulator", and executable to "Urho3D.app".
 To run from Xcode on iPhone/iPad Simulator, edit the Product Scheme to set "Run" destination setting to "iPhone Simulator" or "iPad Simulator", and executable to "Urho3D.app".
 
 
+\section Building_64bit 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.
+
+\section Building_Shaders 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:
+
+\verbatim
+#if (NOT MSVC)
+    set (USE_OPENGL 1)
+    add_definitions (-DUSE_OPENGL)
+#endif ()
+\endverbatim
+
+OpenGL does not need a separate shader compilation step or utility.
+
 
 
 \page Running Running Urho3D
 \page Running Running Urho3D
 
 

+ 55 - 33
Readme.txt

@@ -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
 -------
 -------