]> git.rm.cloudns.org Git - xonotic/xonotic.wiki.git/commitdiff
Added libtheora cross-compiling
authorz411 <electrik.persona@gmail.com>
Wed, 29 Dec 2021 00:01:16 +0000 (00:01 +0000)
committerz411 <electrik.persona@gmail.com>
Wed, 29 Dec 2021 00:01:16 +0000 (00:01 +0000)
Shared-libraries-(buildfiles).md

index a01a58d55b5bd8587fbb4172f95406a3982f1d28..41ac9e1ae4fe2a46324eb2a4808c20a2e5aa3dde 100644 (file)
@@ -97,7 +97,7 @@ Obtainment instructions:
 * download MSYS2 Package [1] in x86 and x64 versions: https://packages.msys2.org/base/mingw-w64-libpng
 * use dll from `bin` folder
 
-Cross-compiling:
+Cross-compiling (requires zlib):
 
 ```
 d0=$(pwd)
@@ -187,12 +187,12 @@ Obtainment instructions:
 * download MSYS2 Package [1] in x86 and x64 versions: https://packages.msys2.org/base/mingw-w64-libvorbis
 * use dll from `bin` folder
 
-Cross-compiling:
+Cross-compiling (requires libogg):
 
 ```
 d0=$(pwd)
-OGG_ROOT=$d0/../ogg/out
 VORBISVER="v1.3.7"
+OGG_ROOT=$d0/../ogg/out
 
 git clone -b $VORBISVER https://gitlab.xiph.org/xiph/vorbis.git
 
@@ -228,6 +228,33 @@ Obtainment instructions:
 * download MSYS2 Package [1] in x86 and x64 versions: https://packages.msys2.org/base/mingw-w64-libtheora
 * use dll from `bin` folder
 
+Cross-compiling (requires libogg and libvorbis):
+
+```
+d0=$(pwd)
+THEORAVER="v1.1.1"
+OGG_ROOT="$d0/../ogg/out"
+VORBIS_ROOT="$d0/../vorbis/out"
+
+git clone -b $THEORAVER https://gitlab.xiph.org/xiph/theora.git
+
+# Fix mingw32 defs
+sed -i '1iLIBRARY libtheoradec' "$d0/theora/win32/xmingw32/libtheoradec-all.def"
+sed -i '1iLIBRARY libtheoraenc' "$d0/theora/win32/xmingw32/libtheoraenc-all.def"
+sed -i '/TH_VP31_QUANT_INFO/d' "$d0/theora/win32/xmingw32/libtheoraenc-all.def"
+sed -i '/TH_VP31_HUFF_CODES/d' "$d0/theora/win32/xmingw32/libtheoraenc-all.def"
+
+# Start build
+mkdir out
+mkdir build
+cd build
+$d0/theora/autogen.sh --host=x86_64-w64-mingw32 --prefix="$d0/out" --with-ogg="$OGG_ROOT" --with-vorbis="$VORBIS_ROOT" --enable-shared --disable-examples --disable-sdltest --disable-vorbistest --disable-oggtest
+make
+make install
+cd "$d0"
+cp out/bin/libtheora-0.dll ~/Games/xonotic/misc/buildfiles/win64/libtheora-0.dll
+```
+
 ### macOS
 Darkplaces loads `libtheora.dylib`