mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
Create a 64-bit Windows installer in bundles
This commit is contained in:
parent
78eba9f8c7
commit
acf0ccc8dc
3 changed files with 63 additions and 7 deletions
|
|
@ -18,7 +18,7 @@
|
|||
// This pipeline is used to generate bundles (Windows installer, macOS package, and source tarballs).
|
||||
|
||||
// On macOS, binaries are built for both architectures, the native one is used for packaging archives.
|
||||
// On Windows, the win32 binary is rebuilt for patch releases.
|
||||
// On Windows, the win32 binary is rebuilt for patch releases, and the win64 one in all cases.
|
||||
|
||||
def visualStudioPath = '"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe"'
|
||||
def buildOptions = '/p:PlatformToolset=v143 /t:pyrogenesis /t:AtlasUI %JOBS% /nologo -clp:Warningsonly -clp:ErrorsOnly'
|
||||
|
|
@ -190,7 +190,7 @@ pipeline {
|
|||
}
|
||||
}
|
||||
|
||||
stage('Create Windows Installer') {
|
||||
stage('Create Windows Installers') {
|
||||
stages {
|
||||
stage('32-bit rebuild') {
|
||||
when {
|
||||
|
|
@ -240,7 +240,60 @@ pipeline {
|
|||
sh 'rm win32-rebuild.tar.gz'
|
||||
}
|
||||
}
|
||||
sh "BUNDLE_VERSION=${params.BUNDLE_VERSION} source/tools/dist/build-win-installer.sh"
|
||||
sh "BUNDLE_VERSION=${params.BUNDLE_VERSION} WINARCH=win32 source/tools/dist/build-win-installer.sh"
|
||||
}
|
||||
}
|
||||
|
||||
stage('64-bit build') {
|
||||
agent {
|
||||
node {
|
||||
label 'WindowsAgent'
|
||||
customWorkspace 'workspace/win64-bundle-build'
|
||||
}
|
||||
}
|
||||
environment {
|
||||
HOSTTYPE = 'amd64'
|
||||
}
|
||||
steps {
|
||||
checkout changelog: false, poll: false, scm: [
|
||||
$class: 'SubversionSCM',
|
||||
locations: [[local: '.', remote: "https://svn.wildfiregames.com/nightly-build/trunk@${NIGHTLY_REVISION}"]],
|
||||
quietOperation: false,
|
||||
workspaceUpdater: [$class: 'UpdateWithCleanUpdater']]
|
||||
script {
|
||||
if (params.PATCH_BUILD) {
|
||||
copyArtifacts projectName: '0ad-patch-release', selector: upstream()
|
||||
bat "svn patch ${params.BUNDLE_VERSION}.patch"
|
||||
}
|
||||
}
|
||||
|
||||
bat 'cd libraries && get-windows-libs.bat --amd64'
|
||||
bat '(robocopy E:\\wxWidgets-3.2.8\\lib libraries\\win64\\wxwidgets\\lib /MIR /NDL /NJH /NJS /NP /NS /NC) ^& IF %ERRORLEVEL% LEQ 1 exit 0'
|
||||
bat '(robocopy E:\\wxWidgets-3.2.8\\include libraries\\win64\\wxwidgets\\include /MIR /NDL /NJH /NJS /NP /NS /NC) ^& IF %ERRORLEVEL% LEQ 1 exit 0'
|
||||
bat 'cd build\\workspaces && update-workspaces.bat --without-pch --without-tests'
|
||||
bat "cd build\\workspaces\\vs2022 && ${visualStudioPath} pyrogenesis.sln /p:Configuration=Release ${buildOptions}"
|
||||
|
||||
script {
|
||||
def modifiedFiles = bat(script:'@svn status', returnStdout: true).split('\n').collect { l -> l.drop(8).trim() }.join(', ')
|
||||
tar archive: true, compress: true, exclude: '*.orig, binaries/system/*.exp, binaries/system/*.lib, build/workspaces/vs2022, libraries/win32/**, libraries/win64/**', file: 'win64-build.tar.gz', glob: modifiedFiles
|
||||
}
|
||||
stash name: 'win64-build', includes: 'win64-build.tar.gz'
|
||||
}
|
||||
post {
|
||||
cleanup {
|
||||
bat 'svn revert -R .'
|
||||
bat 'svn cleanup --remove-unversioned'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('64-bit installer') {
|
||||
steps {
|
||||
unstash 'win64-build'
|
||||
untar file: 'win64-build.tar.gz', keepPermissions: false
|
||||
sh 'rm win64-build.tar.gz'
|
||||
|
||||
sh "BUNDLE_VERSION=${params.BUNDLE_VERSION} WINARCH=win64 source/tools/dist/build-win-installer.sh"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -261,7 +314,7 @@ pipeline {
|
|||
|
||||
post {
|
||||
success {
|
||||
archiveArtifacts artifacts: '*AppImage,*.dmg,*.exe,*.tar.gz,*.tar.xz,*.minisig,*.md5sum,*.sha1sum,*.sha256sum', excludes: 'win32-rebuild.tar.gz'
|
||||
archiveArtifacts artifacts: '*AppImage,*.dmg,*.exe,*.tar.gz,*.tar.xz,*.minisig,*.md5sum,*.sha1sum,*.sha256sum', excludes: 'win32-rebuild.tar.gz, win64-build.tar.gz'
|
||||
}
|
||||
cleanup {
|
||||
sh 'svn revert -R .'
|
||||
|
|
|
|||
4
source/tools/dist/0ad.nsi
vendored
4
source/tools/dist/0ad.nsi
vendored
|
|
@ -1,7 +1,7 @@
|
|||
; To generate the installer (on Linux):
|
||||
; Export the nightly build into a directory called e.g. "nightly-build"
|
||||
; Archivebuild the mod and public mods into e.g. "archives"
|
||||
; makensis -nocd -dcheckoutpath=nightly-build -dversion=0.xxx.0 -dprefix=0ad-0.xxx.0 -darchive_path=archives nightly-build/source/tools/dist/0ad.nsi
|
||||
; makensis -nocd -dcheckoutpath=nightly-build -dversion=0.xxx.0 -dprefix=0ad-0.xxx.0 -dwinarch=win32 -darchive_path=archives nightly-build/source/tools/dist/0ad.nsi
|
||||
|
||||
SetCompressor /SOLID LZMA
|
||||
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
;Name and file
|
||||
Name "0 A.D."
|
||||
OutFile "${PREFIX}-win32.exe"
|
||||
OutFile "${PREFIX}-${WINARCH}.exe"
|
||||
|
||||
;Default installation folder
|
||||
InstallDir "$LOCALAPPDATA\0 A.D."
|
||||
|
|
|
|||
5
source/tools/dist/build-win-installer.sh
vendored
5
source/tools/dist/build-win-installer.sh
vendored
|
|
@ -4,6 +4,8 @@ set -ev
|
|||
BUNDLE_VERSION=${BUNDLE_VERSION:="0.28.0dev"}
|
||||
PREFIX="0ad-${BUNDLE_VERSION}"
|
||||
|
||||
WINARCH=${WINARCH:="win32"}
|
||||
|
||||
# Create Windows installer
|
||||
# This needs nsisbi for files > 2GB
|
||||
# nsisbi 3.10.3 is used on the CD
|
||||
|
|
@ -17,8 +19,9 @@ LANG="en_GB.UTF-8" makensis -V4 -nocd \
|
|||
-dcheckoutpath="." \
|
||||
-dversion="${BUNDLE_VERSION}" \
|
||||
-dprefix="${PREFIX}" \
|
||||
-dwinarch="${WINARCH}" \
|
||||
-darchive_path="archives/" \
|
||||
source/tools/dist/0ad.nsi
|
||||
|
||||
# Fix permissions
|
||||
chmod -f 644 "${PREFIX}-win32.exe"
|
||||
chmod -f 644 "${PREFIX}-${WINARCH}.exe"
|
||||
|
|
|
|||
Loading…
Reference in a new issue