]> git.xonotic.org Git - xonotic/xonotic.wiki.git/blob - Shared-libraries-(buildfiles).md
Update Shared libraries (buildfiles)
[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 # libcurl
10 libcurl is used for downloading *.pk3 files from servers
11
12 ### Windows
13 Darkplaces loads `libcurl-4.dll` or `libcurl-3.dll`
14
15 Build instructions:
16 * clone https://gitlab.com/incognico/build-libcurl-windows
17 * run `build.bat` in a VS2019 Development Shell
18 * rename the built dlls (x64 & x86) to `libcurl-4.dll`
19
20 ### macOS
21 Darkplaces loads `libcurl.4.dylib` or `libcurl.3.dylib` or `libcurl.2.dylib`
22
23 # libjpeg-turbo
24 libjpeg-turbo is needed to display jpeg images/textures
25
26 ### Windows
27 Darkplaces loads `libjpeg.dll`
28
29 Obtainment instructions:
30 * download `libjpeg-turbo-VERSION-vc.exe` & `libjpeg-turbo-VERSION-vc64.exe` from https://sourceforge.net/projects/libjpeg-turbo/files/
31 * extract the *.exe files and use `bin/jpeg62.dll`
32 * rename the dlls (x64 & x86) to `libjpeg.dll`
33
34 ### macOS
35 Darkplaces loads `libjpeg.62.dylib`
36
37 # libpng
38 libpng is needed to display png images/textures
39
40 ### Windows
41 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`
42
43 Obtainment instructions:
44 * download MSYS2 Package [1] in x86 and x64 versions: https://packages.msys2.org/base/mingw-w64-libpng
45 * use dll from `bin` folder
46
47 ### macOS
48 Darkplaces loads `libpng16.16.dylib` or `libpng15.15.dylib` or `libpng14.14.dylib` or `libpng12.0.dylib`
49
50 # zlib
51 zlib is required to read *.pk3 files. Also it is a dependency of libpng and probably some other libraries.
52
53 ### Windows
54 Darkplaces loads: ifdef ZLIB_USES_WINAPI `zlibwapi.dll` or `zlib.dll` else `zlib1.dll`. We use `zlib1.dll`!
55
56 Obtainment instructions:
57 * download as MSYS2 Package [1] in x86 and x64 versions: https://packages.msys2.org/base/mingw-w64-zlib
58 * use dll from `bin` folder
59
60 ### macOS
61 Darkplaces loads `libz.dylib`
62
63 # libfreetype
64 Required for the Xolonium font
65
66 ### Windows
67 Darkplaces loads: `libfreetype-6.dll` or `freetype6.dll`
68
69 Obtainment instructions:
70 * Download x86 and x64 dlls from: https://github.com/ubawurinna/freetype-windows-binaries
71
72 ### macOS
73 Darkplaces loads: `libfreetype.6.dylib` or `libfreetype.dylib`
74
75 # libvorbis + libvorbisfile + libvorbisenc
76 libvorbis + libvorbisfile are used to play .ogg audio files while libvorbis + libvorbisenc is used for the audio in video capturing (cl_capturevideo)
77
78 ### Windows
79 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`
80
81 Obtainment instructions:
82 * download MSYS2 Package [1] in x86 and x64 versions: https://packages.msys2.org/base/mingw-w64-libvorbis
83 * use dll from `bin` folder
84
85 ### macOS
86 Darkplaces loads `libvorbis.dylib` and `libvorbisfile.dylib`
87
88 # libtheora (+ libtheoraenc + libtheoradec)?
89 libtheora is used for the video in cl_capturevideo
90
91 ### Windows
92 Darkplaces loads `libtheora-0.dll` or `theora-0.dll` or `theora.dll`
93
94 Obtainment instructions:
95 * download MSYS2 Package [1] in x86 and x64 versions: https://packages.msys2.org/base/mingw-w64-libtheora
96 * use dll from `bin` folder
97
98 ### macOS
99 Darkplaces loads `libtheora.dylib`
100
101 # libogg
102 libogg is used as container in cl_capturevideo
103
104 ### Windows
105 Darkplaces loads `libogg-0.dll` or `libogg.dll` or `ogg.dll`
106
107 Obtainment instructions:
108 * download MSYS2 Package [1] in x86 and x64 versions: https://packages.msys2.org/base/mingw-w64-libogg
109 * use dll from `bin` folder
110
111 ### macOS
112 Darkplaces loads `libogg.dylib`
113
114 # libd0_blind_id-0 & libd0_rijndael-0
115 Internal project, see https://gitlab.com/xonotic/d0_blind_id
116
117 # libgmp
118 A dependency of libd0_blind_id-0
119
120 ### Windows
121 libd0_blind_id-0 loads `libgmp-10.dll`
122
123 Obtainment instructions:
124 * download as MSYS2 Package [1] in x86 and x64 versions: https://packages.msys2.org/base/mingw-w64-gmp
125 * use dll from `bin` folder
126
127 # libode
128 Is not loaded under Windows and crashes the game if it is.
129
130 # libavw
131 *Note:* Old and not used in Xonotic but also not disabled :) Adding this for the sake of completeness.
132
133 ### Windows
134 Darkplaces loads: `libavw.dll`
135
136 Source code: https://github.com/paulvortex/DpLibAVW
137
138 ### macOS
139 Darkplaces loads: `libavw.dylib`