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


Ignore:
Timestamp:
Dec 24, 2013, 4:52:09 PM (10 years ago)
Author:
barto
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SmokinGuns/Building/windows

    v1 v1  
     1= Introduction =
     2In this small tutorial, we will compile the game from sources. We will use Windows7 32bit Home Edition for this tutorial. This tutorial initially comes from [http://forum.smokin-guns.org/viewtopic.php?f=22&t=3312 this forum post].
     3
     4= Content =
     5* Why
     6* Git bash
     7* MinGW and MINSYS
     8* Getting the code
     9* Compilation
     10* Update
     11* Troubles
     12
     13== Why ==
     14Here is a list of the possible reasons that may require anyone to compile the game code:
     15* Testing the last development revision helps to find bugs and fix them simply by simply saying: "It's still there" or "It's now fixed".
     16* Being on the bleeding edge of the game by discovering the last new implemented features like the second renderer recently added by ioquake3.
     17* You have a Windows server and you want to have the latest server-side code because Baller-bude is awesome and you want the same possibilities.
     18* Or, I don't really hope this from you, but you have some troubles with the actual .exe and you think it is a good solution to try to create your own set of binaries.
     19
     20== Git bash ==
     21We will need this program to gather the sources from [https://github.com/smokin-guns/SmokinGuns GitHub].
     22Go to [http://git-scm.com/ git-scm.com], download and install git. You will have afterwards a new icon named "Git bash" on your desktop.
     23
     24== MinGW and MINSYS ==
     25This program is our compiler. Download and install the latest .exe from [http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/ sourceforge.net]. Take care to install it to the recommended path ({{{C:\MinGW}}}) and to add the component named "MSYS Basic System" to the installation.
     26
     27== Getting the code ==
     28Now we will get the source code, for this tutorial, we will work directly from the documents folder namely {{{C:\User\YourName\}}}.
     29So open Git Bash and a black command prompt will open. Just type:
     30{{{
     31 git clone https://github.com/smokin-guns/SmokinGuns.git
     32}}}
     33and a folder named SmokinGuns with the whole source code will be created.
     34You can now close git bash, we'll use it later when we will want to update the source code.
     35
     36== Compilation ==
     37So you have installed MinGW and MINSYS, you'll need to launch "MinGW Shell" from the application list and surprise: another command prompt! We will firstly need to move to the folder where your code is, just type:
     38(you can use the autocompletion with the tabulation button to move faster in the folders)
     39{{{
     40 cd C:
     41 cd Users\YourName\SmokinGuns
     42}}}
     43Time to compile! Just type in the same console:
     44{{{
     45 make
     46}}}
     47It will take some time and cpu percent for the compilation, but afterwards you will have the compiled files into {{{SmokinGuns\build\release-mingw32-x86\}}}.
     48The only useful files are the *.dll (if there is/are one/some) and the *.exe that goes to your root game folder (usually {{{C:\Program Files\Smokin' Guns\}}}).
     49There is also an important folder in {{{SmokinGuns\build\release-mingw32-x86\smokinguns}}}, just compress the vm folder as vm.zip, rename it to vm.pk3 and put it into {{{C:\Program Files\Smokin' Guns\smokinguns}}} with all other pk3s. Your vm.pk3 file should look like that:
     50{{{
     51 vm/
     52 vm/cgame.qvm
     53 vm/qagame.qvm
     54 vm/ui.qvm
     55}}}
     56You can now play with the new .exe, I have had no problems to connect to servers since the pk3 are not touched during this process.
     57
     58== Update ==
     59When a change in the code is made, it is always nice to be able to recompile the code to test the changes.
     60Just open git bash and type:
     61{{{
     62 cd SmokinGuns
     63 git pull
     64}}}
     65to update the code. You also need to redo the compilation process, it will thus be smaller since it only compile the changes.
     66
     67== Troubles ==
     68* 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.
     69* If you spot any bug while testing, just contact the developers via the forum or make a [http://trac.smokin-guns.org/report/ bug report] (you will still need a forum account to log in here, in small caps).
     70* If you want to play with the sources, I suggest you to learn git (especially the checkout command), there are plenty of tutorials around.
     71* For some other problems, you can contact the devs via IRC (#smokinguns on freenode), me via PM, with a forum post, via a homing pigeon, etc.