This wiki page intends to explain how to compile the game on Ubuntu 12.04 LTS x86_64. The initial content of this articles comes from this forum post
- Getting the tools
- Getting the code
There are few reasons that may motivate you from compiling SG from source:
- You want to do some beta testing
- You want to discover the new changes in the game code.
- Baller bude's code base doesn't give any binaries, so you may want to create yours manually
- Or, you wanna get the x86_64 version of the game that is not provided in the official installers.
Getting the tools
For this step, we will simply just install the required tools to get the code, compile and run it. For that matter, open the terminal and just type:
sudo apt-get build-dep ioquake3
Since SG is based on ioquake3, we are simply getting the same dependencies of them. For the compiling tools and code management, just type this other command:
sudo apt-get install build-essential git zip
And that's all! Next step!
Getting the code
This step is the easiest, just use git to download the code from GitHub with this command in your terminal:
git clone https://github.com/smokin-guns/SmokinGuns.git
It will create a folder named SmokinGuns in your home folder with all the source code.
This is where it starts to be fun From your home folder, just get in the SmokinGuns folder via the terminal with
And from here, only one more step is required for compilation, just type:
It will compile the game. If you have a multi core machine, you can use the -j<cores> option to compile faster. For example, if you have a quad core machine, just run make -j4. If you have a machine that can run both 32 and 64 bits softwares, you also may be able to compile for the i386 platform with setarch i386 make. The new binaries will be now in a sub-folder named build/release-linux-x86_64/ (x86_64 could be i386 or just x86 depending of the git revision and your machine). We just need to move now those compiled files to our existing game installation.
So, from the SmokinGuns folder, move to this folder with:
And copy the new files to your SG installation with:
cp *.x86_64 /where/you/installed/the/game/ # it could be some *.i386 or *.x86 files if you are on a 32 bit system cp *.so /where/you/installed/the/game/ # if there are any
There are also some compiled files that are called QVM that needs to be put in the SG installation, from where you have been, just do:
cd smokinguns/ zip -r z_vm.pk3 vm/ mv z_vm.pk3 /where/you/installed/the/game/smokinguns/
And that's all!
When there is a new change in the game source code, you may want to see it too. You don't actually need to redo the whole compile process for that matter, just open a terminal and do:
cd SmokinGuns/ git pull
It will update the code, you will be notified if something changed since last download. If something actually changed, you just need then to redo the compilation process and you will be ready to test again.
- If it doesn't compile for some reason when you just updated the code, try to remove the build folder and try to compile again. If it doesn't make the trick, contact the developers via the forum.
- If you spot any bug while testing, just contact the developers via the forum or make a bug report (you will still need a forum account to log in here, in small caps).
- If you want to play with the sources, I suggest you to learn git (especially the checkout command), there are plenty of tutorials around.
- For some other problems, don't be scared to contact any developer or me (#smokinguns on freenode, this forum, email, etc.)