]> de.git.xonotic.org Git - xonotic/xonotic.wiki.git/blob - Outdated_Compiling_In_Windows.textile
(Commit created by redmine exporter script from page "Outdated_Compiling_In_Windows...
[xonotic/xonotic.wiki.git] / Outdated_Compiling_In_Windows.textile
1 h1. Compiling in Windows
2
3 h2. Prerequisites
4
5 h3. MinGW / MSYS
6
7 You first need to install a compiler and a shell environment to run the build scripts. On windows, we use MinGW and MSYS. Those two work together, so you have to install MinGW first.
8 It can be found "here":http://sourceforge.net/projects/mingw/files/ . Run the automated installer, and do not check any of the optional components, all you need from MinGW is its C compiler, which is always installed.
9 *Important*: install MinGW in a path containing no spaces. The default path is good: c:\mingw
10
11 Next, you need to install MSYS. The recent versions don't have an installer, so it is easier to install "version 1.0.11":http://downloads.sourceforge.net/mingw/MSYS-1.0.11.exe .
12 *Important*: again, the installation path should contain no spaces. The default is c:\msys
13 After it is done installing, a terminal will pop up, asking you to run the post-install script. Answer yes, and when it asks for the MinGW install path, input it as c:/mingw .
14
15 h3. msysGit
16
17 You will need msysGit to download the Xonotic source files from the repositories and keep them up to date. You can get msysGit "here":http://code.google.com/p/msysgit/ . Download the "Full installer for official Git" file.
18 The default install options should be good.
19
20
21 h2. Downloading the Xonotic sources
22
23 Open git bash, and type those two commands:
24 <pre>
25 cd /c/msys/1.0
26 git clone git://git.xonotic.org/xonotic/xonotic.git
27 </pre>
28
29 (Tip: you can paste text in the console with the Shift-Insert keyboard shortcut)
30
31 This will install the Xonotic root repository in c:\msys\1.0\xonotic
32
33 When the download is done, type
34 <pre>
35 cd xonotic
36 ./all update
37 </pre>
38
39 This will download approximately 2 gigabytes of data, and use 4 gigabytes in disk space.
40 This will take a while, but you can already get started on the next step.
41
42
43 h2. Setting up the environment
44
45 To run the "all" script and compile Xonotic, you need to set up MSYS to be able to use msysGit from it.
46 The /etc/profile file in the msys directory has to be modified to include msysGit in its search path. To do this, use a text editor that supports Unix line endings (LF), for example "Notepad++":http://notepad-plus-plus.org/ .
47 If your text editor shows a two-line file, it probably does not support Unix line endings.
48
49 Look for those lines (lines 19 to 20 in MSYS 1.0.11)
50 <pre>
51 if [ $MSYSTEM == MINGW32 ]; then
52   export PATH=".:/usr/local/bin:/mingw/bin:/bin:$PATH"
53 </pre>
54
55 And change them to:
56 <pre>
57 PATH="/c/Program Files/Git/bin:$PATH"
58 if [ $MSYSTEM == MINGW32 ]; then
59   export PATH=".:/usr/local/bin:/mingw/bin:/bin:$PATH"
60 </pre>
61
62 Alternatively, you can get the modified profile file in the attachments at the bottom of this page.
63
64 h2. Compiling and running the game
65
66 When the cloning of all the repositories is done, open MSYS and type:
67 <pre>
68 cd /xonotic
69 ./all compile
70 </pre>
71
72 This will compile the engine, QC compiler, and game progs. When this is done, you can then run the game with:
73 <pre>
74 ./all run
75 </pre>
76
77 h2. Updating
78
79 To update, all you need to do is open MSYS and:
80 <pre>
81 cd /xonotic
82 ./all update
83 ./all compile
84 </pre>
85
86 The most recent Xonotic development version is then ready to run.