]> git.xonotic.org Git - xonotic/xonotic.wiki.git/blob - Shared-libraries-(buildfiles).md
Update Mapping packaging - fix markdown markup
[xonotic/xonotic.wiki.git] / Shared-libraries-(buildfiles).md
1 darkplaces/Xonotic on Linux uses system libraries. For Windows and macOS external dlls and dylibs are needed. Those reside in xonotic/misc/buildfiles
2
3 Because at the time of writing there is no automatism to build or update the games dependencies for those 2 platforms and the current dlls/dylibs are VERY outdated and thus also contain vulnerabilities, this page should document on where to obtain or how to build them, retaining API compatibility to darkplaces and also older OS platform versions like Windows XP.
4
5 For Windows, all libraries can/should be obtained from https://packages.msys2.org/ [1] with the exception of an official DLL release from the upstream being available (this is the case for jpeg-turbo and freetype) or if it has to be compiled on under Windows for some reason (eg. libcurl for Schannel (Windows crypto for HTTPS) support).
6
7 A handy tool to check dll deps on Windows is https://github.com/lucasg/Dependencies
8
9 TODO: macOS
10
11 # libcurl
12 libcurl is used for downloading *.pk3 files from servers
13
14 ### Windows
15 Darkplaces loads `libcurl-4.dll` or `libcurl-3.dll`
16
17 Build instructions:
18 * clone https://gitlab.com/incognico/build-libcurl-windows
19 * run `build.bat` in a VS2019 Development Shell
20 * rename the built dlls (x64 & x86) to `libcurl-4.dll`
21
22 ### macOS
23 Darkplaces loads `libcurl.4.dylib` or `libcurl.3.dylib` or `libcurl.2.dylib`
24
25 # libjpeg-turbo
26 libjpeg-turbo is needed to display jpeg images/textures
27
28 ### Windows
29 Darkplaces loads `libjpeg.dll`
30
31 Obtainment instructions:
32 * download `libjpeg-turbo-VERSION-vc.exe` & `libjpeg-turbo-VERSION-vc64.exe` from https://sourceforge.net/projects/libjpeg-turbo/files/
33 * extract the *.exe files and use `bin/jpeg62.dll`
34 * rename the dlls (x64 & x86) to `libjpeg.dll`
35
36 ### macOS
37 Darkplaces loads `libjpeg.62.dylib`
38
39 # libpng
40 libpng is needed to display png images/textures
41
42 ### Windows
43 Darkplaces loads `libpng16.dll` or `libpng16-16.dll` or `libpng15-15.dll` or `libpng15.dll` or `libpng14-14.dll` or `libpng14.dll` or `libpng12.dll`
44
45 Obtainment instructions:
46 * be sure to use a 1.16.X release
47 * download MSYS2 Package [1] in x86 and x64 versions: https://packages.msys2.org/base/mingw-w64-libpng
48 * use dll from `bin` folder
49
50 ### macOS
51 Darkplaces loads `libpng16.16.dylib` or `libpng15.15.dylib` or `libpng14.14.dylib` or `libpng12.0.dylib`
52
53 # zlib
54 zlib is required to read *.pk3 files. Also it is a dependency of libpng and probably some other libraries.
55
56 ### Windows
57 Darkplaces loads: ifdef ZLIB_USES_WINAPI `zlibwapi.dll` or `zlib.dll` else `zlib1.dll`. We use `zlib1.dll`!
58
59 Obtainment instructions:
60 * download as MSYS2 Package [1] in x86 and x64 versions: https://packages.msys2.org/base/mingw-w64-zlib
61 * use dll from `bin` folder
62
63 ### macOS
64 Darkplaces loads `libz.dylib`
65
66 # libfreetype
67 Required for the Xolonium font
68
69 ### Windows
70 Darkplaces loads: `libfreetype-6.dll` or `freetype6.dll`
71
72 Obtainment instructions:
73 * Download x86 and x64 dlls from: https://github.com/ubawurinna/freetype-windows-binaries
74
75 ### macOS
76 Darkplaces loads: `libfreetype.6.dylib` or `libfreetype.dylib`
77
78 # libvorbis + libvorbisfile + libvorbisenc
79 libvorbis + libvorbisfile are used to play .ogg audio files while libvorbis + libvorbisenc is used for the audio in video capturing (cl_capturevideo)
80
81 ### Windows
82 Darkplaces loads `libvorbis-0.dll` or `libvorbis.dll` or `vorbis.dll` and `libvorbisfile-3.dll` or `libvorbisfile.dll` or `vorbisfile.dll` and `libvorbisenc-2.dll` or `vorbisenc-2.dll` or `vorbisenc.dll`
83
84 Obtainment instructions:
85 * download MSYS2 Package [1] in x86 and x64 versions: https://packages.msys2.org/base/mingw-w64-libvorbis
86 * use dll from `bin` folder
87
88 ### macOS
89 Darkplaces loads `libvorbis.dylib` and `libvorbisfile.dylib`
90
91 # libtheora
92 libtheora is used for the video in cl_capturevideo
93 libtheoraenc/libtheoradec are not needed, they are the newer API; darkplaces uses the legacy pre 1.0 API (libtheora).
94
95 ### Windows
96 Darkplaces loads `libtheora-0.dll` or `theora-0.dll` or `theora.dll`
97
98 Obtainment instructions:
99 * download MSYS2 Package [1] in x86 and x64 versions: https://packages.msys2.org/base/mingw-w64-libtheora
100 * use dll from `bin` folder
101
102 ### macOS
103 Darkplaces loads `libtheora.dylib`
104
105 # libogg
106 libogg is used for the container in cl_capturevideo
107
108 ### Windows
109 Darkplaces loads `libogg-0.dll` or `libogg.dll` or `ogg.dll`
110
111 Obtainment instructions:
112 * download MSYS2 Package [1] in x86 and x64 versions: https://packages.msys2.org/base/mingw-w64-libogg
113 * use dll from `bin` folder
114
115 ### macOS
116 Darkplaces loads `libogg.dylib`
117
118 # libd0_blind_id-0 & libd0_rijndael-0
119 Internal project, see https://gitlab.com/xonotic/d0_blind_id
120
121 # libgmp
122 A dependency of libd0_blind_id-0
123
124 ### Windows
125 libd0_blind_id-0 loads `libgmp-10.dll`
126
127 Obtainment instructions:
128 * download as MSYS2 Package [1] in x86 and x64 versions: https://packages.msys2.org/base/mingw-w64-gmp
129 * use dll from `bin` folder
130
131 # libode
132 Is not loaded under Windows and crashes the game if it is and a map is loaded up.
133 Also it is not statically linked and thus requires libstdc++-6.dll and libgcc_s_sjlj-1.dll.
134
135 # libavw
136 *Note:* Old and not used in Xonotic but also not disabled :) Adding this for the sake of completeness.
137
138 ### Windows
139 Darkplaces loads: `libavw.dll`
140
141 Source code: https://github.com/paulvortex/DpLibAVW
142
143 ### macOS
144 Darkplaces loads: `libavw.dylib`