Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add bootstrap script for messing with a manually-started instance
- Loading branch information
1 parent
7be1c2c
commit 545d547
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Use this script is to get a build environment | ||
# when booting a Windows EC2 instance outside of Taskcluster. | ||
|
||
|
||
[Environment]::SetEnvironmentVariable("Path", $env:Path + | ||
";C:\git\cmd;C:\python2;C:\python2\Scripts;C:\Users\Administrator\.cargo\bin", | ||
[EnvironmentVariableTarget]::Machine) | ||
[Environment]::SetEnvironmentVariable("Lib", $env:Lib + | ||
";C:\gstreamer\1.0\x86_64\lib", | ||
[EnvironmentVariableTarget]::Machine) | ||
|
||
|
||
# Optional | ||
$client.DownloadFile( | ||
"http://download.tuxfamily.org/dvorak/windows/bepo.exe", | ||
"C:\bepo.exe" | ||
) | ||
|
||
|
||
# use TLS 1.2 (see bug 1443595) | ||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | ||
|
||
# For making http requests | ||
$client = New-Object system.net.WebClient | ||
$shell = new-object -com shell.application | ||
|
||
# Download a zip file and extract it | ||
function Expand-ZIPFile($file, $destination, $url) | ||
{ | ||
$client.DownloadFile($url, $file) | ||
$zip = $shell.NameSpace($file) | ||
foreach($item in $zip.items()) | ||
{ | ||
$shell.Namespace($destination).copyhere($item) | ||
} | ||
} | ||
|
||
md C:\git | ||
Expand-ZIPFile -File "C:\git.zip" -Destination "C:\git" -Url ` | ||
"https://github.com/git-for-windows/git/releases/download/v2.19.0.windows.1/MinGit-2.19.0-64-bit.zip" | ||
|
||
$client.DownloadFile( | ||
"https://static.rust-lang.org/rustup/archive/1.13.0/i686-pc-windows-gnu/rustup-init.exe", | ||
"C:\rustup-init.exe" | ||
) | ||
|
||
Start-Process C:\rustup-init.exe -Wait -NoNewWindow -ArgumentList ` | ||
"--default-toolchain none -y" | ||
|
||
md C:\python2 | ||
Expand-ZIPFile -File "C:\python2.zip" -Destination "C:\python2" -Url ` | ||
"https://queue.taskcluster.net/v1/task/RIuts6jOQtCSjMbuaOU6yw/runs/0/artifacts/public/repacked.zip" | ||
|
||
Expand-ZIPFile -File "C:\gst.zip" -Destination "C:\" -Url ` | ||
"https://queue.taskcluster.net/v1/task/KAzPF1ZYSFmg2BQKLt0LwA/runs/0/artifacts/public/repacked.zip" |