diff --git a/appveyor.yml b/appveyor.yml index f24c8168e3..3fb469b0eb 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,6 +3,7 @@ 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 diff --git a/scripts/ps/appveyor_install.ps1 b/scripts/ps/appveyor_install.ps1 index 84aca4cb2f..92a1dcd9ef 100644 --- a/scripts/ps/appveyor_install.ps1 +++ b/scripts/ps/appveyor_install.ps1 @@ -12,8 +12,13 @@ function Check-ExitCode if ($env:ENCKEY) { - Write-Host "Downloading secure-file from NuGet" -ForegroundColor Cyan - nuget install secure-file -ExcludeVersion + 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 } @@ -22,7 +27,7 @@ if (${env:OPENRCT2.ORG_TOKEN}) { if (-not (Test-Path "C:\ProgramData\chocolatey\lib\nsis.portable")) { - Write-Host "Downloading NSIS from chocolatey" -ForegroundColor Cyan + Write-Host "Downloading NSIS from chocolatey..." -ForegroundColor Cyan cinst nsis.portable --version=3.01-beta1 > $null if ($LASTEXITCODE -ne 0) { @@ -30,7 +35,7 @@ if (${env:OPENRCT2.ORG_TOKEN}) $host.SetShouldExit(1) } - Write-Host "Downloading KillProcDLL for NSIS" -ForegroundColor Cyan + 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