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
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Migration
Migrating to UNIGINE 2.0
C++ API Migration
Migrating from UNIGINE 2.0 to UNIGINE 2.1
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.

Semi-automatic Compilation with Build Script

A UNIGINE Build script is a one-touch solution to rebuild the engine and tools with different options.

To invoke the build script, run <UnigineSDK>/utils/build.py from a console (see examples below). Note that you need to properly set the development environment to get the script working.

Built files can be found in the target directory, in bin and lib folders.

Notice
Rebuilding the UNIGINE engine and tools is available only in the full source version of SDK.

Command Line Options

--help Display a help message and exit.
--platform PLATFORM Platform to build for (multiple options are accepted). By default the target platform corresponds to the native one.

linux
windows
macos
Linux
Windows
Mac OS X
--type TYPE Type of the build (multiple options are accepted). The default is release.

all
release
debug
Both debug and release versions of components are built at the same time
Production version
Version with detailed debugging information
--bits BITS Bit count of the target platform. OS native bit count is detected and used as a default one.

all
32
64
Build two variants for both 32- and 64-bit platforms
32-bit build
64-bit build
--csharp Build the C# libraries and the application.
Notice
If the --sample parameter is set to all, both the C# and C++ samples will be built.
--component COMPONENT UNIGINE component to build. The default is engine.

all

engine
tools
samples
UNIGINE engine together with stand-alone tools and C++ samples. If the --csharp is passed, C# samples will be built too.
UNIGINE engine (both the binary executable and the library)
Stand-alone tools
C++ samples. If the --csharp is passed, both the C++ and C# samples will be built.
--precision PRECISION Create a build with single or double precision coordinates support. The default is float.

float
double
Use single precision coordinates
Use double precision coordinates
--plugin PLUGIN Build C++ plugins individually or in groups. The default is no.

no
all
App3DSurround
App3DVision
AppGrabber
AppOculus
AppPanorama
AppProjection
AppSeparate
AppSurround
AppWall
Autodesk
CigiClient
Collada
GDAL
GPUMonitor
Interface
OpenFlight
Renderer
SSLSocket
Do not build plugins
Build all available plugins
NVIDIA 3D Vision Surround stereo plugin
NVIDIA 3D Vision stereo plugin
AppGrabber plugin
Plugin for the Oculus Rift virtual display
AppPanorama plugin
AppProjection plugin
AppSeparate plugin
AppSurround plugin
Plugin for multi-monitor support
Import plugin for Autodesk
Plugin for CIGI standard
Import plugin for Collada
GDAL import plugin for geodata
GPUMonitor plugin
Interface plugin
Import plugin for OpenFlight
Plugin for Renderer customization
SSLSocket plugin

Plugins are specified in the following way:

Shell commands
--plugin PluginName1 PluginName2 PluginName3
--tool TOOL Build UNIGINE tools individually or in groups (--component parameter should be set to all or tools). The default is all.

all
Archiver
ImageDDS
ImageTTF
ImageView
Interpreter
MeshImport
Resource
ResourceEditor
Terrain
Build all available plugins
Archiver tool
ImageDDS tool
ImageTTF tool
ImageView tool
Interpreter tool
MeshImport tool
Resource tool
Resource Editor
Terrain tool

Tools are specified in the following way:

Shell commands
--tool ToolName1 ToolName2 ToolName3
--log LOGFILE Create a log file that contains a record of the compilation. By default, no name is specified and the log file is not created.
--nocompiler NOCOMPILER Disable the usage of shader compiler for Direct3D11 renderer. All shaders must be precompiled and placed in the root of data directory. The default is no.
--password PASSWORD The password entered when creating an UNG archive for the engine to open and use these archives. The default is no.
--sample SAMPLE Build the C++/C# samples. Multiple options are allowed. The default is no.
Notice
  • If the --csharp parameter is set, the C# samples can also be built.
  • If the --csharp parameter is set and --sample is set to all, both the C++ and C# samples will be built.

no
all
GLAppQt
D3D11AppQt
RenderQt
D3D11SharpAppForm
D3D11SlimAppForm
GLTKAppForm
Do not build samples
Build all the samples including API samples
Build the GLAppQt C++ sample
Build the D3D11AppQt C++ sample
Build the RenderQt C++ sample
Build the D3D11SharpAppForm C# sample
Build the D3D11SlimAppForm C# sample
Build the GLTKAppForm C# sample

Samples are specified in the following way:

Shell commands
--sample SampleName1 SampleName2 SampleName3
--simd SIMD Perform parallel compilation using the SIMD operations. The default is no.

no
neon
Do not use
Use ARM NEON technology
--jobs JOBS Perform parallel compilation. An argument specifies the number of parallel building jobs to be run. The default is all.

all
1
2
3
4
6
8
Use all available CPU cores to run the building jobs
Use 1 thread
Use 2 threads
Use 3 threads
Use 4 threads
Use 6 threads
Use 8 threads
--batch Batch option to skip all prompts for user input. Not used by default.
--clean_source Clean up the source directory before the compilation starts (i.e. remove pdb, ilk, exp files, etc.). When this option is set, the source/clean.py script is actually run. If you need to clean up after the compilation was performed, run this script manually (the target directory will remain untouched).
--clean_target Delete everything from the target directory before the compilation starts.
--watermark WATERMARK Create a build with a watermark in the viewport The default is no.

no
evaluation
confidential
default
No watermark
Evaluation version with "Evaluation kit" watermark
Version with "For internal use only" watermark
Version with "UNIGINE" watermark
--terminal TERMINAL Enables TELNET terminal. The default value is no.
--skip_errors Skip build errors (if any). When this option is set, the build.py script is run for all of the specified tools and plugins, even if errors occur. The build errors are displayed at the end.
Notice
This option allows skipping build errors only for tools and plugins.
This option allows you to check which plugins and tools have not been built successfully and speeds up error fixing.
TARGET The last optional argument is a target directory to store builds, by default it's ../. Two additional directories in the target directory will be created: bin and lib to store the binary executable and libraries, respectively.

If no options are set, the script will be built with default values.

Usage Examples

To build the release version of the UNIGINE engine (both the binary executable and the UNIGINE library) for a native 64-bit platform, type:

Shell commands
build.py --type=release --bits=64

In the example below, the debug version of tools will be rebuilt for 32-bit Windows (the current platform):

Shell commands
C:\Windows\system32>c:

C:\Windows\system32>cd c:\UNIGINESDK\utils\

C:\UNIGINESDK\utils>build.py --type=debug --bits=32 --component=tools

To create the debug version of the engine, use the following:

Shell commands
C:\UNIGINESDK\utils>build.py --type=debug --component=engine --precision=double

To build all the C++ and C# samples, type:

Shell commands
C:\UNIGINESDK\utils>build.py --csharp --sample=all

To build the release version of the Renderer plugin for x64 platform, use the following command:

Shell commands
build.py --component=engine --plugin=Renderer  --type=release --bits=64
Last update: 2017-07-03
Build: ()