* Tidied CMake definition and defaulted to disabled for
multi-configuration build types.
* Added CMake variable to table in "Building Urho3D" docs page.
* Added a section on "Debugging script files" to the "Lua scripting"
docs page.
* Added `LuaScript::LoadRawFile` and `LuaScript::ExecuteRawFile` to load
files using `luaL_loadfile` rather than via the resource cache
(`luaL_loadbuffer`). This strategy makes the source available to Lua
debuggers (e.g. eclipse LDT) for setting breakpoints, etc.
* Added a CMake option `URHO3D_LUA_RAW_SCRIPT_LOADER` to make
`luaL_loadfile` the default script loading strategy.
- `LuaScript::ExecuteFile` will thus prefer the `luaL_loadfile`
strategy, aiding in debugging as above, but without needing to change
method calls.
- `LuaScript::Loader` will also prefer the `luaL_loadfile` strategy,
so that scripts `require`d in the main script are also amenable to
debugging.
- If a script file cannot be loaded from the file system, then it will
fall back on the default resource cache `luaL_loadbuffer` strategy (e.g.
for packaged scripts).
Determine the Emscripten's emcc version and use it to determine whether ccache could be enabled without caveat.
The changes for adding new '--use-metadata' option for Emscripten' file-packager.py has just been submitted to Emscripten upstream as PR (https://github.com/kripken/emscripten/pull/3410) today. Not sure how long it will take to be reviewed and merged (if at all). Tentatively assume it will be in incoming 1.31.4. With the immutable jsoutput file, the linker does not retriggered unnecessarily after changing the resource dirs content.
This is in preparation for using ccache in the container-based CI builds later.
Reinstate MinGW 32-bit D3D9 build jobs which were accidentally got deleted.
Emscripten has just released version 1.30 which, among others, fixes the EMRUN time out handling. In the previous version it did not time-out as expected. But now as EMRUN times out correctly, the build test failed on our Emscripten build due to Travis CI latency.
We have a time constraint on Travis CI side for all our CI builds and tests. Default value of 10 for Emscripten and 5 for native platform is also inline with Emscripten's claim that asm.js is about 50% slower than native speed.
A test case is considered passed when the html exits as the result of emscripten_force_exit() function being called, which happens when the engine's elapsed time reaches URHO3D_TEST_TIMEOUT seconds. When something goes wrong, the engine's elapsed time does not progress as per normal, in this case the emrun's timeout would kick in and terminate the test case with failed exit status. The EMRUN'S timeout is set to be 2 times URHO3D_TEST_TIMEOUT auotmatically.
Add new build option EMSCRIPTEN_EMRUN_BROWSER to select which browser to use for testing. Default is 'firefox'. Refer to https://github.com/kripken/emscripten/issues/3234 to apply the recommended Firefox preference setting for emrun.
At the moment the 'make test' cannot be run non-interactively yet on Linux host and Mac OS X host systems due to what-could-be a bug in 'emrun' script. The issue with 'emrun' has been reported to upstream (https://github.com/kripken/emscripten/issues/3234).
Simplify the custom command for share data generation since we are not going to "fix" the UUID issue of the file_packager.py anymore. Although this would mean the slightest change in the output JS file caused by UUID change could force a long relink process in our build.
For Travis CI - upload Emscripten HTML5 samples to Urho3D main website.
[ci package]
Via the following source file property "EMCC_OPTION". The supported property values are: js-library, pre-js, post-js, embed-file, preload-file, shell-file. The files are added as link dependency so a relink will automatically occur when they are modified (have newer timestamp than target).
Also remove CI build for shared lib type. It is anyway just an emulation as Emscripten does not support dynamic library (yet) and our earlier issue with emar for static lib type has been fully resolved. Test [ci package] for Emscripten.
Add additional logic on Windows host to prevent unnecessary re-linking due to repackaging on each build. There is still no easy way on Windows host to skip repackaging though.
Eliminate the 'Application::GetSubsystem<Engine>()' call on each frame.
Use EMSCRIPTEN_ROOT_PATH environment variable to specify the root path to the emscripten, instead of the original EMSCRIPTEN environment variable exported in emsdk_set_env.sh.
This is because the original EMSCRIPTEN environment variable name clashes with our build scripts.
With the precompiled header support now properly enabled for GCC (including all other cross-compiling toolchains based on GCC) and Clang, any incompabitility between the C++ compiler and the compiler flags required by Urho3D will be thrown out earlier at the time when CMake is about to generate the build tree, which is a good thing. Previously user would probably only know this much later when trying to build the project.
Enhance build scripts to handle source tree and build tree with spaces.
Fix PCH generation with incorrect compiler flags caused by -fPIC and -fpic from being added at the same time.
Fix compiler warning on Android platform with PCH enabled on the external main project due to CMake bug in 'VISIBILITY_INLINES_HIDDEN' implementation.
Close#637.
When the URHO3D_MACOSX_BUNDLE build option is not set, passing the MACOSX_BUNDLE explicitly when setting up a main executable target will make the corresponding target to be built as a bundle.
The post-CMake fix is now reapplied on each iOS build without first checking it needs the fix or not. But since the 'sed' fix is harmless to be repeated, it is ok to do so.
The original 'smart' post-CMake fix uses shell [] operator but have to be removed to keep the CMake 3.0.0 and 3.0.1 users happy.
[ci skip]
This should ensure the Xcode project generated from user calling cmake-gui directly or cmake directly (not via our build scripts) would also geting the critical fix, and also whenever CMake performs a rerun internally then our post-CMake fix is reapplied automatically.
Add new build options for specifying tool-prefix and target-sysroot in cross-compiling build.
Add new IOS_SYSROOT variable to store the path to iOS sysroot and use it to set CMAKE_FIND_ROOT_PATH variable.
Now also generate pkg-config Urho3D.pc for iOS platform.
For Travis CI - simplify SDK installation logic. Use DESTDIR=~ to avoid sudo.
Add new build options to override 64-bit Linux package setup for Debian and Redhad -based host systems.
For Travis CI - fix 64-bit RPM package generation to install library in /usr/lib64, also fix external project build test using Urho3D library from SDK.
Also:
- fix Android-CI build which does not need the symlink creation in the first place.
- fix an existing Xcode build configuration bug which was left undetected until now.