From 5826074374591394428420ced453ff0354950f8b Mon Sep 17 00:00:00 2001 From: Itms Date: Sun, 28 Sep 2025 12:35:57 +0200 Subject: [PATCH] Split building Unix tarballs and Win installer --- build/jenkins/pipelines/bundles.Jenkinsfile | 10 ++++++-- ...d-unix-win32.sh => build-unix-tarballs.sh} | 17 ------------- source/tools/dist/build-win-installer.sh | 24 +++++++++++++++++++ 3 files changed, 32 insertions(+), 19 deletions(-) rename source/tools/dist/{build-unix-win32.sh => build-unix-tarballs.sh} (65%) create mode 100755 source/tools/dist/build-win-installer.sh diff --git a/build/jenkins/pipelines/bundles.Jenkinsfile b/build/jenkins/pipelines/bundles.Jenkinsfile index 357ac2b108..5f29b32983 100644 --- a/build/jenkins/pipelines/bundles.Jenkinsfile +++ b/build/jenkins/pipelines/bundles.Jenkinsfile @@ -137,9 +137,9 @@ pipeline { } } - stage('Create Windows Installer & Tarballs') { + stage('Create Unix Tarballs') { steps { - sh "BUNDLE_VERSION=${params.BUNDLE_VERSION} DO_GZIP=${params.DO_GZIP} source/tools/dist/build-unix-win32.sh" + sh "BUNDLE_VERSION=${params.BUNDLE_VERSION} DO_GZIP=${params.DO_GZIP} source/tools/dist/build-unix-tarballs.sh" stash(name: 'unix-sources', includes: '*.tar.gz') } } @@ -185,6 +185,12 @@ pipeline { } } + stage('Create Windows Installer') { + steps { + sh "BUNDLE_VERSION=${params.BUNDLE_VERSION} source/tools/dist/build-win-installer.sh" + } + } + stage('Generate Signatures and Checksums') { steps { unstash('appimage') diff --git a/source/tools/dist/build-unix-win32.sh b/source/tools/dist/build-unix-tarballs.sh similarity index 65% rename from source/tools/dist/build-unix-win32.sh rename to source/tools/dist/build-unix-tarballs.sh index f3b8cb7834..8640f19f87 100755 --- a/source/tools/dist/build-unix-win32.sh +++ b/source/tools/dist/build-unix-tarballs.sh @@ -37,26 +37,9 @@ if [ "$DO_GZIP" = true ]; then 7zz a ${GZIP7ZOPTS} "$PREFIX"-unix-data.tar.gz "$PREFIX"-unix-data.tar fi -# Create Windows installer -# This needs nsisbi for files > 2GB -# nsisbi 3.09 and above fail to build on macOS, nsisbi 3.08.1 is used on the CD -# To build and install on macOS: -# - install mingw-w64 and scons with Homebrew -# - download the latest source at https://sourceforge.net/projects/nsisbi/files/ -# - build with `scons SKIPUTILS="Makensisw","NSIS Menu","zip2exe"` -# - install with `sudo scons install SKIPUTILS="Makensisw","NSIS Menu","zip2exe"` -# Running makensis also needs a LANG workaround for https://sourceforge.net/p/nsis/bugs/1165/ -LANG="en_GB.UTF-8" makensis -V4 -nocd \ - -dcheckoutpath="." \ - -dversion="${BUNDLE_VERSION}" \ - -dprefix="${PREFIX}" \ - -darchive_path="archives/" \ - source/tools/dist/0ad.nsi - # Fix permissions chmod -f 644 "${PREFIX}-unix-build.tar.xz" chmod -f 644 "${PREFIX}-unix-data.tar.xz" -chmod -f 644 "${PREFIX}-win32.exe" if [ "$DO_GZIP" = true ]; then chmod -f 644 "${PREFIX}-unix-build.tar.gz" chmod -f 644 "${PREFIX}-unix-data.tar.gz" diff --git a/source/tools/dist/build-win-installer.sh b/source/tools/dist/build-win-installer.sh new file mode 100755 index 0000000000..f196ce66dc --- /dev/null +++ b/source/tools/dist/build-win-installer.sh @@ -0,0 +1,24 @@ +#!/bin/sh +set -ev + +BUNDLE_VERSION=${BUNDLE_VERSION:="0.28.0dev"} +PREFIX="0ad-${BUNDLE_VERSION}" + +# Create Windows installer +# This needs nsisbi for files > 2GB +# nsisbi 3.10.3 is used on the CD +# To build and install on macOS: +# - install mingw-w64 and scons with Homebrew +# - download the latest source at https://sourceforge.net/projects/nsisbi/files/ +# - build with `scons SKIPUTILS="Makensisw","NSIS Menu","zip2exe"` +# - install with `sudo scons install SKIPUTILS="Makensisw","NSIS Menu","zip2exe"` +# Running makensis also needs a LANG workaround for https://sourceforge.net/p/nsis/bugs/1165/ +LANG="en_GB.UTF-8" makensis -V4 -nocd \ + -dcheckoutpath="." \ + -dversion="${BUNDLE_VERSION}" \ + -dprefix="${PREFIX}" \ + -darchive_path="archives/" \ + source/tools/dist/0ad.nsi + +# Fix permissions +chmod -f 644 "${PREFIX}-win32.exe"