]> de.git.xonotic.org Git - xonotic/xonotic.wiki.git/blobdiff - Repository_Access.md
mention fPIC issue
[xonotic/xonotic.wiki.git] / Repository_Access.md
index c69a566ef38ce4ca31e2762aa615d8dc663ff7a8..21a773c2e95d6e7e1540b3ec8a9ecc3a0b3874f6 100644 (file)
@@ -1,18 +1,18 @@
-Repository Access
-=================
+Repository Access and Compiling
+===============================
 
 Xonotic uses several Git repositories. There’s a helper script in the main repository to aid in checking out all relevant repositories and help you with building and running Xonotic.
 The repository also contains several branches next to the stable “master” branch. So if you’re interested in the progress of a certain feature, or want to help or create a new one, you can checkout the appropriate branch.
 For information on how to obtain write access, skip down to the “[Getting write access](Repository_Access#contributing-and-getting-write-access)” section.
 
-For more information about Git we have a page on the wiki [here](Git).
+For more information about the project's structure, see [git](Git).
 
 ***
 
 Setting up the development environment
 --------------------------------------
 
-The first thing you must do in order to begin with development is to set up your system to be able to download and compile the Xonotic game data.
+The first thing you must do in order to begin with development is to set up your system to be able to download and compile the Xonotic game data. Make sure you have enough memory to compile. 1GB is likely to fail. Consider setup the environment to have at least 2G free memory for the job.
 
 ### Linux
 
@@ -20,7 +20,7 @@ Linux already has an adequate base for development, all we really need to do her
 
 **Ubuntu Dependencies** (independent package `x11-proto-devel` dependencies fill the rest of the Debian package dependencies):
 
-    sudo apt-get install build-essential xserver-xorg-dev x11proto-xf86dri-dev x11proto-xf86dga-dev x11proto-xf86vidmode-dev libxxf86dga-dev libxcb-xf86dri0-dev libxpm-dev libxxf86vm-dev libsdl2-dev libsdl2-image-dev libclalsadrv-dev libasound2-dev libxext-dev libjpeg-turbo8-dev git-core unzip wget
+    sudo apt-get install build-essential xserver-xorg-dev x11proto-xf86dri-dev x11proto-xf86dga-dev x11proto-xf86vidmode-dev libxxf86dga-dev libxcb-xf86dri0-dev libxpm-dev libxxf86vm-dev libsdl1.2-dev libsdl2-dev libsdl2-image-dev libclalsadrv-dev libasound2-dev libxext-dev libjpeg-turbo8-dev git-core unzip wget zlib1g-dev
 
 Note: If using **i386** architecture, you can replace `libdsl1.2debian` with `libsdl1.2debian:i386` in the list above. On Debian, use `libjpeg8-dev` if `libjpeg-turbo8-dev` isn’t available in the package repositories. To be able to download maps from game servers when using Xonotic for online gaming, you will also need `curl` installed on your system.
 
@@ -61,12 +61,16 @@ The **git://** protocol uses port **9418**, which may be a problem if you’re b
 
 After that, you have a working checkout of the repository. The game can be compiled and run with the following commands:
 
-    ./all compile
+    ./all compile -r
     ./all run
 
+**Note:** if you encounter en error similar to darkplaces#111, try `./all clean && ./all compile -r -0`.
+
+You can use just `./all compile` to create a slower build with debug symbols but usually you want `-r`.
+
 The `./all run` line can be followed by one of `glx` (Linux native), `sdl` (input/sound managed by SDL), `agl` (OSX native), `wgl` (Windows native), or `dedicated` (for server hosting) to choose which executable to run or compile. Seen as follows:
 
-    ./all compile dedicated
+    ./all compile -r dedicated
     ./all run wgl
     ./all run sdl
 
@@ -77,8 +81,15 @@ The `run` command can also be followed by standard DarkPlaces commandline argume
 To update your Git clone, you can repeat the commands above without the first “git clone” line- And don’t forget to compile after you update- Like this:
 
     cd xonotic
+    ./all checkout
     ./all update
-    ./all compile
+    ./all compile -r
+
+**Note:** The compiled binary will have a faint watermark with the git revision. To remove it completely put `set menu_watermark ""` into your `autoexec.cfg`.
+
+***
+
+If you run into issues with the latest version you can easily revert to an older one. Since most bugs are caused by the game code rather that the engine, you just need to downgrade that repository. Inside the main xonotic repository, use `cd data/xonotic-data` and then `git checkout <some older commit>`. After that go back `cd -` and `./all compile` (with the optional `-r` flag).
 
 ***
 
@@ -97,7 +108,9 @@ Get a checkout (see above), and do:
 
     ./all keygen
 
-and follow the instructions that are shown.
+and follow the instructions that are shown. Be sure that you've done:
+
+    ./all update -p
 
 After that, you can write to the repository using the usual git commands (commit, push).
 
@@ -118,7 +131,7 @@ Lists all the branches known for all the respective repositories.
 
     ./all compile
 
-Compiles the game, assuming that you have the required libs installed.
+Compiles the game, assuming that you have the required libs installed. Don't forget `-r` if you wanna actually play the game with decent fps.
 
     ./all checkout BRANCH
 
@@ -151,4 +164,4 @@ http://git-scm.com/book/en/v2/Git-Branching-Remote-Branches
 This wiki’s [Git](Git) page.
 
 A tutorial to Git for SVN users:
-http://git-scm.org/course/svn.html
\ No newline at end of file
+http://git-scm.org/course/svn.html