* 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)
* 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
* 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`