Author Topic: [Guide] Build FB Alpha using MinGW/GCC-4.9.2 (x86 / x64) (rev. 2015)  (Read 7336 times)

Offline CaptainCPS

  • Administrator
  • *****
  • Posts: 1520
  • Karma: +126/-0
  • FB Alpha Team
    • CaptainCPS's Home
[Guide] Build FB Alpha using MinGW/GCC-4.9.2 (x86 / x64)



Welcome to my new 2015 guide that will help those people interested to compile the latest FB Alpha sources. I made this guide as simple and short as possible, I personally made the procedure before writing this up, to make sure everything is all good. As reference, my system is: Windows 8.1 (x64).

This guide might get updated in the future if needed, so check back later if you're interested.

Everything you will find here is based on the original guide by Barry at: http://www.barryharris.me.uk/fba_compile_mingw64.php ; the only difference is that I shortened a few steps as you will see.

No environment variables will be added to Windows, the resulting build environment will serve for the main purpose of compiling FB Alpha. In case you want to uninstall / remove the build environment, you can just remove the installed files and no programs will be affected by this.

I - REQUIREMENTS


Before you proceed you must download the following Self Executable / RAR I prepared that already has TDM-GCC Compiler Suite v4.9.2-3, NASM v2.11.08 and the GNU Utils.

1 - tdm64-gcc-4.9.2-3_MinGW64_NASM_GNUUTILS.exe [102 MB]

The only separate requirement is Active Perl, you must go to the following link and download the one that suit you most (x86 or x64):

2 - http://www.activestate.com/activeperl/downloads

Finally, you will need of course, FB Alpha Latest Source:

3 - http://www.barryharris.me.uk/fba_downloads.php

II - INSTALLING THE COMPILER SUITE


1 - Install / Extract tdm64-gcc-4.9.2-3_MinGW64_NASM_GNUUTILS.exe to c:\mingw64



2 - Install ActivePerl to c:\Perl (assuming you got the x86 version) or c:\Perl64 (for the x64 version)





Note: Make sure to deselect the check boxes, as displayed in the following image:



III - PREPARING FB ALPHA SOURCE


1- Extract fba_src_xxxxxx.7z to c:\fba_dev\fba_src_xxxxxx\

IV - CREATING A BATCH / CMD FILE


A Batch or Cmd is a text-based file that will help us compile FB Alpha easily without having to open Windows Command Prompt, it will automatically summon the Command Prompt and execute the desired commands. Remember to run it as Administrator to avoid any issues with the system.

1- Create a new .TXT document on c:\fba_dev\fba_src_xxxxxx\ and rename it to compile_mingw_gcc492.cmd
2- Open it in NOTEPAD, then COPY / PASTE the following and SAVE it:

Quote
@ECHO OFF
@SET "PATH=c:\mingw64\bin;c:\Perl64\bin"

@mingw32-make mingw471

@PAUSE

V - COMPILING / BUILDING FBA


1- Run compile_mingw_gcc492.cmd (as administrator if you encounter any system access issues)







2- After the process end you will have fba.exe in the same directory. COPY it to another directory before running / testing it, if you want to avoid having many directories created in your FB Alpha Source / development directory.

Note: If you want to build the x64 version of FBA just modify the CMD file with this:

Quote

@mingw32-make mingw471 BUILD_X64_EXE=1

and if you want to build a debug FBA version this:

Quote

@mingw32-make mingw471 BUILD_X64_EXE=1 DEBUG=1

These are located in the makefile, so you could comment/un-comment them as well.

Enjoy!

SeeYa!
:D
« Last Edit: April 08, 2015, 08:47:39 pm by CaptainCPS »

Offline CaptainCPS

  • Administrator
  • *****
  • Posts: 1520
  • Karma: +126/-0
  • FB Alpha Team
    • CaptainCPS's Home
Re: [Guide] Build FB Alpha using MinGW/GCC-4.9.2 (x86 / x64) (rev. 2015)
« Reply #1 on: April 08, 2015, 08:53:20 pm »
Updated guide with latest build environment (GCC 4.9.2 / MinGW64 / etc) :)

Tested on my actual system, Windows 8.1 (x64), but let me know if you encounter any problem.

SeeYa!
 :biggrin:

Offline Huggybaby

  • Jr. Member
  • **
  • Posts: 92
  • Karma: +2/-0
Re: [Guide] Build FB Alpha using MinGW/GCC-4.9.2 (x86 / x64) (rev. 2015)
« Reply #2 on: April 17, 2015, 04:39:54 pm »
Thanks for the update. :)

Where do I find the latest source? The one linked doesn't seem to include all the newest changes.

<edit> NM, it's classified.
« Last Edit: April 18, 2015, 12:37:23 am by Huggybaby »

Offline robsons2007

  • Jr. Member
  • **
  • Posts: 61
  • Karma: +0/-0
Re: [Guide] Build FB Alpha using MinGW/GCC-4.9.2 (x86 / x64) (rev. 2015)
« Reply #3 on: October 17, 2015, 09:53:37 am »
 CaptainCPS
the fba not have support for xp Windws?

Offline Fighterchar

  • Newbies
  • *
  • Posts: 20
  • Karma: +0/-0
Re: [Guide] Build FB Alpha using MinGW/GCC-4.9.2 (x86 / x64) (rev. 2015)
« Reply #4 on: February 06, 2018, 11:42:12 pm »
I do all  but I have a problem I cant to open compile_mingw_gcc492.cmd in cmd only en TXT

Offline Loggan08

  • Newbies
  • *
  • Posts: 3
  • Karma: +0/-0
Would it be possible to do a .vcproj for the 'lazy' like me.