1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

add installer creation in publish script

This commit is contained in:
IntelOrca
2015-12-14 21:17:54 +00:00
parent 73bca80426
commit e95bd57e68
2 changed files with 40 additions and 4 deletions

View File

@@ -1,8 +1,8 @@
# Version numbers to update
!define /ifndef APPV_MAJOR 0
!define /ifndef APPV_MINOR 0
!define /ifndef APPV_MAINT 3
!define /ifndef APPV_BUILD 1
!define /ifndef APPV_MAINT 4
!define /ifndef APPV_BUILD 0
!define /ifndef APPV_EXTRA "-beta"
!define APPNAME "OpenRCT2" ; Define application name

View File

@@ -7,7 +7,8 @@
param (
[string]$Server = "",
[string]$BuildNumber = "",
[string]$GitBranch = ""
[string]$GitBranch = "",
[switch]$Installer = $false
)
# Setup
@@ -97,6 +98,41 @@ function do-package()
Remove-Item -Force -Recurse $tempDir -ErrorAction SilentlyContinue
}
# Installer
function do-installer()
{
Write-Host "Publishing OpenRCT2..." -ForegroundColor Cyan
$artifactsDir = "$rootPath\artifacts"
$installerDir = "$rootPath\distribution\windows"
# Create artifacts directory
New-Item -Force -ItemType Directory $artifactsDir > $null
# Create installer
& "$installerDir\build.ps1"
if ($LASTEXITCODE -ne 0)
{
Write-Host "Failed to create installer." -ForegroundColor Red
exit 1
}
$binaries = (Get-ChildItem "$installerDir\*.exe" | Sort-Object -Property LastWriteTime -Descending)
if ($binaries -eq 0)
{
Write-Host "Unable to find created installer." -ForegroundColor Red
exit 1
}
Copy-Item $binaries[0].FullName $artifactsDir
}
do-prepareSource
do-build
do-package
if ($Installer)
{
do-installer
}
else
{
do-package
}