From 1dd1f92b2f657bd52b952adb5372d4fd3d4cf998 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Wed, 8 Dec 2021 18:37:43 +0000 Subject: [PATCH] Add script to rebuild libjpeg. --- Shared-libraries-(buildfiles).md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/Shared-libraries-(buildfiles).md b/Shared-libraries-(buildfiles).md index 5526f7b..56ecde4 100644 --- a/Shared-libraries-(buildfiles).md +++ b/Shared-libraries-(buildfiles).md @@ -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` -- 2.39.2