This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
FAQ
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
GUI
Double Precision Coordinates
API
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
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Manual Compilation via SCons

Using SCons you can re-build the UNIGINE Engine and its components (standalone tools, plugins, API samples) 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 available only in the full source version of the SDK.

SCons allows cross-platform building: you can build the engine, tools and applications on both Windows and Linux. The build scripts are implemented in Python.

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.
  2. In the command prompt, go to the <UnigineSDK>/source directory which contains an SConstruct file.
  3. Type scons and press ENTER to start building. If necessary, you can specify components and/or compilation options.
    Shell commands
    C:\Windows\system32>c:
    
    C:\Windows\system32>cd c:\UnigineSDK\source
    
    C:\UnigineSDK\source>scons
    By default, the compiled UNIGINE Engine library is built with single precision coordinates support and the native platform bitness. On Windows, SCons will detect and build with the highest version of the installed Visual Studio toolset.

To build the debug version of the UNIGINE Engine, tools or an application for a native platform, you should type scons debug=1. For example:

Shell commands
C:\UnigineSDK\source\>scons debug=1

Compilation Options

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

  • bits 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
  • vs VS - Visual Studio toolset to build with. Possible values are:
    • default - Visual Studio version is detected by SCons as highest.
    • 2013 - VS 2013 (12.0)
    • 2015 - VS 2015 (14.0)
    • 2017 - VS 2017 (14.1). For the Visual Studio 2017 to be detected in OS, SCons 3.0 or higher is required.
  • debug - generate detailed debug information. Possible values are: 1 to build the development version, 0 to build the release version (by default).
  • half_texcoords - build with half float texture coordinates. Possible values are: 1 (by default), 0.
  • double - build with double precision coordinates (for large coordinates support). Possible values are: 1, 0 (by default).
  • jobs JOBS - the number of parallel building jobs to be run. Possible values are: all, 1, 2, 3, 4, 6, 8, 16. The default is all.
  • simd SIMD - perform parallel compilation using the SIMD 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

To create the 32-bit version of the UNIGINE Engine library that supports double precision coordinates, use the following:

Shell commands
C:\UnigineSDK\source\>scons bits=x86 double=1

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 1.
  • 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

  • microprofile - use the third-party profiler with web integration. The default is 0.
  • terminal - enable TELNET terminal. The default is 0.
  • openexr - OpenEXR format. The default is 0.
  • splash - load custom splash screen if required. The default is 0 (no custom splash screen).
  • quadbuffer - NVidia QuadBuffer feature. Available for Sim SDK only. The default is 0.
  • geodetic - Geodetic feature (support for 3D geoid model). Available for Sim SDK only. The default is 0.

Protection Options

  • password - encrypt the build. The <UnigineSDK>/source/engine/password.resource file should be created by using the Resource tool before rebuilding.

Building Components

SCons allows building specific UNIGINE components, such as plugins, samples, and so on. The following components are available:

  • engine - UNIGINE engine (both the binary executable and the library).
  • main - main C++ application.
  • main_sdl - SDL main application.
  • csharp - C# libraries and main application.
  • main_csharp - main C# application.
  • samples - C++ API samples.
  • cs_samples - C# API samples.
  • plugins - all plugins. In the evaluation version of UNIGINE SDK, some plugins cannot be rebuilt.
  • tools - all standalone tools.
Notice
UNIGINE components are linked to the UNIGINE Engine library, so, if the engine build configuration differs from the required one for building a component, the engine will be rebuilt first. However, rebuilding is available only for the full source version of the SDK.

For example:

  • The debug version of plugins will be built by using the Visual Studio 2013 toolset.
    Shell commands
    scons vs=2013 debug=1 plugins
  • The 32-bit C++ API samples will be built:
    Shell commands
    scons bits=32 samples

You can also build the specific sample, plugin or tool by passing its name. The name is case-insensitive. You can specify any number of components to build. For example:

Shell commands
scons Steam NodeTrigger usc
In the result, the Steam plugin, the NodeTrigger sample and the USC interpreter will be built.
Last update: 2018-08-10
Build: ()