| Version 13 (modified by cpvc, 5 years ago) |
|---|
Prerequests
To build with this guide we assume that you have a functional Microsoft Windows system with version 8 of Microsofts C++ compiler. This version of the compiler is found in either an older version of the Windows SDK or in Visual Studio 2005. If not please see the Building on Debian/Ubuntu for a more pleasant experience.
Download the newest(old) version of Windows SDK containing version 8 of the compiler: Windows SDK Update for Windows Vista ISO
Note: Version 7 of the compiler as found in very old versions of the Windows SDK and in Visual Studio 2003 is not supported by the CMake files at the moment.
Note: Version 9 of the compiler as found in the newest version of Windows SDK and Visual Studio 2008 can not be use at the moment because Boost does not support it.
Install Darcs
Grab the newest version from http://zooko.com/darcs/ (darcsdir-w32-1.0.9.zip) and install it in your program location. You can then add the location to your PATH variable to ease later use. This is done in the properties window for My Computer under Advanced -> Environment variables. You want to add, remember to restart your console every time a path has been added.
;C:\path\to\darcsdir-w32
Get OpenEngine source
Open a command prompt (Start -> Run -> enter 'cmd' and hit return). Now cd to the location were you want to place the source directory.
Run:
darcs get http://www.daimi.au.dk/~cgd/openengine openengine
You now have the source!
Install CMake
Grab the latest windows installer from http://www.cmake.org/HTML/Download.html. When presented with the "Intall Options" dialog please choose "Add CMake to the system PATH" to ease later usage.
Install dependencies
For easy installation of all dependencies, download the bundled zip file: http://www.daimi.au.dk/~cgd/oe-win32-package.zip and extract it to the "libraries" directory inside the OpenEngine root directory.
If you wish to install the dependendcies manually, follow the instructions below
- Boost
- Grab the 1.34.1 installer from http://www.boost-consulting.com/boost_1_34_1_setup.exe In the intall dialog choose to install for your version of Visual Studio. When asked what to install choose the "Boot unit test framework" and the "Boost Filesystem". "Boot unit test framework" is only needed if you wish to run code from the tests directory.
- SDL
- Grab the Visual Studio build of SDL and unzip it to the "libraries/sdl" directory in the OpenEngine root directory.
- GLEW
- Grab the windows version glew-1.4.0-win32.zip of the OpenGL extension wrangler library and unzip it to the "libraries/glew" directory in the OpenEngine root directory.
- Doxygen
- Information on this is yet to come...
Generate project with CMake
cd to openengine root directory and run:
mkdir build cd build cmake ../
Notice that you should not use Cygwin for this, since CMake for some reason cannot make Glew. Instead use the windows command line tool; CMD.
Building with Windows SDK
TODO
install python and use the make.py
Building with Visual Studio
You should now have a Visual Studio project file in the build directory that will build the OpenEngine source. If you change your setup and add files to the CMakeLists.txt files you must remember to rerun cmake in the build directory to regenerate the project file for Visual Studio.
Note that cmake genererates two additional project targets on the Visual Studio/Windows? platform: ALL_BUILD and ZERO_CHECK. These targets has to be in the solution for the compiler and linker to work.
Running from Visual Studio
To run a given project, mark it as start-up project in it's right-click menu (Set as StartUp Project). Since Cmake cannot create the working directory of a project you must manually set this for each project; right-click --> properties --> Debugging --> Working-Directory. Set the working directory to "c:\code\opengine" (or where your project is). The project should now execute correctly when run with F5. Note that the Working-Directory must be set both for the Debug and Release configuration.
Note that for targets depending on dynamic link libraries (dll), these dlls should be accessable through the PATH environment variable. For convenience the dlls in the bundled zip files are copied into the "libraries/dlls" directory. By adding this directory to the PATH variable all required dlls should be accessable. If you have installed the dependendcies manually, please refere to the corresponding dependendcy's documentation for more information.
