]> de.git.xonotic.org Git - xonotic/netradiant.git/blob - README.md
readme: some touchup
[xonotic/netradiant.git] / README.md
1 NetRadiant
2 ==========
3
4 ![NetRadiant logo](setup/data/tools/bitmaps/splash.png)
5
6 The open source, cross platform level editor for idtech games (Radiant fork).
7
8 # Getting the sources
9
10 The latest source is available from the git repository:
11
12 https://gitlab.com/xonotic/netradiant.git
13
14 The git client can be obtained from the Git website:
15
16 http://git-scm.org
17
18 To get a copy of the source using the command line git client:
19
20 ```
21 git clone --recursive https://gitlab.com/xonotic/netradiant.git
22 cd netradiant
23 ```
24
25 See also https://gitlab.com/xonotic/netradiant/ for a source browser, issues and more.
26
27 # Dependencies
28
29 * OpenGL
30 * LibXml2
31 * GTK2
32 * GtkGLExt
33 * LibJpeg
34 * LibPng
35 * LibWebp
36 * Minizip
37 * ZLib
38
39 To fetch default game packages you'll need Git and to fetch some optional ones you'll need Subversion.
40
41 ## MSYS2
42
43 Under MSYS2, the mingw shell must be used.
44
45 If you use MSYS2 over SSH, add `mingw64` to the path this way (given you compile for 64 bit windows): 
46
47 ```
48 export PATH="/mingw64/bin:${PATH}"`
49 ```
50
51 Install the dependencies this way:
52
53
54 ```
55 pacman -S --needed base-devel mingw-w64-$(uname -m)-{toolchain,cmake,make,gtk2,gtkglext,libwebp,minizip-git} git
56 ```
57
58 Explicitely use `mingw-w64-x86_64-` or `mingw-w64-i686-` prefix if you need to target a non-default architecture.
59
60 You may have to install `subversion` to fetch some non-default game packages.
61
62
63 ## macOS:
64
65 ```
66 brew install gcc cmake Caskroom/cask/xquartz gtkglext pkgconfig minizip webp coreutils gnu-sed
67 brew link --force gettext
68 ```
69
70 # Submodules
71
72  * Crunch (optional, disabled by default, only supported with CMake build)
73
74 If you have not used `--recursive` option at `git clone` time, you can fetch Crunch this way (run it within the NetRadiant repository):
75
76
77 ```
78 git submodule update --init --recursive
79 ```
80
81 # Compiling
82
83 This project uses the usual CMake workflow:
84
85 ## Debug
86
87 ```
88 cmake -G "Unix Makefiles" -H. -Bbuild && cmake --build build -- -j$(nproc)
89 ```
90
91 ## Release
92
93 ```
94 cmake -G "Unix Makefiles" -H. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build -- -j$(nproc)
95 ```
96
97 On Mac you have to add this to the first cmake call:
98
99 ```
100 -DCMAKE_C_COMPILER=/usr/local/bin/gcc-9 -DCMAKE_CXX_COMPILER=/usr/local/bin/g++-9 -DOPENGL_INCLUDE_DIR=/opt/X11/include -DOPENGL_gl_LIBRARY=/opt/X11/lib/libGL.dylib
101 ```
102
103 ## Build and installation details
104
105 ### Compilation details
106
107 options:
108
109 * `BUILD_RADIANT=OFF`  
110    Do not build NetRadiant (default: `ON`, build radiant graphical editor)
111 * `BUILD_TOOLS=OFF`  
112    Do not build q3map2 and other tools (default: `ON`, build command line tools)
113 * `BUILD_CRUNCH=ON`  
114    Enable crunch support (default: `OFF`, disable crunch support)
115 * `RADIANT_ABOUTMSG="Custom build"`  
116    A message shown in the about dialog
117
118 targets:
119
120 * `radiant`    Compiles the radiant core binary
121 * `modules`    Compiles all modules (each module has its own target as well)
122 * `plugins`    Compiles all plugins (each plugin has its own target as well)
123 * `quake3`     Compiles all the Quake3 tools
124   - `q3map2`   Compiles the quake3 map compiler
125   - `q3data`   Compiles the q3data tool
126
127 ### Download details
128
129 options:
130
131 * `DOWNLOAD_GAMEPACKS=OFF`  
132    Do not automatically download the gamepack data during the first compilation (default: `ON`)
133 * `GAMEPACKS_LICENSE_LIST=all`  
134    Download all gamepacks whatever the license (default: `free`, download free gamepacks)
135 * `GAMEPACKS_NAME_LIST=Xonotic Unvanquished`  
136    Download gamepacks for the given games (default: `none`, do not select more gamepacks to download)
137
138 target:
139
140 * `game_packs` Downloads the game pack data
141
142 Run `./gamepacks-manager -h` to know about available licenses and other available games. Both lists are merged, for example setting `GAMEPACKS_LICENSE_LIST=GPL` and `GAMEPACKS_NAME_LIST=Q3` will install both GPL gamepacks and proprietary Quake 3 one.
143
144 ### Installation details
145
146 options:
147
148 * `FHS_INSTALL=ON`  
149   Install files following the Filesystem Hierarchy Standard (bin, lib, share, etc.), also setup XDG mime and application support on POSIX systems (default: `OFF`, install like in 1999)
150 * `CMAKE_INSTALL_PREFIX=/usr`  
151   Install system-wide on Posix systems, always set `FHS_INSTALL` to `ON` when doing this (default: install in `install/` directory within source tree)
152
153 target:
154
155 * `install`  
156   Install files
157
158 ## Note about Crunch
159
160 The crnlib used to decode `.crn` files is the one from [Dæmon](http://github.com/DaemonEngine/Daemon) which is the one by [Unity](https://github.com/Unity-Technologies/crunch/tree/unity) made cross-platform and slightly improved. Since Unity brokes compatibility with [BinomialLLC's legacy tree](https://github.com/BinomialLLC/crunch) it's required to use either the `crunch` tool from Dæmon or the one from Unity to compress textures that have to be read by radiant or q3map2.