]> git.rm.cloudns.org Git - xonotic/xonotic.wiki.git/commitdiff
Add script to rebuild libjpeg.
authorRudolf Polzer <divverent@gmail.com>
Wed, 8 Dec 2021 18:37:43 +0000 (18:37 +0000)
committerRudolf Polzer <divverent@gmail.com>
Wed, 8 Dec 2021 18:37:43 +0000 (18:37 +0000)
Shared-libraries-(buildfiles).md

index 5526f7b08289e23409294a8e47e9b6c113bb501e..56ecde41202b58498a87b706f24712ff182bbf3a 100644 (file)
@@ -26,12 +26,21 @@ Darkplaces loads `libcurl.4.dylib` or `libcurl.3.dylib` or `libcurl.2.dylib`
 libjpeg-turbo is needed to display jpeg images/textures
 
 ### Windows
-Darkplaces loads `libjpeg.dll`
 
-Obtainment instructions:
-* download `libjpeg-turbo-VERSION-vc.exe` & `libjpeg-turbo-VERSION-vc64.exe` from https://sourceforge.net/projects/libjpeg-turbo/files/
-* extract the *.exe files and use `bin/jpeg62.dll`
-* rename the dlls (x64 & x86) to `libjpeg.dll`
+```
+set -ex
+git clone https://github.com/libjpeg-turbo/libjpeg-turbo.git || true
+curl -o x86_64-w64-mingw32.cmake https://raw.githubusercontent.com/zyga/cmake-toolchains/master/Toolchain-Ubuntu-mingw64.cmake
+d0=$(pwd)
+rm -rf build
+mkdir build
+cd build
+cmake -DCMAKE_TOOLCHAIN_FILE="$d0/x86_64-w64-mingw32.cmake" -DCMAKE_SYSTEM_PROCESSOR=x86_64 -DCMAKE_INSTALL_PREFIX="$d0/out" -G"Unix Makefiles" "$d0/libjpeg-turbo"
+make
+make install
+cd "$d0"
+cp out/bin/libjpeg-62.dll ~/Games/xonotic/misc/buildfiles/win64/libjpeg.dll
+```
 
 ### macOS
 Darkplaces loads `libjpeg.62.dylib`