commit 6cbdb10f
Added an OpenArena engine builder
Changed files
| A | mxe_openarena_builder/Dockerfile |
| A | mxe_openarena_builder/engine_compile_script.sh |
diff --git a/mxe_openarena_builder/Dockerfile b/mxe_openarena_builder/Dockerfile
new file mode 100644
index 0000000..51031f9
--- /dev/null
+++ b/mxe_openarena_builder/Dockerfile
@@ -0,0 +1,20 @@
+FROM sago007/mxe_basic
+MAINTAINER poul@poulsander.com
+RUN apt-get update && apt-get install -y mxe-i686-w64-mingw32.static-vorbis mxe-i686-w64-mingw32.static-sdl2 mxe-i686-w64-mingw32.static-sdl2 mxe-i686-w64-mingw32.static-openal zip
+
+RUN adduser --disabled-password --gecos "OpenArena user" openarena && \
+ mkdir -p /data && chmod 777 /data && \
+ mkdir -p /staging && chmod 777 /staging
+
+VOLUME ["/data"]
+
+COPY engine_compile_script.sh /opt/
+
+#ADD http://files.poulsander.com/~poul19/public_files/libxmp-4.3.13.tar.gz /tmp/
+
+#RUN chmod 666 /tmp/libxmp-4.3.13.tar.gz
+
+#This does not create a correct static library. We likely need to generate a new configure file that supports cross compiling static libraries or libxmp needs a fix.
+#RUN cd /tmp && tar -xzf libxmp-4.3.13.tar.gz && cd libxmp* && ./configure --host=i686-w64-mingw32.static --enable-static --disable-shared && make && cp /tmp/libxmp-4.3.13/lib/libxmp.a /usr/lib/mxe/usr/i686-w64-mingw32.static/lib/
+
+USER openarena
diff --git a/mxe_openarena_builder/engine_compile_script.sh b/mxe_openarena_builder/engine_compile_script.sh
new file mode 100755
index 0000000..f3f9849
--- /dev/null
+++ b/mxe_openarena_builder/engine_compile_script.sh
@@ -0,0 +1,21 @@
+#! /bin/bash
+set -euo pipefail
+cd /staging
+git clone git://github.com/OpenArena/engine.git
+#cp /tmp/libxmp-4.3.13/lib/libxmp.a /staging/engine/code/libs/win32/
+cd engine
+VERSION_ID=$(git log -1 --date=short --format="openarena_engine_windows_%cd_%H")
+echo $VERSION_ID
+STAGING_DIR=/staging/$VERSION_ID
+mkdir $STAGING_DIR
+#make
+#mv /staging/engine/build/release-linux-x86_64/oa_ded.x86_64 $STAGING_DIR/
+#mv /staging/engine/build/release-linux-x86_64/openarena.x86_64 $STAGING_DIR/
+#mv /staging/engine/build/release-linux-x86_64/renderer_*_x86_64.so $STAGING_DIR/
+#Windows version does not work at the moment
+cd /staging/engine
+PLATFORM=mingw32 ARCH=x86 CC=i686-w64-mingw32.static-gcc WINDRES=i686-w64-mingw32.static-windres LD=i686-w64-mingw32.static-ld PKG_CONFIG_PATH=/usr/lib/mxe/usr/i686-w64-mingw32.static/lib/pkgconfig/ make USE_CODEC_XMP=0
+mv /staging/engine/build/release-mingw32-x86/*.exe $STAGING_DIR/
+cd /staging
+zip -r $VERSION_ID $VERSION_ID
+mv $VERSION_ID.zip /data/