-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.ps1
27 lines (22 loc) · 931 Bytes
/
install.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Force Unity version.
& choco install unity --version 2018.1.2 -y --no-progress
& choco install autoit.commandline -y --no-progress
# We need a desktop to do automation
.\enable-desktop.ps1
$blockRdp = $false; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
$installUnity = Get-Content .\install-unity.au3
$newLines = @()
foreach ($line in $installUnity) {
if ($line -eq "; **Send User Name**") {
$newLines += "Send(`"$($env:UNITY_EMAIL)`")"
}
elseif ($line -eq "; **Send Password**") {
$newLines += "Send(`"$($env:UNITY_PASSWORD)`")"
}
else {
$newLines += $line
}
}
Set-Content -Path .\install-unity.au3 -Value $newLines
& autoit3 .\install-unity.au3
$blockRdp = $false; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))