]> git.xonotic.org Git - xonotic/netradiant.git/blob - README.md
webp: add cmake support
[xonotic/netradiant.git] / README.md
1 NetRadiant
2 ==========
3
4 The open source, cross platform level editor for idtech games (Radiant fork)
5
6 # Getting the Sources
7
8 The latest source is available from the git repository:
9 https://gitlab.com/xonotic/netradiant.git
10
11 The git client can be obtained from the Git website:
12 http://git-scm.org
13
14 To get a copy of the source using the commandline git client:
15 ```
16 git clone --recursive https://gitlab.com/xonotic/netradiant.git
17 cd netradiant
18 ```
19
20 See also https://gitlab.com/xonotic/netradiant/ for a source browser, issues and more.
21
22 # Dependencies
23
24  * OpenGL
25  * LibXml2
26  * GTK2
27  * GtkGLExt
28  * LibJpeg
29  * LibPng
30  * LibWebp
31  * Minizip
32  * ZLib
33
34 ## msys2
35
36 Under MSYS2, the mingw shell must be used
37
38 ### 32 bit:
39
40 ```
41 pacman -S --needed base-devel mingw-w64-i686-{toolchain,cmake,make,gtk2,gtkglext}
42 ```
43
44 ### 64 bit:
45
46 ```
47 pacman -S --needed base-devel mingw-w64-x86_64-{toolchain,cmake,make,gtk2,gtkglext}
48 ```
49
50 ## OS X:
51
52 ```
53 brew install gtkglext
54 brew install Caskroom/cask/xquartz
55 brew link --force gettext
56 ```
57
58 # Submodules
59
60  * Crunch
61
62 If you forgot to add `--recursive` option at `git clone` time, fetch it this way:
63
64
65 ```
66 git submodule update --init --recursive
67 ```
68
69 # Compiling
70
71 This project uses the usual CMake workflow:
72
73 ## Debug
74
75 ```
76 cmake -G "Unix Makefiles" -H. -Bbuild && cmake --build build -- -j$(nproc)
77 ```
78
79 ## Release
80
81 ```
82 cmake -G "Unix Makefiles" -H. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build -- -j$(nproc)
83 ```
84
85 ## More Compilation Details
86
87 options:
88  * `DOWNLOAD_GAMEPACKS=ON`
89    Automatically download the gamepack data during the first compilation
90  * `RADIANT_ABOUTMSG="Custom build"`
91    A message shown in the about dialog
92
93 targets:
94  * `radiant`    Compiles the radiant core binary
95  * `modules`    Compiles all modules (each module has its own target as well)
96  * `plugins`    Compiles all plugins (each plugin has its own target as well)
97  * `game_packs` Downloads the game pack data
98  * `quake3`     Compiles all the Quake3 tools
99    - `q3map2`     Quake3 map compiler
100    - `q3data`
101
102 ## Note about Crunch
103
104 The crnlib used to decode `.crn` files is the one from [Dæmon](http://github.com/DaemonEngine/Daemon) which is just the one by [Unity](https://github.com/Unity-Technologies/crunch/tree/unity) made cross-platform. Since Unity brokes compatibility with [BinomialLLC's legacy tree](https://github.com/BinomialLLC/crunch) it's required to use either crunch from Dæmon or the one from Unity to compress textures that have to be read by radiant or q3map2.