Difference between revisions of "Compiling the source code"
(→POSIX systems) |
m (→Main Method) |
||
Line 5: | Line 5: | ||
===Main Method=== | ===Main Method=== | ||
Click here to download the version of Codeblocks with the mingw compiler: | Click here to download the version of Codeblocks with the mingw compiler: | ||
− | [http:// | + | [http://kids.platinumarts.net/codeblocks.exe] |
Then go into your /src/mingw folder. Click on sandbox.cbp and codeblocks should load up. Go to build and then build and it should create the Windows binary :) | Then go into your /src/mingw folder. Click on sandbox.cbp and codeblocks should load up. Go to build and then build and it should create the Windows binary :) |
Revision as of 17:24, 15 July 2008
This page discusses on how to modify and compile the source code.
Contents
Windows:
Main Method
Click here to download the version of Codeblocks with the mingw compiler: [1]
Then go into your /src/mingw folder. Click on sandbox.cbp and codeblocks should load up. Go to build and then build and it should create the Windows binary :)
Other Methods: There is a visual C++ project file included that you can use. Load up the proper file and compile :) I'm not sure if you'd need any libraries but you probably shouldn't need any.
POSIX systems
You may need to convert some of the text file from dos format. There's a handy program to do it with so you may need to install and use tofrodos
Linux
NOTE The Binaries are compiled for 32 bit systems, so if you're on a 64 bit system, you'll have to 1) compile your own, by using modified versions of the below instructions, or 2) install and use 32 bit libraries.
Makefile
First of all, make sure you have the the SDL and GLUT development libraries installed on your system. Next up, go into src folder. and type 'make', you can add one of the following at the end of the line
- all
- libenet
- clean
- client
- server
- install
The compile automatically defaults to 'all'
Chances are, you won't have everything you needed installed, so if you receive any errors from missing devel libraries and frameworks, just installed them too. if you receive errors similar "bash: ./configure: /bin/sh^M: bad interpreter" you'll need to use 'fromdos' to convert them to unix friendly files.
Debug
If you're interested in compiling a version with debugging symbols, just follow the instructions.
- first, open the Makefile with a text editor,
- next, you'll need to add '-ggdb3' somewhere in the 'CXXOPTFLAGS' list. It's normally recommended to clear everything else out of there. you're not meant to optimise and debug simultaneously.
- thirdly, scroll down to near the end, and remove all the lines with 'strip' in them
- finally, you may wish to change the PLATFROM_PREFIX to something else, like debug for example.
MAC OSX
Compiling in OSX is a bit harder, you need to install the following frameworks before you can even attempt it
- SDL
- SDL_Mixer
- SDL_Image
Xcode
OSX developers normally use the XCODE IDE, you're in luck as PAS ships with an Xcode project file.
Just select the appropriate release version (release, debug, etc), and build the client, and probably the launcher to. If any errors occur, make sure the right frameworks are installed.
X11/Terminal
Make sure you have a compiler installed (if you did install Xcode, they should already be there), along with the right frameworks.
Now it's merely a replica of the Linux instructions in where you cd to the right directory and typing 'make' to compile it
FreeBSD
Unwritten