Difference between revisions of "Compiling the Source Code"

From Open Surge Engine Wiki
Jump to: navigation, search
(Compiling the Source Code)
(Compiling: Windows - MinGW)
Line 50: Line 50:
 
You should now be ready for the final step.
 
You should now be ready for the final step.
  
== Compiling: Windows - MinGW ==
+
== Compiling Open Surge: Windows - MinGW ==
  
 
When using MinGW, make sure both lib\ and bin\ folders are listed on your PATH. If MinGW is installed on C:\MinGW\, simply open a Command Prompt (cmd) and type:
 
When using MinGW, make sure both lib\ and bin\ folders are listed on your PATH. If MinGW is installed on C:\MinGW\, simply open a Command Prompt (cmd) and type:

Revision as of 19:41, 21 December 2013

Stub
This article is a STUB. It's not complete and it's not guaranteed that the information is 100% correct

Compiling the Source Code

At some point you may want to compile the game/engine on your own, mostly if you are modifying the sources.

From here on, when GAMEDIR is mentioned, it means only the directory where you unpacked the game. GAMEDIR stores, among other things, this readme.html page and a file called CMakeLists.txt. In reality your GAMEDIR may be called anything else other than that.


Now we should download all the dependencies. It is recommendable that you extract the files in an easy to read folder structure. For example, on a main folder called "src", extract each dependency to its separate folder.

Let's go to http://alleg.sourceforge.net/download.html and download Allegro 4.4.2.. Extract the contents of the file into the folder where we are going to keep the dependencies.

You will also need some Allegro addons:

Link is Down :( Maybe we don't need it

Follow the instructions on the website. In the end you should have installed both loadpng and zlib.

Download the Static libogg libraries for MinGW, and extract into your MingW directory.


Now we need

Make sure you follow the Generic installation instructions, ONLY IF YOU GET IT FROM THERE. If you read on, you can have it a little easier.

For ease of access, here are the download links:

http://opensnc.sourceforge.net/alfont/mirror/AlFont209.rar (Original Alfont)

https://dl.dropboxusercontent.com/u/20216605/Alfont%20Mod/alfont.c (Modified Alfont, conveniently prepared for download).

Now, after downloading and extracting the Original Alfont, replace alfont/src/alfont.c with the modified alfont.c you just downloaded.

Now you should

  • Compile Alfont.

Follow the compilation process described in alfont/README.txt.

After running make, copy alfont/lib/mingw32/libalfont.a and alfont/include/* to the MingW directories, normally C:/MingW/lib , and C:/MingW/include .

You should now be ready for the final step.

Compiling Open Surge: Windows - MinGW

When using MinGW, make sure both lib\ and bin\ folders are listed on your PATH. If MinGW is installed on C:\MinGW\, simply open a Command Prompt (cmd) and type:

set PATH=%PATH%;C:\MinGW\bin;C:\MinGW\lib

On the same Command Prompt, please go to GAMEDIR and run the following commands:


cmake -G "MinGW Makefiles" .

mingw32-make


Note that little '.' at the end of the first command. If everything works well, opensurge.exe will be in GAMEDIR.