Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 355 lines (239 sloc) 13.3 KB
The Intensity Engine should work on Windows and Linux (and perhaps other
platforms as well by the time you read this). Compilation instructions for
the two platforms have some shared aspects and some non-shared aspects.
The following are the shared aspects.
1. In both cases you should get the source code, either a zip file/tarball
with a release, or straight from the source code repository, in which
case you can simply do
git clone git://
You need the Git version control system installed,
See for more details.
2. Building was previously done using SCons, a next-generation build tool. SCons
requires Python, which you will need anyhow for the Intensity Engine.
See the old versions of this document for building with SCons.
Building is now done using CMake, another next-generation build tool.
The CMake build system has some limitations at the moment:
* You need to compile V8 yourself (it uses SCons)
* You need to run yourself, if you modify
the messages.template file. Do so by running
python src/
in the install directory.
3. After compiling, see the README.txt file for instructions on running
the Intensity Engine.
4. 64-bit systems should be able to natively compile the current version of
Google V8 in the Intensity Engine, which recently gained x86_64
support. Older versions would only work on 32-bit systems (and ARM),
leading to errors like
ld: skipping incompatible src/thirdparty/v8/libv8.a when searching for -lv8
error: gnu/stubs-32.h: No such file or directory
For solutions for those older versions, see
(but again, the current version should work fine on 64-bit systems).
Another possible reason for those errors
mentioned above is if V8 builds itself in 32-bit mode on a 64-bit
system. This appears to be the default setting at present with V8,
but should change eventually. Meanwhile, to fix it, compile V8
by doing
scons arch=x64
in the directory src/thirdparty/v8.
Specific Platforms
The following explains how to install on Ubuntu (9.04 and 9.10). We welcome
feedback about your experience in other distros, so we can add it to this file.
In general, in other distros (or versions of Ubuntu) there might be minor changes
to the package names and so forth, but overall, things should be similar.
First, install Git, CMake, SCons and other important stuff:
Ubuntu 9.04:
sudo apt-get install git-core cmake scons build-essential libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev python-dev zlib1g-dev
Ubuntu 9.10:
sudo apt-get install git-core cmake scons g++ libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev python-dev zlib1g-dev
Check out the source code:
git clone git://
Go to the V8 directory, ./src/thirdparty/v8, and run
there. Then go back down to the base dir, and enter the directory 'cbuild', and run
cmake ..
this should configure things correctly. Then run
Some specific comments:
* To get around an issue with V8 on newer gcc versions, ,
you should enter src/thirdparty/v8 and run
GCC_VERSION="44" scons
This is necessary on Ubuntu 9.10 (but not 9.04).
* If you get a link error about not finding v8, then v8 may not have compiled
correctly. Run 'scons' in src/thirdparty/v8 to see the errors. One existing issue
is that on GCC 4.4+, you need to disable some warnings,
Following the fixes there can solve the problem (requires editing the SConstruct
file in the v8 directory).
* If you get
gnu/stubs-32.h: No such file or directory
when compiling V8, then installing ia32-libs may fix it, see
* If you get 'undefined reference' link errors to forkpty and openpty, then you
need to link with, by adding -lutil to the linker. This seems to
occur for unknown reasons on Slackware. One way to solve this there is to edit
to add -lutil and edit
to add -lutil -lrt. See also more details in
Slackware gurus, can you help us understand this issue?
* A similar issue seems to happen on Ubuntu 8.04, "undefined reference to
shm_open". Adding "rt" to CLIENT_LIBRARIES in src/client/CMakeLists.txt
should fix that.
The following works on Snow Leopard 10.6 (thanks to abs1nth!):
* Install the developer tools, which are an optional install from the
OS X DVD, or download them from
* Install SDL.framework, SDL_mixer.frameworks and SDL_image.framework
in /Library/Frameworks
* Install scons and cmake (probably using MacPorts or Fink)
* Follow the main part of the Linux build instructions above, that is,
git clone git://
Run 'scons' in ./src/thirdparty/v8
in ./cbuild run 'cmake ..' and then 'make'
* The built file "Intensity_CClient" ends up in ./src/client/ . Either
copy it to "./cbuild/src/client/" or start it directly.
Note that CMake also has the option to generate an Xcode project file,
which might be useful, but it hasn't been officially tested.
To build from source, do the following:
1. Get Git from
2. Get SCons from
3. Get CMake from
4. Get Python from Note: The batch files etc. assume
you are using Python 2.6.x.
5. Get the source code by running
git clone git://
In the directory where the source code was placed (usually 'intensityengine'),
run (in a DOS shell, that is, inside cmd.exe) the following commands. They
assume you are building with Visual Studio Express 2008.
First, build V8 by going to src\thirdparty\v8 and running
scons mode=release env="INCLUDE:C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include;C:\Program Files\Microsoft Visual Studio 9.0\VC\Include;,LIB:C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib;C:\Program Files\Microsoft Visual Studio 9.0\VC\Lib;"
(change the path to point to where you have the Windows platform SDKs).
Then, go back up and to \cbuild, and there run
SET PATH=%PATH%;C:\Program Files\Microsoft Visual Studio 9.0\VC\bin;C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE
cmake -G "Visual Studio 9 2008" ..
this should create a project file for VC++, which you can then build. Note
that the first line gets the VC++ compiler in your path; if it is already
there, or in a different location, change or remove that line accordingly.
You can then open the generated solution file in Visual Studio. In
Build->Configuration Manager make sure you are compiling for 'Release'
and not 'Debug', and then start the build.
Some things to be aware of:
* If you are compiling for 'Debug', you may get bizarre and inexplicable errors.
As mentioend above, you must compile for 'Release'. Since the default is in
fact 'Debug', you must remember to switch it.
* zlib, SDL, SDL_Image and SDL_Mixer are bundled in the source code repo for you,
so you don't need to get those.
* If you get
"Fatal Python Error: Interpreter not initialized (version mismatch?)"
then that might be caused by linking against one version of Python but running
against another. To check, look for files of the type python*.dll (python24.dll,
python25.dll, python26.dll, etc.) Remove all but the right python*.dll file from
your path. (In particular, perhaps SCons places python25.dll in the path.)
NOTE: In some cases the error Windows provides for this problem may be less clear,
such as "exception 0xc0000005", which is a general fault due to reading from
an invalid location. Note that such an error may also indicate a completely
different problem.
* When testing with MSVC++ 2008, the following were needed: msvcr90.dll,
msvcp90.dll. Present in Microsoft Visual C++ 2008 Redistributable Package,
Sometimes just copying these files isn't enough (although they appear in
the binary releases that way). The solution is to install the complete
Microsoft Visual C++ 2008 Redistributable Package, see e.g. the FAQ at
(item 6), leading to
* If you get error R6034, then that is because you need to have .manifests
*inside* your files, see
The SCons files do this, in a slightly hackish manner however. Basically, the solution is
mt.exe –manifest Intensity_CServer.dll.manifest -outputresource:Intensity_CServer.pyd;2
mt.exe –manifest Intensity_CClient.dll.manifest -outputresource:Intensity_CClient.pyd;2
where mt.exe is from the Microsoft Platform SDK. In other words, the
manifests have been prepared, and are in 'build', but they haven't been baked into the dlls.
* You need the already mentioned Microsoft Windows Platform SDK.
* If you need to change paths (which you might, if you install e.g. the Platform SDK
somewhere else than the defaults), you might need to edit the various CMakeFiles.txt files.
* If you get "ImportError: DLL load failed: The specified module could not be found", then
look at the line above it for what import failed. You can use Microsoft's
Process Monitor/File Monitor tools to help debug things.
* "Error R6034: An application has made an attempt to load the C runtime library incorrectly"
This might be caused by not having manifests, see above. Or, it might be related to incorrect
linking with the C runtime. It seems to occur on Windows 2003 and Vista, due to their different
method of handling C runtimes - work is in progress to fix this. See
for some info.
* "LNK4098: defaultlib `LIBCMT` conflicts with use of other libs." This can be ignored for now
(but it should be fixed).
* Make sure to use the same windows platform sdk for both V8 and tIE (not v6.0A one place v6.1 elsewhere).
Compiling on FreeBSD should work by following the instructions for Linux
as written above.
Packaging Releases
In general each platform should have a proper installer made, using
platform-specific methods (Linux packages on Linux, Windows installers
on Windows, etc.). But there is also tools/,
which if run where the engine is successfully compiled, will create
a new directory with the files needed for packaging.
After running it, you can simply compress that folder and distribute
that to people. Of course it makes sense to test it beforehand, just
do not test in that same folder, or else it will create temporary
files there that are unnecessary in releases.
On Windows package_for_release assumes it should copy over a
./Python25 directory, containing the necessary parts of Python. You
can change it to Python 2.6 etc. if you want. Note that the current
packaged zips for Windows contain a ./Python25 that just has the
necessary parts, saving download time, so you might want to copy
that instead of using full Python 2.5.
Advanced Usage
Browser Plugin
To compile the experimental browser plugin, use
instead of "cmake ..".
Note that you will need some things like GTK development headers, etc. On
Ubuntu the relevant package is libgtk2.0-dev.
Then copy the browser plugin to where it will be found, using something
sudo cp cbuild/src/client/plugin/ /usr/lib/mozilla/plugins/
Then restart your browser and open
This is very experimental at this point. To try it, do
Before that, you need to build bullet, which you can do by
going to src/thirdparty/bullet and running
Quick test
1. Install the server_runner plugin (see README-standalone.txt)
2. Login to the master
3. Tell the server_runner plugin to run the map
That is a simple test map for physics, that currently exists
on the Syntensity master server. Following the steps above
will run it on your machine.
What to do when you're done
See README.txt for how to connect to, and
README-standalone.txt for how to run locally/standalone
(which is a quick way to see some stuff running in the engine).