mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge branch 'fix/appveyor' into develop
This should help reduce the reoccurring issues with installing NSIS on AppVeyor. It no longer attempts to install NSIS for external pull requests and also caches the chocolatey packages between AppVeyor builds so that it doesn't have to keep downloading / installing it every build. secure-file is also cached between builds.
This commit is contained in:
commit
0af21afcc8
16
appveyor.yml
16
appveyor.yml
|
@ -1,5 +1,9 @@
|
|||
version: 0.0.5.{build}
|
||||
os: Visual Studio 2015
|
||||
cache:
|
||||
- C:\ProgramData\chocolatey\bin -> scripts\ps\appveyor_install.ps1
|
||||
- C:\ProgramData\chocolatey\lib -> scripts\ps\appveyor_install.ps1
|
||||
- secure-file -> scripts\ps\appveyor_install.ps1
|
||||
environment:
|
||||
ENCKEY:
|
||||
secure: saYAIpqXzpq0U+JH+MNi/isRQ6Y51PZhm4BrnePDiAPptFO5htxFOLegrYqxdy67
|
||||
|
@ -8,21 +12,13 @@ environment:
|
|||
OPENRCT2.ORG_TOKEN:
|
||||
secure: leQX3xCQpmBLGuMqrxjFlzexDt96ypNRMM5TTRVHbGE8PwVg9crgeykLc2BIZU6HDHveJCHqh2cGMdHtHYJYcw==
|
||||
install:
|
||||
- cmd: >-
|
||||
IF DEFINED ENCKEY ( nuget install secure-file -ExcludeVersion && secure-file\tools\secure-file -decrypt distribution\windows\code-sign-key-openrct2.org.pfx.enc -secret %ENCKEY% )
|
||||
|
||||
cinst nsis.portable --version=3.01-beta1 > nul
|
||||
- ps: >-
|
||||
curl "http://nsis.sourceforge.net/mediawiki/images/5/53/KillProcDll%26FindProcDll.zip" -OutFile nsisxtra.zip
|
||||
|
||||
7z x nsisxtra.zip > $null
|
||||
|
||||
cp FindProcDLL.dll "C:\ProgramData\chocolatey\lib\nsis.portable\tools\nsis-3.0b1\Plugins\x86-ansi"
|
||||
.\scripts\ps\appveyor_install.ps1
|
||||
build_script:
|
||||
- ps: >-
|
||||
.\setenv.ps1
|
||||
|
||||
appveyor_run
|
||||
appveyor_build
|
||||
artifacts:
|
||||
- path: .\artifacts\openrct2.zip
|
||||
name: OpenRCT2-portable
|
||||
|
|
|
@ -41,7 +41,7 @@ Name "${APPNAMEANDVERSION} ${APPBITS}-bit for Windows ${EXTRA_VERSION}"
|
|||
; NOTE: Keep trailing backslash!
|
||||
InstallDirRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenRCT2" "Install Folder"
|
||||
!ifndef OUTFILE
|
||||
!define OUTFILE "openrct2-${APPVERSION}-${APPARCH}.exe"
|
||||
!define OUTFILE "openrct2-install.exe"
|
||||
!endif
|
||||
OutFile "${OUTFILE}"
|
||||
CRCCheck force
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
#########################################################
|
||||
# Script to setup OpenRCT2 for building on AppVeyor
|
||||
#########################################################
|
||||
|
||||
function Check-ExitCode
|
||||
{
|
||||
if ($LASTEXITCODE -ne 0)
|
||||
{
|
||||
$host.SetShouldExit($LASTEXITCODE)
|
||||
}
|
||||
}
|
||||
|
||||
if ($env:ENCKEY)
|
||||
{
|
||||
if (-not (Test-Path "secure-file"))
|
||||
{
|
||||
Write-Host "Downloading secure-file from NuGet..." -ForegroundColor Cyan
|
||||
nuget install secure-file -ExcludeVersion
|
||||
}
|
||||
|
||||
Write-Host "Decrypting code signing key..." -ForegroundColor Cyan
|
||||
secure-file\tools\secure-file -decrypt distribution\windows\code-sign-key-openrct2.org.pfx.enc -secret $env:ENCKEY
|
||||
Check-ExitCode
|
||||
}
|
||||
|
||||
if (${env:OPENRCT2.ORG_TOKEN})
|
||||
{
|
||||
if (-not (Test-Path "C:\ProgramData\chocolatey\lib\nsis.portable"))
|
||||
{
|
||||
Write-Host "Downloading NSIS from chocolatey..." -ForegroundColor Cyan
|
||||
cinst nsis.portable --version=3.01-beta1 > $null
|
||||
if ($LASTEXITCODE -ne 0)
|
||||
{
|
||||
Get-Content "C:\ProgramData\chocolatey\logs\chocolatey.log"
|
||||
$host.SetShouldExit(1)
|
||||
}
|
||||
|
||||
Write-Host "Downloading KillProcDLL for NSIS..." -ForegroundColor Cyan
|
||||
curl "http://nsis.sourceforge.net/mediawiki/images/5/53/KillProcDll%26FindProcDll.zip" -OutFile nsisxtra.zip
|
||||
Check-ExitCode
|
||||
7z x nsisxtra.zip > $null
|
||||
Check-ExitCode
|
||||
cp FindProcDLL.dll "C:\ProgramData\chocolatey\lib\nsis.portable\tools\nsis-3.0b1\Plugins\x86-ansi"
|
||||
}
|
||||
}
|
|
@ -18,17 +18,17 @@ param (
|
|||
[switch]$Symbols = $false
|
||||
)
|
||||
|
||||
if ($GitTag -eq "")
|
||||
if (-not $GitTag)
|
||||
{
|
||||
if ($GitBranch -eq $null)
|
||||
if (-not $GitBranch)
|
||||
{
|
||||
$GitBranch = (git rev-parse --abbrev-ref HEAD)
|
||||
}
|
||||
if ($GitCommitSha1 -eq $null)
|
||||
if (-not $GitCommitSha1)
|
||||
{
|
||||
$GitCommitSha1 = (git rev-parse HEAD)
|
||||
}
|
||||
if ($GitCommitSha1Short -eq $null)
|
||||
if (-not $GitCommitSha1Short)
|
||||
{
|
||||
$GitCommitSha1Short = (git rev-parse --short HEAD)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue