This page explains the steps required if you wish to compile the game and/or editor from the source code. Each major operating system (Linux, OS X, Windows) uses a different procedure to compile the game. This page assumes that you already have the appropriate source downloaded and does not describe that process. Refer to either Mercurial Repository for how to grab the absolute latest source, or Download Instructions to download the latest source release package.
We typically support one and only one build system for each operating system. If you wish to use an alternative system, such as CMake or VisualStudio, you will need to create those build configurations yourself. If you run into issues and can't get the compilation to succeed, head over to the Technical Issues forum. There is a thread stickied there to report compilation issues, and you may find your answers already posted.
Allacrost uses the GNU Autotools build system to compile the source code. Before you begin, refer to the Library Dependencies page and make sure that your system has all of the necessary libraries installed (the build process will warn you if you're missing a required library). You will need both the run-time libraries and the development libraries for each dependency. For example, in Ubuntu there is a libsdl package as well as a libsdl-dev package for the SDL library. Note that you do not need to install the Luabind library, as that library is included in and compiled automatically along with the Allacrost source code.
1) Move to the directory where you downloaded the Allacrost source to 2) Run autoreconf to generate the configure script 3) Run the configure script. It will tell you if you have any unmet library dependencies. 4) Run make to build the source. This will take several minutes. 5) Run Allacrost or the Allacrost editor
The commands to do all these steps are below.
cd ~/mypath/allacrost autoreconf -i ./configure make ./allacrost ./allacrost-editor
Here are some additional tips:
- After running make, you can run make install to install the application on your system. This is not advised if you retrieved the source via the code repository. Installing from an official packaged release is okay.
- When running the configure script, you may wish to omit building of the editor via adding the -disable-editor option. This is useful if you are having problems with meeting all the QT library dependencies, but don't need to fix them as you do not intend to use the editor.
- When running the configure script, you can turn on debugging symbols by adding the option -enable-debug. This option is useful to have enabled if you are a developer or intend to help with some debugging efforts
- When running allacrost, you can add a debug option so that the game will print various warnings and other information to the screen as it runs. <t>-d all</tt> is most common and prints out all debugging information, but you can also enable debugging for only specific components, such as -d audio or --debug battle. -d and --debug are equivalent.
- When running allacrost, you can add a test option so the game starts directly from the developer's test menu. Use the -t or --test option. The test menu allows you to quickly jump between different maps, battles, and other modes found in the game.
You will need the Code::Blocks IDE set up with a working MinGW installation. The version of MinGW that comes bundled with the IDE may or may not work, but anything version 4.4 or later should work fine. Follow the steps below to get a working build.
- Download and install the latest Code::Blocks IDE
- If not using the MinGW bundled with the IDE, you must install MinGW on your system. Make sure to select all the standard C++ libraries in the installer.
- Grab a copy of the game's source code, either through the Mercurial repository or a release package.
- Go to the location on your system where you downloaded or unpackaged the code. In the "lib/" directory you should see a win32.zip file. Extract the contents of that file to the current directory (which will make paths like lib/win32/include, lib/win32/lib, etc)
- Open the "Allacrost.cbp" file to open the Hero of Allacrost project in Code::Blocks. Select your build target (release or debug) and then select the Build command. For clean builds, this will take several minutes to complete.
- If all went well and there were no errors, you should now have a allacrost.exe or allacrost-debug.exe file depending on the build target that you selected
- Copy all DLL files from lib/win32/lib/ to the directory containing the .exe. Otherwise the application will not be able to find the DLL when you execute it.
OS X Instructions
Allacrost uses XCode for building on OS X, and the official XCode project file is in the mercurial repository. In order to properly use it you will need the OS X Allacrost dependency package, which can be found here. Take the folder allacrost-dep/ in this archive and put it in the same directory that contains the directory of your working copy of the Allacrost code. For example, if your working copy of the Allacrost code is in a directory called demo/, then put allacrost-dep/ at the same level of hierarchy as demo/.
All libraries found in allacrost-dep/lib are universal.
All binaries found in allacrost-dep/bin are universal.
No initial modifications on your part should be necessary. Building and running the Allacrost executable from within the XCode project file should work right away. If not, double-check the Build Settings. There are some variables in the project file that may depend on your OS version (i.e. 10.7, etc). Depending on what you have, you may need to modify these appropriately. Select the Allacrost target, and select the Build Settings tab. Double-check the following variables: