]> de.git.xonotic.org Git - xonotic/xonotic.wiki.git/blob - Repository_Access.textile
woops, anchor fixed
[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/OS X
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
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.
26
27 Ubuntu Dependencies:
28
29 <pre>
30 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
31 </pre>
32
33
34 h3. Windows
35
36 To get a GIT clone using mysysgit and Tortoise GIT, do the following:
37 * Go to the folder where you intend to clone, right click and choose Git Clone from the context menu. Clone the repository from git://git.xonotic.org/xonotic/xonotic.git and wait for everything to download.
38 * Once the first step is ready, open a command prompt or git bash and browse to the root folder of your clone. Write "./all update" as described above to get the separate data repos. After that you have a working GIT clone.
39
40 To compile, you will need mingw and msys (1.0.11 should be good enough, follow [[http://www.mingw.org/wiki/msys|this guide]]).
41 You should set the path to the "bin" directory of msysgit inside your PATH environment variable. There are plenties of information on how to do this depending on your Windows version, just google it.
42
43 Then, *from the msys shell*, cd into the xonotic git clone and run
44
45 <pre>
46 CC=gcc ./all compile
47 </pre>
48
49 If that works, you can then run xonotic (still from msys) using
50
51 <pre>
52 ./all run
53 </pre>
54
55 h2. Contributing and getting write access
56
57 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:
58 * data/qcsrc/warpzonelib - dual licensed as "GPLv2 or later" or MIT license.
59 In case code you pushed was not written by you, it is your responsibility to ensure proper licensing.
60
61 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)
62
63 h3. Linux/OS X
64
65 Get a checkout (see above), and do:
66
67 <pre>
68 git config remote.origin.url ssh://xonotic@git.xonotic.org/xonotic.git
69 ./all update
70 </pre>
71
72 After that, you can write to the repository using the usual git commands (commit, push).
73
74 Alternatively, you can use the helper script "all".
75 It supports the following commands:
76
77 <pre>
78 ./all update
79 </pre>
80
81 This command updates all the xonotic repositories.
82
83 <pre>
84 ./all branch
85 </pre>
86
87 Lists the branches you are currrently on, in the respective repositories
88
89 <pre>
90 ./all branches
91 </pre>
92
93 Lists all the branches known for all the respective repositories
94
95 <pre>
96 ./all compile
97 </pre>
98
99 Compiles the game given that you have the required libs installed
100
101 <pre>
102 ./all checkout BRANCH
103 </pre>
104
105 Switch to that branch in all repositories where its available
106
107 <pre>
108 ./all run xonotic
109 </pre>
110
111 Starts the xonotic client
112
113 <pre>
114 ./all run dedicated xonotic
115 </pre>
116
117 Starts a xonotic dedicated server
118
119
120 h3. Windows
121
122 To write your own changes to the Xonotic git, do the following:
123 * 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.
124 * 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".
125 * 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.
126 * 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.
127
128
129 h2. General contributor guidelines
130
131 # 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).
132 # 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.
133
134 h2. Further git information
135
136 About tracking remote branches:
137 http://www.gitready.com/beginner/2009/03/09/remote-tracking-branches.html
138
139 This wiki's [[Git]] page.
140
141 A tutorial for SVN users:
142 http://git-scm.org/course/svn.html