This file contains some notes about how to build and install syBR as well as the required libraries.
If you don't want to build the required libraries yourself you
can download a precompiled
package to be installed in the depends
directory.
CMake is required to build the syBR engine from source.
Windows binaries are included in the distribution, in the tools/cmake-2.4.2-win32-x86
directory. However, for Linux, you have to install it manually to by
using the Linux distribution package installation tool (e.g. Synaptic
for Ubuntu).
A special version of MinGW must be used under Windows, which
is available in the tools
directory. Here is
the explaination about that special version, directly taken from Ogre
3D wiki:
MingW will statically link libstdc++ (the library portion, not the STL) to each build ie each dll or exe. This creates a problem when passing strings and any stream types across dll's. Because the static linking has each copy of libstdc++ managing its own strings and streams, passing a string/stream to another dll and then having it modified there will trash memory. Ogre has several dll's and does pass strings and streams around. Do a debug build of Ogre with libstdc++ and then run in gdb and you find out quickly that a crash occurs in OgrePlatform_d.dll after the config window closes when it tries to modify/deallocate a string passed to it from OgreMain.dll.
A release build using libstdc++ "seems" to run fine for simple Ogre demos but if you start passing a lot of Ogre strings across dll's in a more complicated app, the app starts to misbehave after a while and crashes occur.
libstdc++ was rebuilt with the configure option --enable-fully-dynamic-string so that strings are dynamically allocated using the RTL and can be passed across the dll boundry.
Also AngelCode Bitmap Font Generator is included, also in the tools
directory. It is however only available under Windows.
Ogre3D 1.4.x:
- For MinGW, use a precompiled package from the website,
which is the same as the version included in
the
depends
directory - For Linux, use the
buildOgre3D.sh
script from thedepends
directory to compile it. It has been used to build Ogre3D under Ubuntu Gutsy.
FLTK 1.1.6:
- For MinGW, use the source package from the website, which
is the same as the version included in
the
depends
directory. Then use thebuildFLTK.cmd
script from thedepends
directory to compile it. - When building under Linux it is much easier to use the Linux distribution package installation tool (e.g. Synaptic for Ubuntu) which should include a package for FLTK.
Before trying anything be sure to have all the required libraries and tools setup, as explained above.
For Windows:
- Delete everything in the
build
anddepends/build
directories - Prepare syBR dependencies makefiles / workspaces:
- Run
tools/cmake-2.4.2-win32-x86/bin/CMakeSetup.exe
- Select the syBR
depends
directory as the directory where the source code is - Select the
build
subdirectory of syBRdepends
directory as the directory where the binaries must be built - Click
Delete Cache
and confirm the action - Click
Configure
and select your build platform - Click
Ok
to create the makefiles / workspaces which will be stored in thedepends/build
directory
- Run
- Prepare syBR makefiles / workspaces:
- Run
tools/cmake-2.4.2-win32-x86/bin/CMakeSetup.exe
- Select the syBR root directory as the directory where the source code is
- Select the
build
subdirectory of syBR root directory as the directory where the binaries must be built - Click
Delete Cache
and confirm the action - Click
Configure
and select your build platform (there may be error messages if some required libraries are not found) - Select the build type
- Correct all the errors such as the libraries path
- Click
Configure
again
- If anything is wrong, do the two previous steps again
- Click
Ok
to create the makefiles / workspaces which will be stored in thebuild
directory
- Run
- Open the generated workspaces and compile (start with the dependencies workspace)
The project is developed using MinGW as the compiler and
Code::Blocks as the IDE. When using the same tools you can select MinGW
makefiles as the target in CMake and then open the workspaces/syBR.workspace
workspace from Code::Blocks.
For Linux:
- Delete everything in the build and depends/build directories
- Open a console / terminal and move to the build subdirectory of the syBR root directory
- Prepare makefiles / workspaces:
- Run
cmake -i ..
- Select
No
when asked about showing advanced options - Keep current value when asked about backwards compatibility
- Select
Release
when asked about the build type - Keep current value when asked about install prefix
- Keep current value when asked about the output directory for executable files
- Keep current value when asked about the output directory for library files
- Note that the previous value should be the
lib
subdirectory of the syBR root directory
- Run
- Prepare makefiles / workspaces:
- Run
cmake -i ..
- Select
No
when asked about showing advanced options - Keep current value when asked about backwards compatibility
- Select the build type
- Keep current value when asked about install prefix
- Keep current value when asked about the output directory for executable files
- Keep current value when asked about the output directory for library files
- Note that the previous two values should be the
_syBR_
subdirectory of syBR root directory - If anything is wrong about Ogre include / library directory, correct it
- If anything is wrong about FLTK include/ library directory, correct it
- Re-run
cmake -i ..
until everything is correctly configured
- Run
- Compile the dependencies by running
make
from thedepends/build
directory - Compile the engine by running
make
from thebuild
directory
The Linux version has only been tested under Linux Ubuntu.
Under Windows the only tested target is MinGW Makefiles. Note
that a special build version of MinGW must be used when using it as
build target. This special build version is included in the tools
directory.