From dbde914a9bbc42bb5af41ef93f31cbe31a5adb29 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Sun, 17 May 2020 23:54:35 +0000 Subject: [PATCH 01/13] Bundle QtApng on Windows --- .gitlab-ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bc15619..5c1da36 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -83,6 +83,9 @@ build windows i686: - git submodule init - git submodule update + # Print versions + - /opt/mxe/usr/${TARGET_SPEC}/qt5/bin/qmake --version + # Extract BASS - mkdir bass - cd bass @@ -94,6 +97,14 @@ build windows i686: - cp bassopus.dll ../lib - cd .. + # Extract QtApng + - mkdir qtapng + - cd qtapng + - curl -L https://github.com/Skycoder42/QtApng/releases/download/1.1.2-2/qtapng_mingw73_32_5.13.0.zip -o apng.zip + - unzip apng.zip + - cp mingw73_32/plugins/imageformats/qapng.dll ../lib + - cd .. + # Build - /opt/mxe/usr/${TARGET_SPEC}/qt5/bin/qmake "DEFINES += DISCORD BASSAUDIO" - make -j4 @@ -165,6 +176,8 @@ deploy windows i686: # Platform-specific - cp -a ../lib/*.dll . + - mkdir imageformats + - cp -a ../lib/imageformats/*.dll imageformats/ - cp -a ../bin/Attorney_Online.exe . # Zipping From c9b9822bdbf9d0ade3c516d4b63a6a2e73245610 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Mon, 18 May 2020 00:01:00 +0000 Subject: [PATCH 02/13] CI: Copy qapng.dll to correct location --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5c1da36..ae0f87a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -102,7 +102,8 @@ build windows i686: - cd qtapng - curl -L https://github.com/Skycoder42/QtApng/releases/download/1.1.2-2/qtapng_mingw73_32_5.13.0.zip -o apng.zip - unzip apng.zip - - cp mingw73_32/plugins/imageformats/qapng.dll ../lib + - mkdir ../lib/imageformats + - cp mingw73_32/plugins/imageformats/qapng.dll ../lib/imageformats/ - cd .. # Build From bc4fd2bccd1f62696c3da4f765684527fcbb8e50 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Tue, 19 May 2020 22:24:38 +0000 Subject: [PATCH 03/13] CI: Don't use dynamic QtApng on Windows --- .gitlab-ci.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ae0f87a..116e340 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -98,13 +98,15 @@ build windows i686: - cd .. # Extract QtApng - - mkdir qtapng - - cd qtapng - - curl -L https://github.com/Skycoder42/QtApng/releases/download/1.1.2-2/qtapng_mingw73_32_5.13.0.zip -o apng.zip - - unzip apng.zip - - mkdir ../lib/imageformats - - cp mingw73_32/plugins/imageformats/qapng.dll ../lib/imageformats/ - - cd .. + # - mkdir qtapng + # - cd qtapng + # - curl -L https://github.com/Skycoder42/QtApng/releases/download/1.1.2-2/qtapng_mingw73_32_5.13.0.zip -o apng.zip + # - unzip apng.zip + # - mkdir ../lib/imageformats + # - cp mingw73_32/plugins/imageformats/qapng.dll ../lib/imageformats/ + # - cd .. + + - ls lib # Build - /opt/mxe/usr/${TARGET_SPEC}/qt5/bin/qmake "DEFINES += DISCORD BASSAUDIO" @@ -178,7 +180,7 @@ deploy windows i686: # Platform-specific - cp -a ../lib/*.dll . - mkdir imageformats - - cp -a ../lib/imageformats/*.dll imageformats/ + - cp -a ../lib/imageformats/*.dll imageformats/ || : - cp -a ../bin/Attorney_Online.exe . # Zipping From 4f8367bf2f5b3294d9a82ebf9fb08d6e3bf83b94 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Tue, 19 May 2020 22:28:21 +0000 Subject: [PATCH 04/13] CI: Fix YAML syntax error --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 116e340..01f69c3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -180,7 +180,7 @@ deploy windows i686: # Platform-specific - cp -a ../lib/*.dll . - mkdir imageformats - - cp -a ../lib/imageformats/*.dll imageformats/ || : + - 'cp -a ../lib/imageformats/*.dll imageformats/ || :' - cp -a ../bin/Attorney_Online.exe . # Zipping From 8989c4fbc944a9658bd7817d33ec52a3976172f9 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Tue, 19 May 2020 23:50:48 +0000 Subject: [PATCH 05/13] CI: Update Dockerfile --- scripts/windows/Dockerfile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/windows/Dockerfile b/scripts/windows/Dockerfile index f4f1a83..b9a12d6 100644 --- a/scripts/windows/Dockerfile +++ b/scripts/windows/Dockerfile @@ -10,5 +10,12 @@ RUN /opt/mxe/usr/bin/${TARGET_SPEC}-cmake .. -DCMAKE_INSTALL_PREFIX=/opt/mxe/usr RUN /opt/mxe/usr/bin/${TARGET_SPEC}-cmake --build . --config Release --target install WORKDIR ../.. -# NOTE: Do not build QtApng statically! libpng contains a self-test entry point that -# takes precedence for some reason over the final build's entry point. +# Build QtApng statically +RUN git clone https://github.com/Skycoder42/QtApng +WORKDIR QtApng +# libpng contains a self-test entry point that takes precedence for some reason +# over the final build's entry point. +RUN sed -i "s/^main(/libpng_main(/g" src/3rdparty/libpng/src/pngtest.c +RUN /opt/mxe/usr/${TARGET_SPEC}/qt5/bin/qmake +RUN make && make install +WORKDIR .. \ No newline at end of file From 775417520678862a46e121efb8804a1998232228 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Wed, 20 May 2020 18:20:44 +0000 Subject: [PATCH 06/13] CI: use simpler release script --- .gitlab-ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 01f69c3..b11cfbd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -213,8 +213,11 @@ publish linux x86_64: - deploy linux x86_64 when: manual script: + - apt-get update + - apt-get install --no-install-recommends -y awscli + - cd zip - - ../scripts/wasabi.sh + - ../scripts/wasabi_program.sh variables: MANIFEST: program_linux_x86_64.json ARTIFACT_SUFFIX: _linux_x64.tar.xz @@ -226,8 +229,11 @@ publish windows i686: - deploy windows i686 when: manual script: + - apt-get update + - apt-get install --no-install-recommends -y awscli + - cd zip - - ../scripts/wasabi.sh + - ../scripts/wasabi_program.sh variables: MANIFEST: program_winnt_i386.json ARTIFACT_SUFFIX: _windows_x86.zip From 2cf5a046cae02d6e0da283190f7c303f607e1c75 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Wed, 20 May 2020 19:08:38 +0000 Subject: [PATCH 07/13] wasabi_program.sh: use bash instead of sh --- scripts/wasabi_program.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/wasabi_program.sh b/scripts/wasabi_program.sh index 41e2e35..37feac6 100755 --- a/scripts/wasabi_program.sh +++ b/scripts/wasabi_program.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Updates the specified program manifest to a new archive and version # and uploads the new archive and manifest to S3/Wasabi. # From 8a4d5e88e0b9e917c5cb3e47fd10ded9d0484b68 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Wed, 20 May 2020 19:24:56 +0000 Subject: [PATCH 08/13] CI: install more dependencies for publish job --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b11cfbd..162d5d5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -214,7 +214,7 @@ publish linux x86_64: when: manual script: - apt-get update - - apt-get install --no-install-recommends -y awscli + - apt-get install --no-install-recommends -y git nodejs awscli - cd zip - ../scripts/wasabi_program.sh @@ -230,7 +230,7 @@ publish windows i686: when: manual script: - apt-get update - - apt-get install --no-install-recommends -y awscli + - apt-get install --no-install-recommends -y git nodejs awscli - cd zip - ../scripts/wasabi_program.sh From 5a023e3e07c6d9f0649b5c6b915be9984508415c Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Wed, 20 May 2020 19:38:23 +0000 Subject: [PATCH 09/13] CI: npm install before running script --- .gitlab-ci.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 162d5d5..e9685de 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -214,13 +214,16 @@ publish linux x86_64: when: manual script: - apt-get update - - apt-get install --no-install-recommends -y git nodejs awscli + - apt-get install --no-install-recommends -y git nodejs npm awscli + - cd scripts + - npm install + - cd .. - cd zip - ../scripts/wasabi_program.sh variables: MANIFEST: program_linux_x86_64.json - ARTIFACT_SUFFIX: _linux_x64.tar.xz + ARTIFACT_SUFFIX: linux_x64.tar.xz publish windows i686: image: ubuntu @@ -230,10 +233,13 @@ publish windows i686: when: manual script: - apt-get update - - apt-get install --no-install-recommends -y git nodejs awscli + - apt-get install --no-install-recommends -y git nodejs npm awscli + - cd scripts + - npm install + - cd .. - cd zip - ../scripts/wasabi_program.sh variables: MANIFEST: program_winnt_i386.json - ARTIFACT_SUFFIX: _windows_x86.zip + ARTIFACT_SUFFIX: windows_x86.zip From 593e9d7353f601f81bbe26925ace4966434e7370 Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Wed, 17 Apr 2019 11:07:09 -0500 Subject: [PATCH 10/13] Miscellaneous changes to CI scripts --- scripts/update_manifest.js | 4 +--- scripts/windows/Dockerfile | 5 +++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/update_manifest.js b/scripts/update_manifest.js index 1a06a2d..bbd2a5f 100755 --- a/scripts/update_manifest.js +++ b/scripts/update_manifest.js @@ -101,9 +101,7 @@ const specialActions = changesFile ? // higher-level directories will succeed. .concat(Array.from(dirsDeleted.values()) .sort((a, b) => b.split("/").length - a.split("/").length) - .map(dir => { - return { action: "deleteDir", target: dir }; - })) + .map(dir => ({ action: "deleteDir", target: dir }))) : []; const urlBase = "https://s3.wasabisys.com/ao-downloads/"; diff --git a/scripts/windows/Dockerfile b/scripts/windows/Dockerfile index b9a12d6..9d3cca0 100644 --- a/scripts/windows/Dockerfile +++ b/scripts/windows/Dockerfile @@ -3,6 +3,11 @@ FROM oldmud0/mxe-qt:5.13.0-win32-static-posix ENV TARGET_SPEC i686-w64-mingw32.static.posix +# Build libarchive statically +WORKDIR /opt/mxe +RUN make -j4 MXE_TARGETS=${TARGET_SPEC} libarchive bzip2 xz lz4 zstd nettle expat libxml2 +WORKDIR / + # Build Discord RPC statically RUN git clone https://github.com/discordapp/discord-rpc WORKDIR discord-rpc/build From 76af6c030f337d97117331bb7c66bc8e37782d1a Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Tue, 18 Aug 2020 12:39:58 -0500 Subject: [PATCH 11/13] CI: Pin Linux target to Ubuntu 16.04 (Qt 5.9.5) --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e0b0886..faa01d4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,7 +15,7 @@ before_script: - echo Current working directory is $(pwd) build linux x86_64: - image: ubuntu + image: ubuntu:18.04 stage: build tags: - docker From d10ad44ff9656e6128b63cf932289b1bf875bc3e Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Tue, 18 Aug 2020 14:24:15 -0500 Subject: [PATCH 12/13] CI: Build QtApng on Linux - Set lib as artifact instead of cache (to avoid race condition described in https://gitlab.com/gitlab-org/gitlab/-/issues/21409) - Delete _Unadapted folder and .git files when exporting artifact (yuck! should probably have never incorporated AO2-Themes as a separate repo; it should probably have stayed part of the vanilla repo.) --- .gitlab-ci.yml | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index faa01d4..6cb63b3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,8 +5,6 @@ stages: cache: key: ${CI_COMMIT_REF_SLUG} - paths: - - lib/ variables: DEBIAN_FRONTEND: noninteractive @@ -53,11 +51,21 @@ build linux x86_64: - cd .. # Extract QtApng - - mkdir qtapng - - cd qtapng - - curl -L https://github.com/Skycoder42/QtApng/releases/download/1.1.0-5/build_gcc_64_5.12.0.tar.xz -o apng.tar.xz - - tar -xvf apng.tar.xz - - cp gcc_64/plugins/imageformats/libqapng.so ../lib + #- mkdir qtapng + #- cd qtapng + #- curl -L https://github.com/Skycoder42/QtApng/releases/download/1.1.0-5/build_gcc_64_5.12.0.tar.xz -o apng.tar.xz + #- tar -xvf apng.tar.xz + #- cp gcc_64/plugins/imageformats/libqapng.so ../lib + #- cd .. + + # Build QtApng + - git clone https://github.com/Skycoder42/QtApng + - cd QtApng + - qmake -spec linux-clang + # Don't make examples - they're not compatible with Qt 5.9 + - make -j4 sub-src + #- make sub-src-install_subtargets + - cp plugins/imageformats/libqapng.so ../lib - cd .. # Build @@ -68,6 +76,7 @@ build linux x86_64: - upx --lzma -9 --force bin/Attorney_Online artifacts: paths: + - lib/ - bin/ build windows i686: @@ -116,12 +125,15 @@ build windows i686: - upx --lzma -9 --force bin/Attorney_Online.exe artifacts: paths: + - lib/ - bin/ # Base folder .deploy_base: &deploy_base | mkdir base cp -a ../base/ base/ + rm -rf base/themes/_Unadapted/ + rm base/themes/.gitattributes base/themes/.git # Miscellaneous files .deploy_misc: &deploy_misc | From a9ca555ec532f46a5e5b29404434ae7295814163 Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Tue, 18 Aug 2020 15:22:58 -0500 Subject: [PATCH 13/13] CI: Fix nested base folders in artifact --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6cb63b3..85bf7f3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -130,7 +130,6 @@ build windows i686: # Base folder .deploy_base: &deploy_base | - mkdir base cp -a ../base/ base/ rm -rf base/themes/_Unadapted/ rm base/themes/.gitattributes base/themes/.git