FB Alpha

Compile Guides

Compiling FB Alpha using MinGW with GCC 3.4.5
 

There are three compile guides on this page (MinGW with GCC 3.4.5, MinGW64 with GCC 4.7.1, and Microsoft Visual Studio 2013. Use the dropdown below to view each guide.

Guide to Compiling FB Alpha using MinGW with GCC 3.4.5

This guide was updated on the 30th of April 2015 with updates to the latest versions of the tools.

This guide will help you to setup an environment to compile FB Alpha using MinGW and GCC version 3.4.5.

The guide is aimed at people who have basic Windows skills and can understand instructions such as download and extract.

Note - this guide is intended for use with FB Alpha versions 0.2.97.09 and newer.

Initial Setup

MinGW

These tools are rather old now, but still stable and relatively small. For this reason, it is easier for me to offer a package to download for you to extract.

MinGW/GCC 3.4.5 Compiler Packagemingw345.7z

Extract this package to your system - this guide assumes you unzip the package to c:\mingw345.

Perl

Perl is required to dynamically generate the driverlist and some other modules. Perl can be downloaded at http://www.activestate.com/activeperl/. The version used in this guide is 5.20.2. The free community version is perfectly adequate for our use. Setup is as easy as downloading and installing. The installer should add it's bin folder to your PATH environment variable.

FB Alpha Source

Download the FB Alpha source code and extract it into a folder on your machine. For the purpose of this guide we will be using c:\fbasrc. After the source is extracted open a command prompt window and change to the c:\fbasrc folder. This can be achieved by typing (substitute your FB Alpha source folder where appropriate);

cd \fbasrc

and pressing Enter.

Next, we need to add the compile environment to our path. To do this, type the following (substitute your MinGW folder where appropriate);

path=c:\mingw345\bin;%PATH%

and press Enter.

Finally, type;

mingw32-make mingw345

and press Enter.

This will build the program and take between 5 and 15 minutes depending on your computer. When the build is complete you will have an fba.exe to run.

If you are looking to do any development work, then it may be useful to turn on the debug features. Simply uncomment the

DEBUG = 1

line in the main makefile to build a debug version of the program.

Guide to Compiling FB Alpha using MinGW64 with GCC 4.9.2

This guide was updated on the 30th of April 2015 with updates to the latest versions of the tools.

This guide will help you to setup an environment to compile FB Alpha using MinGW64 and GCC version 4.9.2.

I have listed the version number of each package used, these are current at the time of writing and it is advised that you use these versions unless you are capable of fixing any problems that arise from not using them.

The guide is aimed at people who have basic Windows skills and can understand instructions such as download and extract.

Note - this guide is intended for use with FB Alpha versions 0.2.97.28 and newer.

Initial Setup

MinGW64

The first thing we need to do is download the MinGW64 packages that we will be using. For the purpose of this guide, we will be using the version from http://tdm-gcc.tdragon.net/. You will need the following packages to build FB Alpha:

Bundle Installer (tdm64-gcc-4.9.2-3)tdm64-gcc-4.9.2-3.exe

This bundle installer needs to be downloaded and installed. This guide assumes you install to the default location of c:\mingw64.

GNU Utils

We need some small helper programs to help with the build. Download the package below and extract to your c:\mingw64 folder.

GNU Utilsgnu_utils.zip

NASM

We also need NASM to assemble some of the CPU cores, and other modules. NASM can be downloaded at http://www.nasm.us. The version used in this guide is 2.11.08. The file to download is nasm-2.11.08-win32.zip. Download this file and extract it to a temporary location. Place the nasm.exe file in your c:\mingw64\bin folder.

Perl

Perl is required to dynamically generate the driverlist and some other modules. Perl can be downloaded at http://www.activestate.com/activeperl/. The version used in this guide is 5.20.2. The free community version is perfectly adequate for our use. Setup is as easy as downloading and installing. The installer should add it's bin folder to your PATH environment variable.

FB Alpha Source

Download the FB Alpha source code and extract it into a folder on your machine. For the purpose of this guide we will be using c:\fbasrc. After the source is extracted open a command prompt window and change to the c:\fbasrc folder. This can be achieved by typing (substitute your FB Alpha source folder where appropriate);

cd \fbasrc

and pressing Enter.

Next, we need to add the compile environment to our path. To do this, type the following (substitute your MinGW folder where appropriate);

path=c:\mingw64\bin;%PATH%

and press Enter.

Finally, type;

mingw32-make mingw471

and press Enter.

This will build the program and take between 5 and 15 minutes depending on your computer. When the build is complete you will have an fba.exe to run.

If you are looking to do any development work, then it may be useful to turn on the debug features. Simply uncomment the

DEBUG = 1

line in the main makefile to build a debug version of the program.

64-bit Executable

To build a 64-bit executable, simply uncomment the

BUILD_X64_EXE = 1

line in the main makefile.

This will work exactly the same as the normal compile, but the resuling file will be called fba64.exe.

Guide to Compiling FB Alpha using Visual Studio Express 2013

This guide was updated on the 30th of April 2015.

This guide will help you to setup an environment to compile FB Alpha using Visual Studio Express 2013 for Windows Desktop. This guide will also use some of the tools from the MinGW guides so ensure at least one of these is setup first.

I have listed the version number of each package used, these are current at the time of writing and it is advised that you use these versions unless you are capable of fixing any problems that arise from not using them.

The guide is aimed at people who have basic Windows skills and can understand instructions such as download and extract. The default installation folders are recommended, if you install to other locations then you will need to change some of the later commands.

Note - this guide is intended for use with FB Alpha versions 0.2.97.28 and newer.

Visual Studio Express 2013 for Windows Desktop

Download and install Visual Studio Express 2013 for Windows Desktop.

DirectX June 2010 SDK

Download and install the June 2010 SDK.

FB Alpha Source

Download the FB Alpha source code and extract it into a folder on your machine. For the purpose of this guide we will be using c:\fbasrc. After the source is extracted open a command prompt window and change to the c:\fbasrc folder. This can be achieved by typing (substitute your FB Alpha source folder where appropriate);

cd \fbasrc

and pressing Enter.

Next, we need to add the compile environment to our path. The easiest way to achive this is to use the batch file below;

@echo off

call "C:\Program Files\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86

call "C:\Program Files\Microsoft DirectX SDK (June 2010)\Utilities\bin\Dx_Setenv.cmd" x86

path=C:\mingw345\bin;C:\perl\bin;%PATH%

Copy and paste the above into a batch file and amend the paths as necessary for your setup.

Execute the batch file from a command prompt window and then type;

mingw32-make vc

and press Enter.

This will build the program and take between 5 and 15 minutes depending on your computer. When the build is complete you will have an fba.exe to run.

If you are looking to do any development work, then it may be useful to turn on the debug features. Simply uncomment the

DEBUG = 1

line in the main makefile to build a debug version of the program.

64-bit Executable

To build a 64-bit executable, simply uncomment the

BUILD_X64_EXE = 1

line in the main makefile.

You will also need to alter your batch file slightly to use a 64-bit development environment. The following batch file can be used;

@echo off

call "C:\Program Files\Microsoft Visual Studio 21.0\VC\vcvarsall.bat" x86_amd64

call "C:\Program Files\Microsoft DirectX SDK (June 2010)\Utilities\bin\Dx_Setenv.cmd" x64

path=C:\mingw345\bin;C:\perl\bin;%PATH%

Copy and paste the above into a batch file and amend the paths as necessary for your setup.

Execute the batch file from a command prompt window and then type;

mingw32-make vc

and press Enter.

This will work almost exactly the same as the normal compile, but the resuling file will be called fba64.exe.