TracNav
- Introduction
- Credits and Contributors
Overview
Zen Core
Zen Engine
Zen Enterprise
Miscellaneous
Contents
Compiling ZOSS on Windows
This instructions are for compiling ZOSS on Windows using Visual Studio.
Setting up your development environment
You're going to want to put your game development in a separate directory / folder on your hard drive. Personally, I use C:\dev for this, but you can use whatever you want. When you install Zen Engine and Zen Studio using the Windows installer, it installs it to C:\IndieZen, so that's a valid option.
Whatever your decision, just remain consistent. When I indicate "C:\dev" in these instructions, you need to translate that into your root game development directory.
Dependencies
Follow these instructions to install (and in some cases, compile) software that ZOSS requires.
Mandatory:
- CMake - Build system
- Lua - Build system and primary scripting language for ZOSS.
- libxml2 - Used by Zen Core plugin system for parsing plugin and configuration XML files.
- Boost - Used throughout ZOSS
- Version control system
- Subversion - Used to download source code (and commit if you make changes you wish to share)
- Mercurial
Optional:
- LuaSVN - Integrates Subversion and Lua. Only needed if you use Subversion.
- wxWidgets - Only used by Zen Studio
- Ogre - Used by ZOgre and is the primary rendering engine for Zen Engine. Currently it is the only supported rendering engine.
- Ogre dependencies - If you use Ogre, I also recommend using CEGUI and OIS.
- Newton - Used by the ZNewton plugin
- Python - Used by the ZPython plugin
If you install Python and you intend on using that for your games using Zen Engine, that will work, but you're still required to install Lua since it's used by the build system.
CMake
Download CMake 2.6.4.
Use the option "Add CMake to the system PATH for all users" or "... for current user".
Everything else, I suggest using the defaults.
Subversion command-line client
You don't need this if you're using Mercurial.
Download CollabNet Subversion Command-Line Client and install it using defaults. If it asks if you want to add SVN to your PATH, answer yes.
libxml2
ZOSS uses libxml2 for xml parsing. libxml2 should reside in a subfolder of your main dev folder (i.e. dev\libxml2).
Download libxml2-2.6.30+.win32.zip and iconv-1.9.2.win32.zip and extract them to your dev folder.
I copied all of C:\dev\iconv-1.9.2.win32\*.* to C:\dev\libxml2-2.6.30+.win32.
Rename C:\dev\libxml2-2.6.30+.win32 to C:\dev\libxml2.
Boost
Boost.org libraries are a set of libraries that enhance C++ Standard Template Library. If you're a C++ programmer, you likely already have it downloaded and installed. If not, you'll need it.
For ZOSS on Windows we are currently using Boost 1.35.0. Although I think ZOSS works with newer versions of Boost, I've not tried them so I cannot guarantee anything. If you have a newer version installed and you use it, please let me know if it works or not. If it doesn't work, we'll do our best to accommodate your needs.
You can install Boost by downloading the source code and compiling it or by using the Boost Pro installer.
Either way, this can take a few hours. Please allocate enough time.
Boost Source
Download boost_1_42_0.zip or whatever file is appropriate for you.
Note: Although we originally used Boost 1.35, we've recently found this bug that makes it so we can no longer use Boost 1.35. I'm in the process of testing version 1.42.
If you've already got it installed somewhere on your hard disk that's fine. I use C:\boost-build.
Note: What worked best for me was to download boost to C:\boost-build, then using a Visual Studio 2005 Command Prompt, use the following commands:
C: cd \boost-build\boost_1_42_0 bootstrap.bat bjam debug release threading=multi link=shared runtime-link=shared --with-system --with-serialization --with-filesystem --with-program_options install
If you use a --prefix= then you will need to set an environment variable BOOST_ROOT to point the same location.
Build and install it using the instructions located here.
Boost Pro
You can download and install Boost Pro.
When you are installing Boost you will want it to be a subfolder of your /dev folder. When installing it should be installed
C:\dev\boost\boost_1_35_0
If you have it install differently you will have to change some environmental variables in your Core build of ZOSS but we will talk about that further in a bit.
During the Boost install you will need to Select Default Variants. You will want to select all the check marked options listed like this screenshot:
Click on Next.
Lua
Download and install Lua for Windows using the default parameters.
Lua SVN
Note: This is only needed if you're using the Subversion repository. If you're using a Mercurial repository then you can skip this dependency.
Download luasvn.zip and unzip svn.dll to Lua\clibs\svn.dll.
If you installed Lua using the defaults, that should be C:\Program Files\Lua\5.1\clibs.
wxWidgets 2.9.0
Download wxMSW-2.9.0-Setup.exe.
Install it, preferably using the defaults.
Using Windows Explorer, navigate to C:\wxWidgets-2.9.0\build\msw and open wx_dll.dsw and let Visual Studio upgrade the solution and projects. Build both DLL Debug and DLL Release configurations. Don't worry if the odbc project fails (we don't use it).
You will also have to modify cmake-2.6\Modules\FindwxWidgets.cmake. If you installed wxWidgets in the default location, it should be located at C:\Program Files\CMake 2.6\share\cmake-2.6\Modules.
Changes:
# Find wxWidgets multilib libraries.
FOREACH(LIB core adv aui html media xrc dbgrid gl qa richtext)
FIND_LIBRARY(WX_${LIB}${_DBG}
to
# Find wxWidgets multilib libraries.
FOREACH(LIB core adv aui html media xrc dbgrid gl qa richtext propgrid)
FIND_LIBRARY(WX_${LIB}${_DBG}
and change:
# Clear wxWidgets multilib libraries.
FOREACH(LIB core adv aui html media xrc dbgrid gl qa richtext)
to
# Clear wxWidgets multilib libraries.
FOREACH(LIB core adv aui html media xrc dbgrid gl qa richtext propgrid)
Getting ZOSS Source Code
Subversion
Using the Command Prompt for your version of Visual Studio:
C: cd \dev mkdir Zen cd Zen svn co svn://www.indiezen.org/zoss/Setup/trunk Setup lua Setup\Package\zpkg.lua svn co
This will download all of ZOSS from Subversion using zpkg.lua?
Mercurial
C: cd \dev hg clone https://indiezen.googlecode.com/hg/ indiezen
NOTE: As of Feb 12 2010 you may want to use Tony's development Mercurial repository. There are some bugs in the build system of the root repo and it will not build correctly.
hg clone https://linterra-physics-scripting-indiezen.googlecode.com/hg/ indiezen
Other dependencies
The build system won't build plugins that don't have the required dependencies installed. If you don't need them, don't install the dependencies.
Other dependencies include Ogre, CEGUI, OIS, Newton, MySQL, etc.
OGRE, CEGUI, OIS
These instructions are incomplete.
These three libraries are the most commonly used for Zen Engine, so I'll lump them all together.
Currently, Zen Engine's ZOgre plugin uses the head of OGRE's 1.7 branch until OGRE 1.7 is released.
On Windows, you need to download and install DirectX SDK – August 2009. It's possible to use OpenGL only, but if you end up compiling other tools such as Ogitor then you're going to need DirectX. You might as well get it and install it now if you don't already have it.
Get the source code from the OGRE Subversion repository and put it into C:\dev\ogre-src:
cd C:\dev svn co https://svn.ogre3d.org/svnroot/ogre/branches/v1-7 ogre-src
Download and install the OGRE dependencies. You'll have to go to the appropriate ogre-dependencies list and grab the latest. For Visual Studio 2005 I'm using version 1.4.6 OgreDependencies_VC8SP1_Eihort_20071227.zip.
Extract the zip to C:\dev\ogre-src, which makes C:\dev\ogre-src\Dependencies have the dependencies.
Build instructions:
mkdir C:\dev\ogre-build cd C:\dev\ogre-build cmake-gui ..\ogre-src
The last command will present you with a CMake GUI. Click on the Configure button.
When you're done, choose the appropriate project generator and click on the Finish button.
From here I recommend you follow these instructions starting with "Running CMake". It provides you with a description of the CMake variables / options.
If you're missing some dependencies (DirectX 9?) then it's possible that some of the fields will be red. Fix those before proceeding.
A few things I change:
| CMAKE_BUILD_TYPE | Optimized |
| CMAKE_INSTALL_PREFIX | C:/dev/ogre-build/sdk |
| OGRE_DEPENDENCIES_DIR | C:/dev/ogre-src/Dependencies |
| OGRE_USE_BOOST | False |
| OGRE_CONFIG_THREADS | 0 |
After you've configured Ogre and you've generated the project files, navigate to C:\dev\ogre-build and open OGRE.sln.
Build the ALL_BUILD project and then build the INSTALL project for both Debug and Release.
It's possible that you could simply build the INSTALL project and that might build ALL_BUILD as a dependency but I've not tried that.
Compiling ZOSS
Do not proceed with this step until you have successfully completed all previous steps, otherwise this step will fail.
To compile ZOSS, we generally use an "out of source" compile, which means that we don't clutter our SVN workspace with a bunch of extra files generated by the build.
Starting CMake is relatively easy if you've followed the instructions so far.
Using the Command Prompt for your version of Visual Studio:
SET OGRE_CTHUGHA=C:\dev\ogre-build\sdk SET DEPENDENCIES_HOME=C:\dev C: cd \dev mkdir build cd build cmake-gui ..\Zen\build\CMake
NOTE: You may also need to set an BOOST_ROOT environment variable if you used --prefix= when you built Boost. Ste this prior to running cmake-gui.
NOTE: If you use Mercurial, the final command should be:
cmake-gui ..\indiezen\Zen\build\CMake
This will open a CMake GUI. Click on the "Configure" button. This will set up the environment variables. Look at the output window to see if there are any errors.
Make any modifications you want to the environment variables and click on "Configure" again. Once you have everything setup and no errors, click on the "Generate" button.
This will generate the IndieZen.sln appropriate to the Visual Studio Command Prompt you used. If you have more than one version of Visual Studio installed, it's possible to create IndieZen.sln files for multiple versions of Visual Studio, but make sure you don't try to use C:\dev\build for all of them. Keep the generated CMake build files in different directories.
Navigate to C:\dev\build and open the IndieZen.sln file. Now you're ready to compile... just hit the compile button.
Resolving Problems
If you missed a step or followed a step incorrectly, you're likely to hit problems. Please ask for help in IRC or on the forums. We'll be happy to help and we'll update these instructions if clarification is necessary.
If for some reason you get an error (missing: wxWidgets_FOUND) then try this:
SET wxWidgets_ROOT_DIR=C:/wxWidgets-2.9.0
If that doesn't solve the problem, make sure you added propgrid to the FOREACH(LIB statements (see the instructions in the wxWidgets section on this page).
If that also fails, delete your C:\dev\build folder and re-run CMake.
Again, if you used --prefix= when you installed Boost, you need to set the BOOST_ROOT environment variable prior to executing cmake-gui.

