]> 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 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/search [1] with the exception being an official DLL release from the upstream available (this is the case for libjpeg-turbo) or if it has to be compiled on under Windows for some reason (eg. libcurl for Schannel (Windows crypto for HTTPS) support).
6
7 # libcurl
8 libcurl is used for downloading *.pk3 files from servers
9
10 ### Windows
11 Darkplaces loads `libcurl-4.dll` or `libcurl-3.dll`
12
13 Build instructions:
14 * clone https://gitlab.com/incognico/build-libcurl-windows
15 * run `build.bat` in a VS2019 Development Shell
16 * rename the built dlls (x64 & x86) to `libcurl-4.dll`
17
18 ### macOS
19 Darkplaces loads `libcurl.4.dylib` or `libcurl.3.dylib` or `libcurl.2.dylib`
20
21 # libjpeg-turbo
22 libjpeg-turbo is needed to display jpeg images/textures
23
24 ### Windows
25 Darkplaces loads `libjpeg.dll`
26
27 Obtainment instructions:
28 * download libjpeg-turbo-VERSION-vc.exe & libjpeg-turbo-VERSION-vc64.exe from https://sourceforge.net/projects/libjpeg-turbo/files/
29 * extract the *.exe files and use `bin/jpeg62.dll`
30 * rename the dlls (x64 & x86) to `libjpeg.dll`
31
32 ### macOS
33 Darkplaces loads `libjpeg.62.dylib`
34
35 # libpng
36 libpng is needed to display png images/textures
37
38 ### Windows
39 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`
40
41 ### macOS
42 Darkplaces loads `libpng16.16.dylib` or `libpng15.15.dylib` or `libpng14.14.dylib` or `libpng12.0.dylib`
43
44 # zlib
45 zlib is required to read *.pk3 files. Also it is a dependency of libpng and probably some other libraries.
46
47 ### Windows
48 Darkplaces loads: ifdef ZLIB_USES_WINAPI `zlibwapi.dll` or `zlib.dll` else `zlib1.dll`. We use `zlib1.dll`!
49
50 Obtainment instructions:
51 * Download as MSYS2 Package [1] in x86 and x64 versions
52
53 ### macOS
54 Darkplaces loads `libz.dylib`
55
56 # libfreetype
57
58 # libogg
59
60 # libvorbis
61
62 # libvorbisfile
63
64 # libvorbisenc
65
66 # libtheora
67
68 # libstdc++-6 & libgcc_s_sjlj-1
69 libgcc_s_sjlj-1 is a dependency of libstdc++-6
70
71 # libd0_blind_id-0 & libd0_rijndael-0
72 See https://gitlab.com/xonotic/d0_blind_id
73
74 # libgmp
75 A dependency of libd0_blind_id-0