]> git.xonotic.org Git - xonotic/xonotic.wiki.git/blobdiff - Shared-libraries-(buildfiles).md
Delete noob guide images that were migrated to website in https://gitlab.com/xonotic...
[xonotic/xonotic.wiki.git] / Shared-libraries-(buildfiles).md
index 1451f4c526aa790961a1e0c6a4a5db9681333f08..56053581f0585dcb4936a9e87fa98da3c7d174e4 100644 (file)
@@ -259,13 +259,6 @@ cp out/bin/libtheora-0.dll ~/Games/xonotic/misc/buildfiles/win64/libtheora-0.dll
 ### macOS
 Darkplaces loads `libtheora.dylib`
 
-# libd0_blind_id-0 & libd0_rijndael-0
-Internal project, see https://gitlab.com/xonotic/d0_blind_id
-
-### Linux
-
-`LDFLAGS='-L$HOME/Games/xonotic/misc/builddeps/linux64/gmp/lib' CPPFLAGS='-I$HOME/Games/xonotic/misc/builddeps/linux64/gmp/include' ./configure --prefix=$HOME/Games/xonotic/misc/builddeps/linux64/d0_blind_id  --enable-static --disable-shared --with-pic`
-
 # libgmp
 A dependency of libd0_blind_id-0
 
@@ -300,6 +293,42 @@ cd "$d0"
 cp out/bin/libgmp-10.dll ~/Games/xonotic/misc/buildfiles/win64/libgmp-10.dll
 ```
 
+# libd0_blind_id-0 & libd0_rijndael-0
+Internal project, see https://gitlab.com/xonotic/d0_blind_id
+
+### Linux
+
+`LDFLAGS='-L$HOME/Games/xonotic/misc/builddeps/linux64/gmp/lib' CPPFLAGS='-I$HOME/Games/xonotic/misc/builddeps/linux64/gmp/include' ./configure --prefix=$HOME/Games/xonotic/misc/builddeps/linux64/d0_blind_id  --enable-static --disable-shared --with-pic`
+
+### Windows
+Cross-compiling (requires libgmp):
+
+```
+d0=$(pwd)
+GMP_ROOT="$d0/../gmp/out"
+export LDFLAGS="-L$GMP_ROOT/lib"
+export CPPFLAGS="-I$GMP_ROOT/include"
+
+git clone https://gitlab.com/xonotic/d0_blind_id.git
+
+cd d0_blind_id
+./autogen.sh
+sed -i '/libd0_blind_id_la_LDFLAGS/ s/$/ -no-undefined/' Makefile.am
+sed -i '/libd0_rijndael_la_LDFLAGS/ s/$/ -no-undefined/' Makefile.am
+
+cd "$d0"
+mkdir build
+mkdir out
+cd build
+"$d0/d0_blind_id/configure" --with-pic --prefix="$d0/out" --host=x86_64-w64-mingw32
+make
+make install
+
+cd "$d0"
+cp out/bin/libd0_blind_id-0.dll ~/Games/xonotic/misc/buildfiles/win64/libd0_blind_id-0.dll
+cp out/bin/libd0_rijndael-0.dll ~/Games/xonotic/misc/buildfiles/win64/libd0_rijndael-0.dll
+```
+
 # libode
 Is not loaded under Windows and crashes the game if it is and a map is loaded up.
 Also it is not statically linked and thus requires libstdc++-6.dll and libgcc_s_sjlj-1.dll.