mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-22 15:23:01 +01:00
add caching of chocolatey packages, (basically NSIS)
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
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
|
||||
environment:
|
||||
ENCKEY:
|
||||
secure: saYAIpqXzpq0U+JH+MNi/isRQ6Y51PZhm4BrnePDiAPptFO5htxFOLegrYqxdy67
|
||||
|
||||
@@ -2,20 +2,39 @@
|
||||
# Script to setup OpenRCT2 for building on AppVeyor
|
||||
#########################################################
|
||||
|
||||
function Check-ExitCode
|
||||
{
|
||||
if ($LASTEXITCODE -ne 0)
|
||||
{
|
||||
$host.SetShouldExit($LASTEXITCODE)
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
Check-ExitCode
|
||||
}
|
||||
|
||||
if (${env:OPENRCT2.ORG_TOKEN})
|
||||
{
|
||||
Write-Host "Downloading NSIS from chocolatey" -ForegroundColor Cyan
|
||||
cinst nsis.portable --version=3.01-beta1 > $null
|
||||
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
|
||||
7z x nsisxtra.zip > $null
|
||||
cp FindProcDLL.dll "C:\ProgramData\chocolatey\lib\nsis.portable\tools\nsis-3.0b1\Plugins\x86-ansi"
|
||||
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"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user