Difference between revisions of "Compilation Instructions"
|Line 38:||Line 38:|
== Windows Instructions ==
== Windows Instructions ==
build process the Code::Blocks IDE MinGW . to for .
== OS X Instructions ==
== OS X Instructions ==
Revision as of 02:48, 4 September 2016
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.
|Note: 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.|
|Note: If you are having difficulties with compilation, go to the forums for help. The Programming or Technical Issues sections are where you can find assistance.|
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 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.
We only support one build process for Windows at the moment. 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 4.4 or later should work fine. Note that while you may choose to use another build system like Visual Studio, you will have to spend time figuring out how to get that build process working for Allacrost.
Follow these steps 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 either the latest source release package, or create a fork of our Mercurial repository and clone a local copy to your system (the latter may take some time as it also downloads revision history)
- Go to the location on your system where you downloaded or unpackaged the code. Go to the "lib/" directory and you should see a win32.zip file. Extract the contents of that file to the current directory
- 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
- 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.
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: