...
Platform | Description | |||
---|---|---|---|---|
| 32 bit Windows | |||
| 64 bit Windows | |||
| 32 bit desktop Linux (Ubuntu) | |||
| 64 bit desktop Linux (Ubuntu) | |||
| 32 bit Android OS | |||
| 64 bit Android OS | |||
| Xbox One | |||
| PlayStation4 |
| Deprecated: PlayStation Vita | PlayStation 4 |
| Xbox Series X | |||
| PlayStation 5 |
32 bit builds are supported for a limited subset of projects:
...
Platform | ToolSet | Description | ||
---|---|---|---|---|
| 2012 | Deprecated: Visual Studio 2012 (with DLL Crt) | ||
| 2013 | Visual Studio 2013 (with DLL Crt) | ||
| 2015 | Visual Studio 2015 (with DLL Crt) | ||
| 2017 | Visual Studio 2017 (with DLL Crt) | ||
| 141# | Visual Studio 2017 MSVC 14.1# (with DLL Crt) | ||
| 142# | Visual Studio 2019 MSVC 14.2# (with DLL Crt) | ||
| 2012ST | Deprecated: Visual Studio 2012 (with static Crt) | ||
| 2013ST | Visual Studio 2013 (with static Crt) | ||
| 2015ST | Visual Studio 2015 (with static Crt) | ||
| 2017ST | Visual Studio 2017 (with static Crt) | ||
| 141#ST | Visual Studio 2017 MSVC 14.1# (with static Crt) | ||
| 142#ST | Visual Studio 2019 MSVC 14.2# (with static Crt) | ||
| GCC | GCC 4.8 for Linux (i686-linux-gnu/4.8) | ||
| CLANG | Clang 3.4 for Linux | ||
| Android NDK for ARM |
| INTEL | Android NDK for Intel
Info |
---|
Sample framework projects cannot be compiled with versions of Visual Studio older than 2015. |
...
There are a small subset of platforms whose NDA requires that all mention of them be removed from code that is sent to unapproved developers; the packages for these include modified headers that replace those in the EnlightenSDK baseline. Usage is identical; it should be extracted to the same root folder and you must select the 'overwrite existing files' option when indicated.
Platform Specifics
Compilation on Linux
The CodeBuildTool
is a .NET application, which runs under Mono 4.0.x on both Linux and OS X. On Linux all the functionality remains, accessed by the same command line arguments. All that is required is to prefix the command line with mono
. For example:
Code Block |
---|
cd ~/Enlighten_3.xx
mono BuildTools/CodeBuildTool.exe build DEBUG_LINUX32_GCC Src/Samples/Programs/GeoRadiosity/GeoRadiosity.vcxproj
|
Note that at the time of writing, Mono 4.0.x is not currently available in the Ubuntu 14.04 LTS repos, and so you will need to follow the steps at Mono to get it.
Compilation on OS X
Enlighten API and sample framework projects provided as source must be compiled on OS X using Xcode. The CodeBuildTool can be used to generate Xcode projects for you on Windows, or on OS X and Linux using mono
. For example, on OS X you would open a Terminal window, change to the Enlighten-3.xx directory
and execute the following command:
Code Block |
---|
mono BuildTools/CodeBuildTool.exe CreateProjects OSX Src/Enlighten.sln
|
This will create Xcode projects for all Enlighten API source libraries and sample projects in Enlighten.sln
that are supported on OS X, and then add them to an Xcode workspace called Enlighten-OSX.xcworkspace
, located in the Enlighten SDK root directory. However, before you can build any of the targets you will need to do the following:
- In the Locations tab of the Xcode Preferences window ensure that the DerivedData option is set to Relative so that the build products are built in a location that is relative to the
Enlighten-OSX.xcworkspace
. - Extract the contents of
EnlightenSDK_OSX_iOS-3.x.x.zip
and copy the Enlighten libraries that are not provided as source from theOSX-Debug
andOSX-Release
directories into the Xcode workspace build products directory. By default, for a debug build configuration, the destination directory will beEnlightenSDK-3.x.x/DerivedData/Enlighten-OSX/Build/Products/Debug/
- Extract
EffectsBuildTool_OSX.zip
and copy the contents of theBuildTools
directory into theEnlightenSDK-3.x.x/BuildTools
directory.
Compilation for Android
When building the libraries, only the Android NDK r10d is required, but when building APKs for applications such as GeoMobileDemo, the CodeBuildTool has the following extra prerequisites:
- JDK 6
- Android SDK (android-18 and android-21 platforms, as well as the standard tools)
- Apache Ant
- KeyTool and Jarsigner (for release builds)
In order to locate the NDK, the CodeBuildTool looks for the environment variable ANDROID_NDK_ROOT
to determine the root folder, and will attempt to use the Clang 3.5 compiler. For example, to locate clang++ it will look in:
Code Block |
---|
"$ANDROID_NDK_ROOT/toolchains/llvm-3.5/prebuilt/windows-x86_64/bin/clang++.exe" |
Similarly, the CodeBuildTool builds for the android-18 SDK platform for 32 bit, and android-21 SDK platform for 64 bit, and assumes the following directory exists for 32 bit or 64 bit respectively:
Code Block |
---|
"$ANDROID_NDK_ROOT/platforms/android-18/*"
"$ANDROID_NDK_ROOT/platforms/android-21/*" |
NEON intrinsics, GCC & Clang
Enlighten on ARM requires a processor that supports the NEON vector instruction set. The vast majority of modern ARM tablets and phones have this. Unfortunately, the GCC compiler version 4.4.3 that is shipped as part of the Android NDK fails with internal compiler errors. Later versions of GCC fix this issue but produce incorrect results for enough uses of NEON intrinsics that we cannot use it in practice. However, the Clang compiler, version 3.1 of which has been included in the Android NDK since revision 8c does not suffer from any of these problems, reduces compilation time and most importantly gives a significant performance improvement for Enlighten on Android.
We ship pre-built libraries (.a
) and applications built with Clang 3.5 as part of the Enlighten Mobile distribution that are compatible with alternative Android toolchains. Although Enlighten does not use STL containers, algorithmic content such as <algorithm> is included from the GNU STL.
If you do use GCC version 4.4.3 you should avoid excessive use of the Geo::v128
type (an alias for the NEON vector type) to avoid triggering the internal compiler error.
If you wish to build the Enlighten libraries and sample applications for Android from source, or wish to make use of the Geo::v128
type, you will need to build with Clang, using the supplied CodeBuildTool. For example, to build a release ARM 32 bit build:
Code Block |
---|
CD /d E:\EnlightenRootDir
BuildTools\CodeBuildTool build Release_Android Projects\GeoMobileDemo\GeoMobileDemo.vcxproj
|
Building APKs
The Release_Android
configuration enables compiler optimisation level -O3
and uses Ant to sign the APK using a keystore and private key generated using KeyTool. Place your .keystore
file in the EnlightenSDK-2.XX\Src\Samples\Programs\<app name>\Android\Apk
directory and then in the same place create a file called ant.properties
. Inside ant.properties
add the following parameters to specify which keystore and private key Ant should use to sign the APK:
Code Block |
---|
key.store=<your keystore name>.keystore
key.alias=<your key alias>
key.store.password=<your keystore password>
key.alias.password=<your private key password>
|
A successful build will create an APK in EnlightenSDK-3.XX\Src\build\Output\<config>_Android\Bin\
and copy any necessary resource files into a folder alongside it. A batch file called Install_<app name>_Android.bat
will also be copied to that location which can be used to install the app and copy its resources to the device.
Compilation for iOS
Pre-built Enlighten libraries compatible with both iOS devices and the iOS Simulator are provided, some of which are also shipped as source. If you would like to build these libraries and the sample applications (such as GeoMobileDemo) from source you will need to create the appropriate Xcode projects and workspace. The CodeBuildTool can be used to automate this process for you on Windows, or on OS X and Linux using Mono 4.0.x. For example, on Mac OS X you would open a Terminal window, change to the Enlighten-2.xx
directory and execute the following command:
Code Block |
---|
mono BuildTools/CodeBuildTool.exe CreateProjects IOS Src/Enlighten.sln
|
This will create Xcode projects for all Enlighten source libraries and sample projects in Enlighten.sln
that are supported on iOS, and then add them to an Xcode workspace called Enlighten-IOS.xcworkspace
located in the Enlighten SDK root directory. Before you can build any of the sample projects you will need to do two things:
...
.
External libraries
When you run the CodeBuildTool for the first time, it reports any missing libraries in the output. Libraries are found by looking for environment variables, such as DXSDK_DIR
. If any are not set, or set incorrectly, they will be reported and the build will stop.
...