Downloading and Compiling under Windows
Here's a quick guide describing how to compile and debug Arx Fatalis under Windows using Visual Studio 2010. It should also work using Visual Studio 2008, given that you generate the right projects using CMake. Paths used here are only to give as an example...
- Visual C++ 2010 Express Edition: http://www.microsoft.com/express/Downloads/
- You can optionally install Visual Studio 2010 Service Pack 1: http://www.microsoft.com/express/Downloads/#2010-Service-Pack-1
- CMake: http://www.cmake.org/cmake/resources/software.html
- MinGW: http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/mingw-get-inst
- In the installer, make sure you check MSYS
- msysgit: Follow the setup described on GitHub: http://help.github.com/win-set-up-git/
- Optional: TortoiseGit: http://code.google.com/p/tortoisegit/
Getting the libs
Getting all libraries to work under Windows required a lot of work and was error prone... So we decided to provide prebuilt versions (32-bit and 64-bit) to simply the process. Arx Libertatis depends on the following libraries on Windows. Those followed by an asterisk are optional; depending on which backend you want to use they might not be needed.
- Boost - ArxWindows only contains the Boost source, it doesn't contain any prebuilt libraries, but those aren't needed for arx.
- OpenAL 1
1. We strongly recommend you use the [OpenAL Soft](http://kcat.strangesoft.net/openal.html) implementation of OpenAL. Creative's OpenAL implementation is severely limited, which can cause missing sounds in arx. OAL implementations from IHVs are just buggy and the cause for many crash reports.
Here's how to obtain them:
cd /c/Code/git git clone git://github.com/arx/ArxWindows.git
Then we need to tell cmake where to search for our libs
- Add CMAKE_PREFIX_PATH to your environment variable:
- if on windows 7 then here: http://arx.parpg.net/File:Win7_env.png
- After that, you need to start a new prompt (GitBash, Command Prompt, etc) so that the new environment variable is available
- Start a new GitBash instance
- Run the following: echo $CMAKE_PREFIX_PATH
- It should echo: C:\Code\git\ArxWindows\libs\zlib;C:\Code\git\ArxWindows\libs\freetype;C:\Code\git\ArxWindows\libs\openal;C:\Code\git\ArxWindows\libs\boost;C:\Code\git\ArxWindows\libs\opengl;C:\Code\git\ArxWindows\libs\sdl
Finally, copy the necessary dlls to C:\Code\git\ArxFatalis\bin\...
Getting the source code
cd /c/Code/git git clone git://github.com/arx/ArxLibertatis.git cd ArxLibertatis
Alternatively you can download a stable source code release and extract that:
There are several methods to get the Arx Libertatis source code - choose the one that suits you best:
Downloading a released version
The easiest way to get the AL source code is to download a versioned release. This will get you a reasonably up to date copy of the source code that has been tested to work.
- Arx Libertatis Source Code (mirror)arx-libertatis-1.1.2.tar.xz948 KiB
Cloning the repository
If you want the absolute latest version of the Arx Libertatis development code and stay up to date, you can clone the AL source code repository. Beware that this will give you the current master development branch that we are actively working on. While the code in that branch should always work, it hasn't undergone any significant testing. If you just want to play the game, consider using a released version instead.
To clone the repository, type:
git clone git://github.com/arx/ArxLibertatis.git
This creates a directory called ArxLibertatis and downloads the current source code from github.
Later if you want to update your local copy of the source code, run
Downloading a snapshot
Alternatively you can download the current snapshot of the source code repository as a .zip or .tar.gz file and extract that:
- Arx Libertatis Development Snapshot (tar.gz)latest snapshot of branch 'master'
- Arx Libertatis Development Snapshot (zip)latest snapshot of branch 'master'
This will give you the same code as cloning the repository, but won't let you update it without downloading everything again.
Generating VC++ projects
We'll use CMake for that
mkdir build_vc10 cd build_vc10 cmake .. -G "Visual Studio 10" -DUNITY_BUILD=1
- Open the solution in Visual Studio: C:\Code\git\ArxFatalis\build_vc10\ArxFatalis.sln
- If you use Visual C++ 2010, there's a bug causing all cpp files to be place in the root of the project... it is annoying but has no effect on the build itself. See http://public.kitware.com/Bug/view.php?id=11925. VC++ 2008 is fine.
- You can build the debug target (has debug symbols & can be debugged) or the release target (faster, but currently without debug information)
- Right click on the arx project and select "Properties..."
- Go to "Configuration Properties->Debugging"
- Change the "Working Directoy" property to "..\bin"
- Note that this needs to be done for each target you wish to build/debug
- Change full_screen to 0 in bin\cfg.ini, as debugging with a fullscreen dx windows is a pain
- Click the "debug" button (F5) and enjoy :D