]> de.git.xonotic.org Git - xonotic/xonotic.wiki.git/blob - Repository_Access.textile
(Commit created by redmine exporter script from page "Repository_Access" version 57)
[xonotic/xonotic.wiki.git] / Repository_Access.textile
1 h1. Repository Access
2
3 {{>toc}}
4
5 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 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 For information on how to obtain write access, skip down to the "[[Repository Access#Contributing-and-getting-write-access|Getting write access]]" section.
8
9 For more information about Git we have a [[Git]] page on the wiki [[Git|here]].
10
11 h2. Setting up the development environment
12
13 The first thing you must do in order to begin development is set up your system to be able to download and compile the Xonotic game data.
14
15 h3. Linux
16
17 Linux already has an adequate base for development, all we really need to do here is install the dependencies for the download/compilation process and then we can move right along to cloning the data.
18
19 Ubuntu Dependencies (independent package x11-proto-devel dependencies fill the rest of the Debian package dependencies):
20 <pre>
21 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 libjpeg-turbo8-dev git-core unzip wget
22 </pre>
23 Note: If using i386 architecture, you can replace libdsl1.2debian by ibsdl1.2debian:i386 in the list above.
24
25 For Fedora and other RPM based distro's, compiling dependencies are as follows:
26 <pre>
27 x11-proto-devel, libalsa2-static-devel libjpeg62-devel libjpeg62-static-devel libSDL-devel
28 </pre>
29
30
31 h3. Windows
32
33 To get a detailed guide on how to set up the environment to compile and run Xonotic, follow this link: [[Compiling in Windows]]. A short explanation follows.
34
35 By default, Windows has no real environment to handle the necessary scripting and compiling tools for building Xonotic... So, what we have to do is install something called "msysgit":https://code.google.com/p/msysgit/downloads/list to allow us to have a similar environment as on Linux. In this case, we want the download which is entirely self contained (including build-essentials and other corely required dependencies), which at the time of writing this is called "msysGit-fullinstall-1.8.0-preview20121022.exe." Simply follow the instructions on screen at this point. NOTE: Unless you know what you're doing, install with default settings/directories.
36
37 Once you have completed the installation, you should be able to launch the msysgit shell by simply finding "msys.bat"- by default, it is located at: C:\msysgit\msysgit\msys.bat, and you can use this shell to continue on with the guide and clone and compile the Xonotic repositories. It is recommended that you make a shortcut to msysgit (simply right click the shell and hit "Create Shortcut") for easier access on your desktop or in your start menu.
38
39 h3. Mac OSX
40
41 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/
42
43 After your development environment is all set up, you can continue on to cloning the git repository and compiling Xonotic.
44
45 h2. Cloning the repository and compiling
46
47 Making sure that your environment is set up properly, you can do the following to begin downloading and compilation (execute the first line only to download):
48
49 <pre>
50 git clone git://git.xonotic.org/xonotic/xonotic.git
51 cd xonotic
52 ./all update -l best
53 </pre>
54
55 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.
56
57 After that, you have a working checkout of the repository. The game can be compiled and run with the following commands:
58 <pre>
59 ./all compile
60 ./all run
61 </pre>
62
63 The 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:
64 <pre>
65 ./all compile dedicated
66 ./all run wgl
67 ./all run sdl
68 </pre>
69
70 The run command can also be followed by standard DarkPlaces commandline arguments:
71 <pre>
72 ./all run +vid_fullscreen 0
73 </pre>
74
75 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:
76 <pre>
77 cd xonotic
78 ./all update
79 ./all compile
80 </pre>
81
82 h2. Contributing and getting write access
83
84 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:
85 * data/qcsrc/warpzonelib - dual licensed as "GPLv2 or later" or MIT license.
86 In case the code you pushed was not written by you, it is your responsibility to ensure proper licensing.
87
88 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)
89
90 h3. Linux/OS X
91
92 Get a checkout (see above), and do:
93
94 <pre>
95 ./all keygen
96 </pre>
97
98 and follow the instructions that are shown.
99
100 After that, you can write to the repository using the usual git commands (commit, push).
101
102 Alternatively, you can use the helper script "all".
103 It supports the following commands:
104
105 <pre>
106 ./all update
107 </pre>
108
109 This command updates all the Xonotic repositories.
110
111 <pre>
112 ./all branch
113 </pre>
114
115 Lists the branches you are currently on, in the respective repositories.
116
117 <pre>
118 ./all branches
119 </pre>
120
121 Lists all the branches known for all the respective repositories.
122
123 <pre>
124 ./all compile
125 </pre>
126
127 Compiles the game, assuming that you have the required libs installed.
128
129 <pre>
130 ./all checkout BRANCH
131 </pre>
132
133 Switch to that branch in all repositories where its available.
134
135 <pre>
136 ./all commit
137 </pre>
138
139 This command commits and pushes your local changes.
140
141 <pre>
142 ./all run xonotic
143 </pre>
144
145 Starts the Xonotic client
146
147 <pre>
148 ./all run dedicated xonotic
149 </pre>
150
151 Starts a Xonotic dedicated server
152
153
154 h3. Windows
155
156 To write your own changes to the Xonotic Git, do the following:
157 * 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.
158 * 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".
159 * 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@push.git.xonotic.org/xonotic-data.pk3dir.git" as pushing 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.
160 * 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.
161
162
163 h2. General contributor guidelines
164
165 # 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).
166 # 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.
167
168 h2. Further git information
169
170 About tracking remote branches:
171 http://www.gitready.com/beginner/2009/03/09/remote-tracking-branches.html
172
173 This wiki's [[Git]] page.
174
175 A tutorial for SVN users:
176 http://git-scm.org/course/svn.html