diff --git a/appveyor.yml b/appveyor.yml index b765041d0b..0ceea609d9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,21 +8,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 diff --git a/scripts/ps/appveyor_run.ps1 b/scripts/ps/appveyor_build.ps1 similarity index 100% rename from scripts/ps/appveyor_run.ps1 rename to scripts/ps/appveyor_build.ps1 diff --git a/scripts/ps/appveyor_install.ps1 b/scripts/ps/appveyor_install.ps1 new file mode 100644 index 0000000000..ef4871b2f4 --- /dev/null +++ b/scripts/ps/appveyor_install.ps1 @@ -0,0 +1,21 @@ +######################################################### +# Script to setup OpenRCT2 for building on AppVeyor +######################################################### + +if ($env:ENCKEY) +{ + Write-Host "Downloading secure-file from NuGet" -ForegroundColor Cyan + nuget install secure-file -ExcludeVersion + secure-file\tools\secure-file -decrypt distribution\windows\code-sign-key-openrct2.org.pfx.enc -secret $env:ENCKEY +} + +if (${env:OPENRCT2.ORG_TOKEN}) +{ + Write-Host "Downloading NSIS from chocolatey" -ForegroundColor Cyan + cinst nsis.portable --version=3.01-beta1 > $null + + Write-Host "Downloading KillProcDLL for NSIS" -ForegroundColor Cyan + 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" +}