Changes between Initial Version and Version 1 of SmokinGuns/Building/linux


Ignore:
Timestamp:
Dec 24, 2013 4:58:32 PM (4 years ago)
Author:
barto
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SmokinGuns/Building/linux

    v1 v1  
     1= Introduction = 
     2This 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 [http://forum.smokin-guns.org/viewtopic.php?f=22&t=3316 forum post] 
     3 
     4= Content = 
     5* Why 
     6* Getting the tools 
     7* Getting the code 
     8* Compilation 
     9* Update 
     10* Troubles 
     11 
     12== Why == 
     13There are few reasons that may motivate you from compiling SG from source: 
     14* You want to do some beta testing 
     15* You want to discover the new changes in the game code. 
     16* Baller bude's code base doesn't give any binaries, so you may want to create yours manually 
     17* Or, you wanna get the x86_64 version of the game that is not provided in the official installers. 
     18 
     19== Getting the tools == 
     20For 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: 
     21{{{ 
     22sudo apt-get build-dep ioquake3 
     23}}} 
     24Since SG is based on ioquake3, we are simply getting the same dependencies of them. 
     25For the compiling tools and code management, just type this other command: 
     26{{{ 
     27sudo apt-get install build-essential git zip 
     28}}} 
     29And that's all! Next step! 
     30 
     31== Getting the code == 
     32This step is the easiest, just use git to download the code from [https://github.com/smokin-guns/SmokinGuns GitHub] with this command in your terminal: 
     33{{{ 
     34git clone https://github.com/smokin-guns/SmokinGuns.git 
     35}}} 
     36It will create a folder named {{{SmokinGuns}}} in your home folder with all the source code. 
     37 
     38== Compilation == 
     39This is where it starts to be fun  From your home folder, just get in the {{{SmokinGuns}}} folder via the terminal with 
     40{{{ 
     41cd SmokinGuns/ 
     42}}} 
     43And from here, only one more step is required for compilation, just type: 
     44{{{ 
     45make 
     46}}} 
     47It 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. 
     48 
     49So, from the {{{SmokinGuns}}} folder, move to this folder with: 
     50{{{ 
     51cd build/release-linux-x86_64/ 
     52}}} 
     53And copy the new files to your SG installation with: 
     54{{{ 
     55cp *.x86_64 /where/you/installed/the/game/ # it could be some *.i386 or *.x86 files if you are on a 32 bit system 
     56cp *.so /where/you/installed/the/game/ # if there are any 
     57}}} 
     58There 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: 
     59{{{ 
     60cd smokinguns/ 
     61zip -r z_vm.pk3 vm/ 
     62mv z_vm.pk3 /where/you/installed/the/game/smokinguns/ 
     63}}} 
     64And that's all! 
     65 
     66== Update == 
     67When 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: 
     68{{{ 
     69cd SmokinGuns/ 
     70git pull 
     71}}} 
     72It will update the code, you will be notified if something changed since last download. 
     73If something actually changed, you just need then to redo the compilation process and you will be ready to test again. 
     74 
     75Troubles 
     76* 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. 
     77* If you spot any bug while testing, just contact the developers via the forum or make a [http://trac.smokin-guns.org/report/1 bug report] (you will still need a forum account to log in here, in small caps). 
     78* If you want to play with the sources, I suggest you to learn git (especially the checkout command), there are plenty of tutorials around. 
     79* For some other problems, don't be scared to contact any developer or me (#smokinguns on freenode, this forum, email, etc.)