Compiling FBA with MS Visual Studio (2010) and MinGW:: About this guideThe objective of this guide is to help developers setup their preferred environment to compile FB Alpha source. There has been multiple guides to setup different environments that will allow developers to compile older FB Alpha sources, but over the time new features that required specific libraries and / or headers have been added to FB Alpha, this is why new guides have been created to keep up with the newest requirements for a successful compilation of the FB Alpha source.
This guide will allow you to compile version 0.2.97.08 (released February 28, 2010), but may work with older FB Alpha sources as well (more information about compilation results with older sources will be posted soon).
This thread will be updated soon with the MinGW guide as well, I'm still preparing it. Other updates will be posted here as needed.
The previous guide I made is located here for documentation purposes, works with older FB Apha sources:
http://neo-source.com/index.php?topic=1041.0
:: RequirementsWindows Operative System ( XP / Vista / 7 ) (32 / 64 bit).
:: Microsoft Visual Studio Environment (2010)We will need to download the following packages from Microsoft download website before we begin:
:: Installation of PackagesAfter acquiring those installation packages proceed to install each one of them to your preferred location. The following installation path structure is the one I personally use:
E:\_ProgramFiles_\MS VStudio 10
E:\_ProgramFiles_\Microsoft SDKs\Windows\v7.1
E:\_ProgramFiles_\Microsoft DirectX SDK (June 2010)Note: Remember where you installed each one because we will need to use those paths soon.
:: Extra binaries / ToolsSince FB Alpha make use of various tools at build event we will need to download a few extra binaries that include the following:
- Perl 5.0
- Nasm 2.03
- UnixUtils
I made a package of the needed binaries, so there is no need to go around looking for each one. You can download the package here:
EDIT: New package uploaded, should compile without errors, I forgot to add some important PERL files and directory structures. I will upload all files to my personal server later because MegaUpload is a pain in the ass xD.The package should be extracted to a path of your preference. The following path is the one I personally use:
E:\fbaxbinsNote: Remember this path as well since we will use it soon.
:: Old DirectX LibrariesFB Alpha make use of some old DirectX libraries and since Microsoft doesn't include some of them in the newer SDKs we will have to manually include them to where we installed the new DirectX SDK. The needed libraries and header files must be extracted from the DirectX SDK - August 2007. These are the files:
include\d3d.h
include\d3dcaps.h
include\d3dtypes.h
include\d3dvec.inl
lib\x86\ddraw.lib
lib\x86\dinput.lib
lib\x86\dxguid.lib (this file must overwrite the newer SDK one, a backup of the file is recommended)
lib\x64\ddraw.lib
lib\x64\dinput.lib
lib\x64\dxguid.lib (this file must overwrite the newer SDK one, a backup of the file is recommended)
You can extract these files from the original DirectX SDK from August 2007, or you can download a package I made here:
After downloading you must extract the contents and drag them to your DirectX SDK directory, for example in my case it would be here:
E:\_ProgramFiles_\Microsoft DirectX SDK (June 2010)Windows will prompt you to update / overwrite contents of the directories, when that happens press OK.
:: Creating a .CMD / .BAT fileNow we are going to create a CMD / BAT file that will allow us to setup everything with a few commands, execute the build event and leave us with a FBA build ready to use.
Open Notepad, copy and paste the following commands (you must edit the paths according to where you installed everything):
EDIT: Updated with new FBA Extra binaries.ECHO OFF
CLS
SET VSTools="E:\_ProgramFiles_\MS VStudio 10\VC"
CALL "E:\_ProgramFiles_\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86 /xp /Release
CALL "E:\_ProgramFiles_\Microsoft DirectX SDK (June 2010)\Utilities\bin\dx_setenv.cmd"
CALL "E:\_ProgramFiles_\MS VStudio 10\VC\vcvarsall.bat"
PATH = E:\fbaxbins_v2\unixutils\bin;%path%
PATH = E:\fbaxbins_v2\perl\bin\MSWin32-x86;%path%
PATH = E:\fbaxbins_v2\nasm-2.03.01;%path%
MAKE vc
ECHO _
ECHO FB Alpha Compilation done. [MSVC Tools Environment]
ECHO _
PAUSE
Save the file as a .CMD or .BAT file in the FB Alpha Source directory, where Makefiles are located ( Ex. E:\fba_src ), you can do that by writting the extension in the Save dialog after the file name, for example: vc_make.cmd, then click Save.
:: CompileFinally run the .CMD / .BAT file, sit back and wait while your FBA build is compiled
.
:: MinGW Environment (Coming Soon!)SeeYaa!