|PathEngine home||previous: ||next: |
For platforms without Visual Studio, the PathEngine source archives come with a python build script that serves to make a default build from the source code, with some dependency checking. The GCC based platform specific code packages enable the PathEngine run-time library to be built on various operating systems and architectures where the GCC toolchain is available as a standard compilation environment.
The python build scripts are provided as a quick way to get the source code to build, avoiding the complexities of cross-platform differences in makefile operation, and to demonstrate a baseline set of compile settings for each platform.
While the build scripts do include automatic dependency generation and checking (per source file), and should generally build the source code robustly, the scripts do have some rough edges, and are not intended to take the place of a fully featured build setup tool.
The build scripts require python and GCC installed and on the search path. (The dependency generation code works by calling through to 'gcc -MM'.)
Python is generally included as standard with Linux and FreeBSD distributions.
If not then it can be downloaded and installed from www.python.org.
The build setup has been tested against Python versions 2.5 and 2.6, should also work with other 2.x releases.
Building the source code requires a reasonably standard compliant compiler (e.g. a recent version of GCC), with C and C++ standard libraries installed.
Python build scripts are provided with the platform specific code archives for the following platforms (by platform code, see
These platform specific archives then include platform specific code directories, plus python build scripts and text files with a list of source files to be included for each project.
The packages should be extracted over the top of the base full source package, ensuring that the release numbers for the two packages match.
Where more than one of the above packages is installed files will be repeated and it is ok for these to be overwritten.
Before building the source code, the following environmental variables need to be set:
(In Bash, you can do this from the command line with 'export PATHENGINE_CONFIGURATION=Debug' and 'export PATHENGINE_CONFIGURATION=GCCx64', for example, before executing the build command.)
Before running the build scripts, change directory to 'SDKRoot/python/buildScripts'.
The build command is then of the form "python MakeProject.py projectType projectName", where:
After the first build the build scripts will check dependencies and only recompile objects that need to be recompiled.
To build the PathEngine run-time library as a shared object, type "python MakeProject.py so PathEngine".
The above build operation should generate a file 'PathEngine.so', in a directory location 'SDKRoot/build/platform/configuration/projectType/', where platform is replaced by the code for the platform being built, configuration is replaced by the configuration being built (e.g. 'Debug' or 'Release'), and projectType is the project type specified in the build command.
(So, assuming a debug build, on x64 Linux, the build result should be located at 'SDKRoot/build/GCCx64/Debug/so/PathEngine.so'.)
This is a shared object binary, essentially the Linux equivalent of a Windows DLL.
To build the PathEngine run-time library as a .lib file for static linkage use "python MakeProject.py lib PathEngine".
Depending on how GCC is setup, it may be necessary to modify the compile command.
This can be done by modifying the compileCommand() function, in 'SDKRoot/code/buildScripts/PlatformConfig.py'.
(And this compile command can also be modified to change the level of optimisation, and so on.)
Note that the build scripts don't check themselves as a dependency, so it may be necessary to perform a full rebuild
after script changes.
This can be done by deleting all the intermediate directories generated by a previous build command, or by simply deleting the build directory completely.
|Documentation for PathEngine release 6.03 - Copyright © 2002-2021 PathEngine||next: |