]> de.git.xonotic.org Git - xonotic/xonotic.wiki.git/blob - Repository_Access.md
remove obsolete references to Redmine wiki things
[xonotic/xonotic.wiki.git] / Repository_Access.md
1 Repository Access
2 =================
3
4 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.
5 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.
6 For information on how to obtain write access, skip down to the “[[Repository Access\#Contributing-and-getting-write-access|Getting write access]]” section.
7
8 For more information about Git we have a [[Git]] page on the wiki [[Git|here]].
9
10 Setting up the development environment
11 --------------------------------------
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 ### 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
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
23 Note: If using i386 architecture, you can replace libdsl1.2debian by ibsdl1.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.
24
25 For Fedora and other RPM based distro’s, compiling dependencies are as follows:
26
27     x11-proto-devel, libalsa2-static-devel libjpeg62-devel libjpeg62-static-devel libSDL-devel
28
29 ### Windows
30
31 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.
32
33 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:.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.
34
35 ### Mac OSX
36
37 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/
38
39 After your development environment is all set up, you can continue on to cloning the git repository and compiling Xonotic.
40
41 Cloning the repository and compiling
42 ------------------------------------
43
44 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):
45
46     git clone git://git.xonotic.org/xonotic/xonotic.git
47     cd xonotic
48     ./all update -l best
49
50 Take care do do these steps as normal user on Linux (not as a superuser), otherwise you’ll have to take care about the file permissions later on.
51
52 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 <code>http://git.xonotic.org/xonotic/xonotic.git</code> (however, using the git protocol directly is preferred for performance reasons).
53
54 After that, you have a working checkout of the repository. The game can be compiled and run with the following commands:
55
56     ./all compile
57     ./all run
58
59 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:
60
61     ./all compile dedicated
62     ./all run wgl
63     ./all run sdl
64
65 The run command can also be followed by standard DarkPlaces commandline arguments:
66
67     ./all run +vid_fullscreen 0
68
69 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:
70
71     cd xonotic
72     ./all update
73     ./all compile
74
75 Contributing and getting write access
76 -------------------------------------
77
78 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:
79 \* data/qcsrc/warpzonelib - dual licensed as “GPLv2 or later” or MIT license.
80 In case the code you pushed was not written by you, it is your responsibility to ensure proper licensing.
81
82 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)
83
84 ### Windows/Linux/OS X
85
86 Get a checkout (see above), and do:
87
88     ./all keygen
89
90 and follow the instructions that are shown.
91
92 After that, you can write to the repository using the usual git commands (commit, push).
93
94 Alternatively, you can use the helper script “all”.
95 It supports the following commands:
96
97     ./all update
98
99 This command updates all the Xonotic repositories.
100
101     ./all branch
102
103 Lists the branches you are currently on, in the respective repositories.
104
105     ./all branches
106
107 Lists all the branches known for all the respective repositories.
108
109     ./all compile
110
111 Compiles the game, assuming that you have the required libs installed.
112
113     ./all checkout BRANCH
114
115 Switch to that branch in all repositories where its available.
116
117     ./all commit
118
119 This command commits and pushes your local changes.
120
121     ./all run xonotic
122
123 Starts the Xonotic client
124
125     ./all run dedicated xonotic
126
127 Starts a Xonotic dedicated server
128
129 General contributor guidelines
130 ------------------------------
131
132 1.  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).
133 2.  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.
134
135 Further git information
136 -----------------------
137
138 About tracking remote branches:
139 http://www.gitready.com/beginner/2009/03/09/remote-tracking-branches.html
140
141 This wiki’s [[Git]] page.
142
143 A tutorial for SVN users:
144 http://git-scm.org/course/svn.html
145