|
|
@@ -18,6 +18,8 @@ Although all required third-party libraries are included as source code, there a
|
|
|
|
|
|
- For Android, the Android SDK and Android NDK (minimum API level 12) need to be installed.
|
|
|
|
|
|
+- For Emscripten, the Emscripten SDK need to be installed.
|
|
|
+
|
|
|
To run Urho3D, the minimum system requirements are:
|
|
|
|
|
|
- Windows: CPU with SSE instructions support, Windows XP or newer, DirectX 9.0c, GPU with %Shader %Model 2 support (%Shader %Model 3 recommended.)
|
|
|
@@ -30,6 +32,8 @@ To run Urho3D, the minimum system requirements are:
|
|
|
|
|
|
- iOS: OpenGL ES 2.0 capable GPU.
|
|
|
|
|
|
+- Emscripten: modern browsers with fast JavaScript engine and HTML5 and WebGL support.
|
|
|
+
|
|
|
SSE requirement can be eliminated by disabling the use of SSE instruction set, see URHO3D_SSE build option below.
|
|
|
|
|
|
CMake is required to configure and generate the Urho3D project build tree. The minimum required version is 2.8.6. However, it is recommended to use the latest CMake version avaiable out there, especially when targeting Mac OS X and iOS platforms using the latest Xcode version available. This is because Apple is known to change the internal working of Xcode with little regards to other third party build tools, such as CMake.
|
|
|
@@ -66,12 +70,12 @@ A number of build options can be defined when invoking the build scripts or when
|
|
|
|WIN32 |0|Configure project using MinGW cross-compiler toolchain (cmake_generic.sh only); also applicable when cross-compiling 64-bit Windows platform|
|
|
|
|IOS |0|Configure project for targeting iOS platform (cmake_generic.sh and cmake-gui only)|
|
|
|
|URHO3D_64BIT |*|Enable 64bit build, on MSVC default to 0, on other compilers the default is set based on the 64-bit capability of the chosen toolchain on host system|
|
|
|
-|URHO3D_ANGELSCRIPT |1|Enable AngelScript scripting support (non Emscripten only)|
|
|
|
-|URHO3D_LUA |0|Enable Lua scripting support (non Emscripten only)|
|
|
|
-|URHO3D_LUAJIT |0|Enable Lua scripting support using LuaJIT (check LuaJIT's CMakeLists.txt for more options) (non Emscripten only)|
|
|
|
+|URHO3D_ANGELSCRIPT |1|Enable AngelScript scripting support|
|
|
|
+|URHO3D_LUA |0|Enable Lua scripting support|
|
|
|
+|URHO3D_LUAJIT |0|Enable Lua scripting support using LuaJIT (check LuaJIT's CMakeLists.txt for more options)|
|
|
|
|URHO3D_LUAJIT_AMALG |0|Enable LuaJIT amalgamated build (LuaJIT only)|
|
|
|
|URHO3D_SAFE_LUA |0|Enable Lua C++ wrapper safety checks (Lua/LuaJIT only)|
|
|
|
-|URHO3D_NETWORK |1|Enable Networking support (non Emscripten only)|
|
|
|
+|URHO3D_NETWORK |1|Enable Networking support|
|
|
|
|URHO3D_PHYSICS |1|Enable Physics support|
|
|
|
|URHO3D_NAVIGATION |1|Enable Navigation support|
|
|
|
|URHO3D_URHO2D |1|Enable 2D rendering & physics support|
|
|
|
@@ -80,7 +84,7 @@ A number of build options can be defined when invoking the build scripts or when
|
|
|
|URHO3D_EXTRAS |0|Build extras (native and RPI only)|
|
|
|
|URHO3D_DOCS |0|Generate documentation as part of normal build (the 'doc' builtin target can be used to generate documentation regardless of this option's value)|
|
|
|
|URHO3D_DOCS_QUIET |0|Generate documentation as part of normal build, suppress generation process from sending anything to stdout|
|
|
|
-|URHO3D_SSE |1|Enable SSE instruction set (non Emscripten only)|
|
|
|
+|URHO3D_SSE |1|Enable SSE instruction set|
|
|
|
|URHO3D_MINIDUMPS |1|Enable minidumps on crash (VS only)|
|
|
|
|URHO3D_FILEWATCHER |1|Enable filewatcher support|
|
|
|
|URHO3D_PROFILING |1|Enable profiling support|
|
|
|
@@ -107,6 +111,8 @@ A number of build options can be defined when invoking the build scripts or when
|
|
|
|MINGW_SYSROOT |-|Path to MinGW system root (MinGW cross-compiling build only)|
|
|
|
|RPI_PREFIX |-|Prefix path to Raspberry Pi cross-compiler tools (RPI cross-compiling build only)|
|
|
|
|RPI_SYSROOT |-|Path to Raspberry Pi system root (RPI cross-compiling build only)|
|
|
|
+|EMSCRIPTEN_ROOT_PATH |-|Root path to Emscripten cross-compiler tools (Emscripten cross-compiling build only)|
|
|
|
+|EMSCRIPTEN_SYSROOT |-|Path to Emscripten system root (Emscripten cross-compiling build only)|
|
|
|
|
|
|
Note that the specified build option values are cached by CMake after the initial configuration step. The cached values will be used by CMake in the subsequent configuration. The same build options are not required to be specified again and again. But once a non-default build option value is being cached, it can only be reverted back to its default value by explicitly resetting it. That is, simply by not passing the corresponding build option would not revert it back to its default. One way to revert all the build options to their default values is by clearing the CMake cache by calling cmake_clean.bat or cmake_clean.sh.
|
|
|
|
|
|
@@ -206,6 +212,23 @@ For activating the MinGW toolchain, and to allow it to find the correct compiler
|
|
|
|
|
|
Execute cmake_mingw.sh then go to the build tree to execute make command. After the build is complete, the Windows executables can be found in the build tree's "bin" subdirectory.
|
|
|
|
|
|
+\section Building_Emscripten Emscripten build process
|
|
|
+
|
|
|
+> WHAT DOESN'T WORK:
|
|
|
+> - %Sound.
|
|
|
+> - %Terrain rendering.
|
|
|
+> - Networking. Javascript can only use http and websockets protocols so it's not likely that kNet will ever function.
|
|
|
+> - Mouse locking.
|
|
|
+> - All the scripting support: AngelScript and Lua/LuaJIT.
|
|
|
+
|
|
|
+This section assumes you have already updated, installed, and activated the latest Emscripten (trans-)compiler toolchain on your host system as per described in http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html.
|
|
|
+
|
|
|
+Set the EMSCRIPTEN_ROOT_PATH environment variable or build option to point to the root path of Emscripten cross-compiler tools. The Emscripten sysroot path will be derived from the root path, usually from 'system' subdir relative to the root path. However, you can optionally set the EMSCRIPTEN_SYSROOT environment variable or build option to point to another system root path.
|
|
|
+
|
|
|
+On Windows host, execute cmake_emscripten.bat. On OS X or Linux host, execute cmake_emscripten.sh. Then go to the build tree and execute the 'make' command to start the build as usual. You may want to set the URHO3D_SAMPLES build option to build all the samples.
|
|
|
+
|
|
|
+After the commands finish successfully, the HTMLs and its correspondng data files should have been generated in the build tree's "bin" subdirectory, from where it can be launched in a browser.
|
|
|
+
|
|
|
\section Building_64bit Native 64bit build
|
|
|
|
|
|
When using MSVC compiler, Urho3D common CMake module configures the build tree to target a 32-bit platform by default. When using other non-MSVC compilers (like GCC or Clang), the module sets the default to 32-bit or 64-bit based on the chosen toolchain in the build tree. You can, however, use the "URHO3D_64BIT" build option to override the default, i.e. by setting the option to '0' (for 32-bit) and '1' (for 64-bit) explicitly.
|