]> de.git.xonotic.org Git - xonotic/xonotic.wiki.git/blob - Repository_Access.textile
(Commit created by redmine exporter script from page "Repository_Access" version 50)
[xonotic/xonotic.wiki.git] / Repository_Access.textile
1 h1. Repository Access
2
3 {{>toc}}
4
5 Xonotic uses several GIT repositories. There's a helperscript in the main repository to aid in checking out all relevant repositories and help you 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, checkout the appropriate branches.
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. Cloning the repository and compiling
12
13 h3. Linux
14
15 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
17 <pre>
18 git clone git://git.xonotic.org/xonotic/xonotic.git
19 cd xonotic
20 ./all update -l best
21 </pre>
22
23 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 http://git.xonotic.org/xonotic/xonotic.git however using the git protocol directly is preferred for performance reasons.
24
25 After that, you have a working checkout of the repository. The game can be compiled and run with the following commands:
26
27 <pre>
28 ./all compile
29 ./all run
30 </pre>
31
32 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
34 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
36 Ubuntu Dependencies:
37
38 <pre>
39 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 </pre>
41
42
43 h3. Windows
44
45 See [[Compiling in Windows]]
46
47 h3. Mac OSX
48
49 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/
50
51 When you have done this, you can follow the Linux instructions above.
52
53 h2. Contributing and getting write access
54
55 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, your pushed code has to be dual licensed appropriately. Subdirectories currently having a dual license:
56 * data/qcsrc/warpzonelib - dual licensed as "GPLv2 or later" or MIT license.
57 In case code you pushed was not written by you, it is your responsibility to ensure proper licensing.
58
59 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)
60
61 h3. Linux/OS X
62
63 Get a checkout (see above), and do:
64
65 <pre>
66 ./all keygen
67 </pre>
68
69 and follow the instructions that are shown.
70
71 After that, you can write to the repository using the usual git commands (commit, push).
72
73 Alternatively, you can use the helper script "all".
74 It supports the following commands:
75
76 <pre>
77 ./all update
78 </pre>
79
80 This command updates all the xonotic repositories.
81
82 <pre>
83 ./all branch
84 </pre>
85
86 Lists the branches you are currrently on, in the respective repositories
87
88 <pre>
89 ./all branches
90 </pre>
91
92 Lists all the branches known for all the respective repositories
93
94 <pre>
95 ./all compile
96 </pre>
97
98 Compiles the game given that you have the required libs installed
99
100 <pre>
101 ./all checkout BRANCH
102 </pre>
103
104 Switch to that branch in all repositories where its available
105
106 <pre>
107 ./all commit
108 </pre>
109
110 This command commits and pushes your local changes.
111
112 <pre>
113 ./all run xonotic
114 </pre>
115
116 Starts the xonotic client
117
118 <pre>
119 ./all run dedicated xonotic
120 </pre>
121
122 Starts a xonotic dedicated server
123
124
125 h3. Windows
126
127 To write your own changes to the Xonotic git, do the following:
128 * 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.
129 * 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".
130 * 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.
131 * 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.
132
133
134 h2. General contributor guidelines
135
136 # 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).
137 # 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.
138
139 h2. Further git information
140
141 About tracking remote branches:
142 http://www.gitready.com/beginner/2009/03/09/remote-tracking-branches.html
143
144 This wiki's [[Git]] page.
145
146 A tutorial for SVN users:
147 http://git-scm.org/course/svn.html