Repository Access

Version 52 (Samual, 07/08/2011 10:08 am)

1 1
h1. Repository Access
2 1
3 32 Blub
{{>toc}}
4 32 Blub
5 51 Spaceman
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.
6 51 Spaceman
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.
7 40 MrBougo
For information on how to obtain write access, skip down to the "[[Repository Access#Contributing-and-getting-write-access|Getting write access]]" section.
8 32 Blub
9 51 Spaceman
For more information about Git we have a [[Git]] page on the wiki [[Git|here]].
10 1
11 39 MrBougo
h2. Cloning the repository and compiling
12 1
13 41 merlijn
h3. Linux
14 39 MrBougo
15 51 Spaceman
First, you install Git using your favorite package manager. Then, do the following to download and compile (execute the first line only to download):
16 1
17 5 divVerent
<pre>
18 1
git clone git://git.xonotic.org/xonotic/xonotic.git
19 1
cd xonotic
20 50 divVerent
./all update -l best
21 5 divVerent
</pre>
22 1
23 51 Spaceman
The git:// protocol uses port 9418, which may be a problem if you're behind a strict firewall. You may instead use the clone url <pre>http://git.xonotic.org/xonotic/xonotic.git</pre>however using the git protocol directly is preferred for performance reasons.
24 1
25 47 MrBougo
After that, you have a working checkout of the repository. The game can be compiled and run with the following commands:
26 47 MrBougo
27 47 MrBougo
<pre>
28 47 MrBougo
./all compile
29 47 MrBougo
./all run
30 47 MrBougo
</pre>
31 47 MrBougo
32 47 MrBougo
The run line can be followed by one of glx,sdl,agl,dedicated to choose which executable to run. It can also be followed by standard DarkPlaces commandline arguments.
33 47 MrBougo
34 51 Spaceman
To update your Git clone, you can repeat the commands above without the first "git clone" line. Don't forget to compile after you update.
35 1
36 2 divVerent
Ubuntu Dependencies:
37 39 MrBougo
38 38 DiaboliK
<pre>
39 46 MooKow
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 libsdl-image1.2-dev libclalsadrv-dev libasound2-dev libxext-dev libsdl1.2debian-pulseaudio git-core unzip wget
40 1
</pre>
41 1
42 52 Samual
For Fedora and other RPM based distro's, compiling dependencies are
43 52 Samual
44 52 Samual
<pre>
45 52 Samual
x11-proto-devel, libalsa2-static-devel libjpeg62-devel libjpeg62-static-devel libSDL-devel
46 52 Samual
</pre>
47 52 Samual
48 52 Samual
The independant package x11-proto-devel dependencies fill the rest of the debian package dependencies listed above.
49 1
50 39 MrBougo
h3. Windows
51 1
52 44 MrBougo
See [[Compiling in Windows]]
53 41 merlijn
54 41 merlijn
h3. Mac OSX
55 41 merlijn
56 51 Spaceman
You must first install XCode which comes on your installation DVD or can be downloaded from the Apple website. This package provides tools like Git and GCC, which are needed for successful checkout and compilation of Xonotic. Some versions of XCode come with Git and others don't - if you don't have Git after installing XCode get it here: http://code.google.com/p/git-osx-installer/
57 41 merlijn
58 41 merlijn
When you have done this, you can follow the Linux instructions above.
59 1
60 39 MrBougo
h2. Contributing and getting write access
61 6 divVerent
62 51 Spaceman
A condition for write (push) access is that you agree that any code or data you push will be licensed under the General Public License, version 2, with or without the "or any later version" clause. In case the directory the changes apply to contains a LICENSE or COPYING file indicating another license, then your pushed code has to be dual licensed appropriately. Subdirectories currently having a dual license:
63 39 MrBougo
* data/qcsrc/warpzonelib - dual licensed as "GPLv2 or later" or MIT license.
64 51 Spaceman
In case the code you pushed was not written by you, it is your responsibility to ensure proper licensing.
65 39 MrBougo
66 39 MrBougo
To apply for write access, make an issue of type "Support" in the category "Repository" and attach your public SSH key to it. (Windows users: see the Windows section below for more on SSH keys)
67 39 MrBougo
68 39 MrBougo
h3. Linux/OS X
69 39 MrBougo
70 39 MrBougo
Get a checkout (see above), and do:
71 39 MrBougo
72 5 divVerent
<pre>
73 49 divVerent
./all keygen
74 1
</pre>
75 1
76 49 divVerent
and follow the instructions that are shown.
77 49 divVerent
78 39 MrBougo
After that, you can write to the repository using the usual git commands (commit, push).
79 10 lda17h
80 39 MrBougo
Alternatively, you can use the helper script "all".
81 39 MrBougo
It supports the following commands:
82 10 lda17h
83 1
<pre>
84 1
./all update
85 21 lda17h
</pre>
86 21 lda17h
87 51 Spaceman
This command updates all the Xonotic repositories.
88 15 lda17h
89 1
<pre>
90 1
./all branch
91 21 lda17h
</pre>
92 1
93 51 Spaceman
Lists the branches you are currently on, in the respective repositories.
94 21 lda17h
95 1
<pre>
96 1
./all branches
97 27 lda17h
</pre>
98 27 lda17h
99 51 Spaceman
Lists all the branches known for all the respective repositories.
100 1
101 1
<pre>
102 1
./all compile
103 1
</pre>
104 1
105 51 Spaceman
Compiles the game, assuming that you have the required libs installed.
106 1
107 27 lda17h
<pre>
108 1
./all checkout BRANCH
109 27 lda17h
</pre>
110 1
111 51 Spaceman
Switch to that branch in all repositories where its available.
112 49 divVerent
113 49 divVerent
<pre>
114 49 divVerent
./all commit
115 49 divVerent
</pre>
116 49 divVerent
117 49 divVerent
This command commits and pushes your local changes.
118 34 Blub
119 22 lda17h
<pre>
120 22 lda17h
./all run xonotic
121 22 lda17h
</pre>
122 22 lda17h
123 51 Spaceman
Starts the Xonotic client
124 23 Blub
125 23 Blub
<pre>
126 22 lda17h
./all run dedicated xonotic
127 22 lda17h
</pre>
128 22 lda17h
129 51 Spaceman
Starts a Xonotic dedicated server
130 13 lda17h
131 13 lda17h
132 39 MrBougo
h3. Windows
133 24 MirceaKitsune
134 51 Spaceman
To write your own changes to the Xonotic Git, do the following:
135 39 MrBougo
* You must first have a putty SSH key, containing your private key. To generate one use "puttygen" : http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html which creates a ppk file. Choose SSH-2 RSA format and once the key has been generated save it as a private key.
136 51 Spaceman
* Make sure the public key is accepted on the Git server. To find it, open the generated key in a text editor and read the "public-lines".
137 51 Spaceman
* Open the Settings menu of Tortoise Git (right click anywhere in the folder you are setting this for) and go to Git -> Remote. Select "origin" for remote, "ssh://xonotic@git.xonotic.org/xonotic-data.pk3dir.git" for URL (data.pk3dir is the example for the "data" branch, each pk3dir is separate!) and for Putty Key browse and select the key file previously mentioned.
138 51 Spaceman
* In order to make a new branch, right click somewhere and choose Create Branch from the Tortoise Git context menu. This will create a local branch you can do anything with. Once you locally committed your changes to your branch, select Push to upload or update the branch on the Git server. From the Push window, choose your local branch for Local, leave Remote empty, and select origin for Destination.
139 24 MirceaKitsune
140 24 MirceaKitsune
141 39 MrBougo
h2. General contributor guidelines
142 24 MirceaKitsune
143 51 Spaceman
# Before creating your local branch and committing to it, make sure you've configured your user settings such as your name which will display in the logs (in TortoiseGit: Settings -> Git - > Config).
144 39 MrBougo
# Try naming your branch myname/mychange for each patch. For instance, if your name is Alex and the change you are committing is a menu fix, use something like alex/menufix.
145 24 MirceaKitsune
146 39 MrBougo
h2. Further git information
147 24 MirceaKitsune
148 39 MrBougo
About tracking remote branches:
149 39 MrBougo
http://www.gitready.com/beginner/2009/03/09/remote-tracking-branches.html
150 24 MirceaKitsune
151 39 MrBougo
This wiki's [[Git]] page.
152 39 MrBougo
153 39 MrBougo
A tutorial for SVN users:
154 39 MrBougo
http://git-scm.org/course/svn.html