This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Content Creation
Materials
Unigine Material Library
Tutorials
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Manual Compilation via SCons

Using SCons you can re-build the Unigine engine and its components (Network plugin, standalone tools, plugins for 3D editors) as well as binary executable of a custom application. It reads the default compilation settings stored in SConstruct and SConscript files which are provided in the Unigine SDK.

Notice
Rebuilding the Unigine engine and tools is avalable only in the full source version of SDK.

How to Build with SCons

To build the development version of Unigine engine or tools (the same bitness as the native platform) via SCons, perform the following steps:

  1. Open the console.
  2. Go to the target directory which contains a SConscript file (depending on what you are going to compile).
  3. Type scons and press ENTER to start building.
    By default cross-compilation is disabled and the compiled application and tools have the native bitness. If necessary, you can set your custom compilation options.

Using Scons Under Windows

Under Windows you can use not only scons, but also scons with the cross=x64 option to create a 64-bit build.
For example, if you want to build the release version of Unigine engine for a native platform (here, Windows), type the following:

Shell commands
C:\Windows\system32>c:

C:\Windows\system32>cd c:\UnigineSDK\source\app\main

C:\UnigineSDK\source\app\main>scons debug=0
For example, to create the 64-bit version of Unigine engine that supports double precision coordinates, use the following. By default the development version is created.
Shell commands
C:\UnigineSDK\source\app\main>scons cross=x64 double=1

Using Scons Under Linux

To compile a different bit version for Linux, use cross option.
For example, if you want to build the 32-bit release version of Unigine engine for a native platform (here, Linux), type the following.

Shell commands
username@pc-name$ cd /home/username/UnigineSDK/source/app/main/
username@pc-name$ scons debug=0 cross=x86

Using Scons Under Mac OS X

To compile a 32-bit release version of Unigine engine for Mac OS X, type the following.

Shell commands
mac-name:~ username$ cd ~/home/username/UnigineSDK/source/app/main/
mac-name:main username$ scons debug=0 cross=x86

Engine Compilation Options

When rebuilding the Unigine engine, the available options are the following:

  • platform PLATFORM - platform to build for. Possible values are:
    • default - the native platform that SCons is currently run on (for Linux). To create 64-bit Windows application, scons with the cross=x64 option should be run. For Mac OS X the default is always 64-bit architecture. This is a default option.
    • ps3 - PlayStation 3
    • android - Android
    • ios - iOS
    • webgl - WebGL (still in the pipeline, so can cause building-up problems; available only for source versions)
  • cross BITS - bitness of the target platform. Possible values are:
    • default - version with the same bitness as the platform that SCons is currently run on. This is a default option.
    • x86 - 32-bit version
    • x64 - 64-bit version
    • arm - ARM-based version
  • debug - generate detailed debugging information or not. Possible values are: 1 (by default), 0.
  • double DOUBLE - build with double precision coordinates (for large coordinates support). Possible values are: 1, 0 (by default).
  • compiler COMPILER - compiler to be used. It is not recommended to override the default setting. Possible values are:
    • default - the native compiler for the chosen platform. This is the default option.
    • gcc - GCC (the GNU Compiler Collection)
    • msvs - MS Visual Studio compiler
    • ps3ppusnc - PlayStation 3 compiler
    • clang - Clang compiler
  • jobs JOBS - the number of parallel building jobs to be run. Possible values are: 0, 1, 2, 3, 4, 6, 8, 16. The default is 0.
  • batch - enable batch build mode for MS Visual Studio to skip all prompts for user input. Possible values are: 1 (by default), 0.
  • simd SIMD - perform parallel compilation using the SIMD operations. Possible values are:
    • default - use ARM NEON technology. This is the default value.
    • none - do not use SIMD
    • sse - use Streaming SIMD Extensions technology
    • sse2 - use Streaming SIMD Extensions 2 technology (Intel SIMD)
    • avx - use AVX
    • altivec - use AltiVec instructions
    • neon - use ARM NEON technology
  • emulation EMULATION - emulate the selected platform. When this option is used the build system creates PC/Mac based binary which emulates the platfom. Also it can be used as a script cache generator. Possible values are:
    • none - do not emulate. This is the default value.
    • ps3 - PlayStation 3
    • android - Android
    • ios - iOS
    • webgl - WebGL

Renderer Options

If your application is not targeting different platforms at once, it is possible to exclude all information about non-used renderers from Unigine library and thus decrease its size.

  • opengl - include OpenGL renderer. The default is 1.
  • opengles - include OpenGL ES renderer for mobile platforms. The default is 0.
  • direct3d9 - include DirectX 9 renderer. The default is 1.
  • direct3d10 - include DirectX 10 renderer. The default is 1.
  • direct3d11 - include DirectX 11 renderer. The default is 1.
  • direct3d119 - include DirectX 11 renderer of DirectX 9 level (Direct3D119). The default is 0.

Sound Options

  • openal - include OpenAL sound support. The default is 1.
  • xaudio2 - include XAudio2 support. The default is 1.

Computing Options

  • cuda - include CUDA support. The default is 0.
  • opencl - include OpenCL support. The default is 0.

Other Options

  • editor - include Unigine editor functionality. The default is 1.
  • flash - enable Flash support. The default is 0.
  • atomic - enable single library creation for mobile platforms (Android, iOS, WebGL) without additional engine libraries creation. The default is 0 (single library creation is disabled).
  • terminal - enable TELNET terminal. The default is 1.
  • nocompiler - disable the usage of shader compiler. The default is 0.

Protection Options

  • password - encrypt the build. Specify the same password as used for a package with your project data.
  • watermark - create the Unigine watermark in the application viewport or not. Possible values are:
    • no - no watermark (by default)
    • default - default "Unigine" watermark
    • evaluation - "Evaluation kit" watermark
    • confidential - "For internal use only" watermark
  • revision - Unigine engine revision number.

Network Plugin Compilation Options

For compiling the Network plugin the following options can be set:

  • platform PLATFORM - platform to build for. Possible values are:
    • default - the native platform that SCons is currently run on (Windows, Linux or Mac OS X). This is a default option.
    • ps3 - PlayStation 3
  • compiler COMPILER - compiler to be used. It is not recommended to override the default setting. Possible values are:
    • default - the native compiler for the chosen platform. This is a default option.
    • gcc - GCC (the GNU Compiler Collection)
    • msvs - MS Visual Studio compiler
    • ps3ppusnc - PlayStation 3 compiler
  • cross BITS - bitness of the target platform. Possible values are:
    • default - version with the same bitness as the platform that SCons is currently run on
    • x86 - 32-bit version
    • x64 - 64-bit version
  • debug - generate detailed debugging information or not. Possible values are: 1, 0 (by default).
  • double DOUBLE - build with double precision coordinates (for large coordinates support). Possible values are: 1, 0 (by default).
  • check_memory - this option is for 32-bit Windows debug builds only. It allows to check memory leaks in the system. Possible values are: 1, 0 (by default).
  • prof - generate profiling information or not. This option creates a release build version that, however, also contains some required debugging information. The default value is 0.
  • jobs JOBS - the number of parallel building jobs to be run. Possible values are: 0, 1, 2, 4, 8, 16. The default is 0.
Last update: 03.07.2017
Build: ()