summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjak1 <mike.wollmann@gmail.com>2020-12-20 18:09:58 +0100
committerjak1 <mike.wollmann@gmail.com>2020-12-20 18:09:58 +0100
commit1d5614958a67693f09a293728c61671129378968 (patch)
tree3b38d09ecca848b51bfb98a3e3ef62fb5a901b40
downloaddocker-windows-builder-1d5614958a67693f09a293728c61671129378968.tar.gz
docker-windows-builder-1d5614958a67693f09a293728c61671129378968.tar.bz2
docker-windows-builder-1d5614958a67693f09a293728c61671129378968.tar.xz
docker-windows-builder-1d5614958a67693f09a293728c61671129378968.zip
first push *hides*
-rw-r--r--.gitignore10
-rw-r--r--.gitlab-ci.yml48
-rw-r--r--Dockerfile48
-rw-r--r--README.md2
-rwxr-xr-xbuild.sh69
-rw-r--r--mxe.patch102
6 files changed, 279 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..7aeeead
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,10 @@
+# temp& backup files
+*~
+*.tmp
+
+# executables & libraries
+*.exe
+*.lib
+
+# .txt files ¬_¬ if u want to document andything use .md files!
+*.txt
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..ad653a6
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,48 @@
+stages:
+ - build
+# - test
+# - deploy
+# - release
+
+before_script:
+ - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
+
+mxe_gcc5:
+ only:
+ # change me
+ - branches@jak89_1/docker-testing
+ script:
+ # TODO: plz move me in a seperate script
+ - mkdir build
+ - mkdir logs
+ - cd /
+ # remove me
+ - ls -al
+ # change me
+ - git clone https://gitlab.com/jak89_1/manaplus.git -b $CI_COMMIT_BRANCH || exit 1
+ - cd manaplus
+ # change me in docker (later™)
+ - sed -i 's|#define GL_GLEXT_VERSION 29|#ifndef GL_GLEXT_VERSION\n#define GL_GLEXT_VERSION 29\n#endif|' /mxe/usr/i686-w64-mingw32.shared/include/SDL/SDL_opengl.h
+ - ./tools/ci/jobs/mxe_gcc5.sh
+ - find manaplus/src -type f -name "*.exe"
+ - mv manaplus.exe /build
+ - mv dyecmd.exe /build
+ - /mxe/tools/copydlldeps.py -C/manaplus/src -L/mxe/usr/i686-w64-mingw32.shared/bin /build || true
+ # TODO: nsis
+ - cp -r /manaplus/data /build
+ - cp /AUTHORS /build
+ - cp /COPYING /build
+ - cp /README.txt /build
+ - cp packaging/windows/portable.xml /build
+ - ls -al /build
+ image: registry.gitlab.com/jak89_1/docker-testing:v1.0.1
+ variables:
+ CROSS: i686-w64-mingw32.shared
+ artifacts:
+ paths:
+ - /build
+ - /logs
+ when: always
+ expire_in: 3 week
+ tags:
+ - docker
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..17efa2c
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,48 @@
+FROM debian:latest
+
+RUN apt-get update
+RUN apt-get install -y gnupg2
+RUN DEBIAN_FRONTEND=noninteractive
+RUN apt-get update
+RUN apt-get install -y\
+ autoconf\
+ automake\
+ autopoint\
+ bash\
+ bison\
+ bzip2\
+ flex\
+ g++\
+ g++-multilib\
+ gettext\
+ git\
+ gperf\
+ intltool\
+ libc6-dev-i386\
+ libgdk-pixbuf2.0-dev\
+ libltdl-dev\
+ libssl-dev\
+ libtool-bin\
+ libxml-parser-perl\
+ lzip\
+ make\
+ openssl\
+ p7zip-full\
+ patch\
+ perl\
+ python\
+ ruby\
+ sed\
+ unzip\
+ wget\
+ xz-utils\
+ gawk
+
+USER root
+WORKDIR /
+
+COPY build.sh build.sh
+COPY mxe.patch mxe.patch
+
+RUN chmod +x build.sh && ./build.sh
+
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..34ac99b
--- /dev/null
+++ b/README.md
@@ -0,0 +1,2 @@
+currently that is just a try, feel free to help me in case u know how to use a
+docker registry
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..2f20b66
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,69 @@
+#!/usr/bin/env bash
+export CROSS=i686-w64-mingw32.shared
+cross_req="cc smpeg ffmpeg sdl sdl_image sdl_ttf sdl_net sdl_gfx libxml2 curl libpng zlib gettext sdl_mixer"
+
+
+inf()
+{
+ echo "*** sys-info *** >---------------------------------------------------"
+ uname -a
+ echo "req. gcc: `which gcc`"
+ echo "req. g++: `which g++`"
+ echo "req. python: `which python`"
+ echo "req. autoconf: `which autoconf`"
+ echo "req. automake: `which automake`"
+ echo "req. autopoint: `which autopoint`"
+ echo "req. bash: `which bash`"
+ echo "req. bison: `which bison`"
+ echo "req. bzip2: `which bzip2`"
+ echo "req. flex: `which flex`"
+ echo "req. gettext: `which gettext`"
+ echo "req. git: `which git`"
+ echo "req. gperf: `which gperf`"
+ echo "req. intltool: `which intltoolize`"
+ echo "req. libtool-bin: `which libtool`"
+ echo "req. lzip: `which lzip`"
+ echo "req. make: `which make`"
+ echo "req. openssl: `which openssl`"
+ echo "req. p7zip-full: `which p7zip`"
+ echo "req. patch: `which patch`"
+ echo "req. perl: `which perl`"
+ echo "req. ruby: `which ruby`"
+ echo "req. sed: `which sed`"
+ echo "req. unzip: `which unzip`"
+ echo "req. wget: `which wget`"
+ echo "req. xz-utils: `which lzma`"
+ echo "*** sys-info *** <---------------------------------------------------"
+}
+
+mxe()
+{
+ echo "*** mxe-build >------------------------------------------------------"
+ cd /
+ git clone https://github.com/mxe/mxe.git
+ cd mxe
+
+ echo "MXE_TARGETS := ${CROSS}" > settings.mk
+ echo "LOCAL_PKG_LIST := ${cross_req}" >> settings.mk
+ echo ".DEFAULT_GOAL := local-pkg-list" >> settings.mk
+ echo 'local-pkg-list: $(LOCAL_PKG_LIST)' >> settings.mk
+
+ git apply ../mxe.patch || exit 1
+
+ make || exit 1
+ make clean-junk || exit 1 # disc space!
+ echo "*** mxe-build <------------------------------------------------------"
+}
+
+
+test_mxe()
+{
+ export PATH=/mxe/usr/bin:/mxe/usr/${CROSS}/bin:$PATH
+ echo `${CROSS}-gcc --version`
+ echo `${CROSS}-g++ --version`
+ echo "${PATH}"
+}
+
+inf
+mxe
+test_mxe
diff --git a/mxe.patch b/mxe.patch
new file mode 100644
index 0000000..35bea09
--- /dev/null
+++ b/mxe.patch
@@ -0,0 +1,102 @@
+diff --git a/src/curl.mk b/src/curl.mk
+index abbc491a..aee1b698 100644
+--- a/src/curl.mk
++++ b/src/curl.mk
+@@ -22,10 +22,10 @@ define $(PKG)_BUILD
+ $(MXE_CONFIGURE_OPTS) \
+ --with-winssl \
+ --without-ssl \
+- --with-libidn2 \
++ --without-libidn2 \
+ --enable-sspi \
+ --enable-ipv6 \
+- --with-libssh2 \
++ --without-libssh2 \
+ LIBS=`'$(TARGET)-pkg-config' pthreads --libs`
+ $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' $(MXE_DISABLE_DOCS)
+ $(MAKE) -C '$(BUILD_DIR)' -j 1 install $(MXE_DISABLE_DOCS)
+diff --git a/src/freetype.mk b/src/freetype.mk
+index ff8d3cdb..3196bcc6 100644
+--- a/src/freetype.mk
++++ b/src/freetype.mk
+@@ -8,7 +8,7 @@ $(PKG)_CHECKSUM := 86a854d8905b19698bbc8f23b860bc104246ce4854dcea8e3b0fb21284f75
+ $(PKG)_SUBDIR := freetype-$($(PKG)_VERSION)
+ $(PKG)_FILE := freetype-$($(PKG)_VERSION).tar.xz
+ $(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/freetype/freetype2/$(shell echo '$($(PKG)_VERSION)' | cut -d . -f 1,2,3)/$($(PKG)_FILE)
+-$(PKG)_DEPS := cc bzip2 harfbuzz libpng zlib
++$(PKG)_DEPS := cc bzip2 libpng zlib
+
+ define $(PKG)_UPDATE
+ $(WGET) -q -O- 'https://sourceforge.net/projects/freetype/files/freetype2/' | \
+@@ -18,13 +18,13 @@ define $(PKG)_UPDATE
+ endef
+
+ define $(PKG)_BUILD_COMMON
+- cd '$(1)' && GNUMAKE=$(MAKE) ./configure --with-harfbuzz=yes \
++ cd '$(1)' && GNUMAKE=$(MAKE) ./configure --with-harfbuzz=no \
+ $(MXE_CONFIGURE_OPTS) \
+- --enable-freetype-config \
++ --enable-freetype-config --without-bzip2 \
+ LIBPNG_CFLAGS="`$(TARGET)-pkg-config libpng --cflags`" \
+ LIBPNG_LDFLAGS="`$(TARGET)-pkg-config libpng --libs`" \
+ FT2_EXTRA_LIBS="`$(TARGET)-pkg-config libpng --libs`" \
+- $(if $(BUILD_STATIC),HARFBUZZ_LIBS="`$(TARGET)-pkg-config harfbuzz --libs` -lharfbuzz_too -lfreetype_too `$(TARGET)-pkg-config glib-2.0 --libs`",)
++ $(if $(BUILD_STATIC),HARFBUZZ_LIBS="`$(TARGET)-pkg-config --libs` -lfreetype_too `$(TARGET)-pkg-config glib-2.0 --libs`",)
+ $(MAKE) -C '$(1)' -j '$(JOBS)'
+ $(MAKE) -C '$(1)' -j 1 install
+ ln -sf '$(PREFIX)/$(TARGET)/bin/freetype-config' '$(PREFIX)/bin/$(TARGET)-freetype-config'
+diff --git a/src/gettext.mk b/src/gettext.mk
+index 3874190d..1069ca08 100644
+--- a/src/gettext.mk
++++ b/src/gettext.mk
+@@ -11,7 +11,7 @@ $(PKG)_URL := https://ftp.gnu.org/gnu/gettext/$($(PKG)_FILE)
+ $(PKG)_URL_2 := https://ftpmirror.gnu.org/gettext/$($(PKG)_FILE)
+ # native gettext isn't technically required, but downstream
+ # cross-packages may need binaries and/or *.m4 files etc.
+-$(PKG)_DEPS := cc libiconv $(BUILD)~$(PKG)
++$(PKG)_DEPS := cc libiconv expat $(BUILD)~$(PKG)
+
+ $(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS)
+ $(PKG)_DEPS_$(BUILD) := libiconv
+diff --git a/src/sdl_image.mk b/src/sdl_image.mk
+index b9faead9..6c0305f1 100644
+--- a/src/sdl_image.mk
++++ b/src/sdl_image.mk
+@@ -20,11 +20,15 @@ define $(PKG)_UPDATE
+ endef
+
+ define $(PKG)_BUILD
+- $(SED) -i 's,^\(Requires:.*\),\1 libtiff-4 libpng libwebp,' '$(SOURCE_DIR)/SDL_image.pc.in'
++ $(SED) -i 's,^\(Requires:.*\),\1 libpng,' '$(SOURCE_DIR)/SDL_image.pc.in'
+ cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \
+ $(MXE_CONFIGURE_OPTS) \
+ --with-sdl-prefix='$(PREFIX)/$(TARGET)' \
+ --disable-sdltest \
++ --enable-tif-shared \
++ --disable-jpg-shared \
++ --disable-png-shared \
++ --enable-webp-shared \
+ $(if $(BUILD_STATIC), \
+ --disable-jpg-shared \
+ --disable-png-shared \
+diff --git a/src/sdl_mixer.mk b/src/sdl_mixer.mk
+index 3542e13d..8d22635c 100644
+--- a/src/sdl_mixer.mk
++++ b/src/sdl_mixer.mk
+@@ -32,10 +32,15 @@ define $(PKG)_BUILD
+ --with-sdl-prefix='$(PREFIX)/$(TARGET)' \
+ --disable-sdltest \
+ --disable-music-mod \
+- --enable-music-mod-modplug \
++ --disable-music-mod-modplug \
++ --disable-music-mod \
+ --enable-music-ogg \
++ --disable-music-ogg-shared \
+ --disable-music-flac \
++ --disable-music-fluidsynth-shared \
+ --enable-music-mp3 \
++ --disable-smpegtest \
++ --disable-smpeg \
+ $(if $(BUILD_STATIC), \
+ --disable-music-mod-shared \
+ --disable-music-ogg-shared \