This page has been translated automatically.
编程
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
GUI
Double Precision Coordinates
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
CIGI Client Plugin
Rendering-Related Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Manual Compilation via SCons

Using SCons you can re-build the Unigine engine and its components (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 the SDK.

Building with SCons

You should properly set the development environment to build with SCons.

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

  1. Specify the SCONSFLAGS environment variable with -Q and -u options to avoid typing them by hand every time:
    • -Q to suppress SCons status messages (except commands that are executed to rebuild files). This is optional.
    • -u to search up the folder structure until an SConstruct file is found and build components at or below the current folder.
      Notice
      If this option isn't specified, components won't be built.
  2. For Windows OS add <UnigineSDK>/externs/bin path to PATH environment variable to use Unigine batch scripts for more handy SCons call
  3. In the command prompt, go to the target directory which contains a SConscript file (depending on what you are going to compile).
  4. Type scons and pressENTER 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. For example:
    Shell commands
    C:\Windows\system32>c:
    
    C:\Windows\system32>cd c:\UnigineSDK\source\app\main
    
    C:\UnigineSDK\source\app\main>scons
    To build the release version of the Unigine engine, tools or an application for a native platform (here, Windows), you should type scons debug=0. For example:
    Shell commands
    C:\UnigineSDK\source\app\main>scons debug=0

Cross-Compilation with SCons

SCons allows for building the Unigine engine, its tools or a custom application for platforms with different bitness by specifying the cross option for Linux platform. Use Unigine batch scripts for Windows. For example:

Using Scons Under Windows

To create the 32-bit version of the 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_x86 double_precison=1

Notice
Running scons without postfix runs scons_x64.bat script by default.

Using Scons Under Linux

If you want to build the 32-bit release version of the 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

Compilation Options

When building with SCons, the available options are the following:

  • 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
  • debug - generate detailed debugging information or not. Possible values are: 1 (by default) to build the development version, 0 to build the release version.
  • half_texcoords - build with half float texture coordinates. Possible values are: 1 (by default), 0.
  • double_precision - build with double precision coordinates (for large coordinates support). Possible values are: 1, 0 (by default).
  • compiler COMPILER - compiler to be used.
    Notice
    It is not recommended to override the default settings.
    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
    • 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 theSIMD operations. Possible values are:
    • default - use Streaming SIMD Extensions 2 technology (Intel SIMD). 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

Renderer Options

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

  • opengl - include OpenGL renderer. The default is 1.
  • opengl_44 - include OpenGL 4.4 functionality. The default is 1.
  • opengl_45 - include OpenGL 4.5 functionality. The default is 0.
  • direct3d11 - include DirectX 11 renderer. The default is 1.

Sound Options

  • openal - include OpenAL sound 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 UnigineEditor functionality. The default is 1.
  • terminal - enable TELNET terminal. The default is 0.
  • openexr - OpenEXR format. The default is 1.
  • splash - Custom splash. The default is 1.
  • quadbuffer - NVidia QuadBuffer. Available for Sim SDK only. The default is 0.
  • geodetic - Geodetic feature. Available for Sim SDK only. The default is 1.

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 - the Unigine engine revision number.
Last update: 2017-12-21
Build: ()