Last active
April 8, 2020 00:51
-
-
Save danielxvu/b9ca2fbc8f77462937e1cbe3638461b6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
$downloadsDir = "$env:userprofile\Downloads" | |
$enableUnityDownload = $true | |
$enableGeforceExperienceDownload = $true | |
$enableDevTools = $true | |
function Get-Installers { | |
Write-Host "The downloads folder is $downloadsDir" | |
Write-Host 'Press any key to continue...'; | |
$null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown'); | |
$start_time = Get-Date | |
$requests = New-Object System.Net.WebClient | |
Write-Host 'Downloading AWS CLI...'; | |
$uuid = [Guid]::newGuid() | |
$url = "https://awscli.amazonaws.com/AWSCLIV2.msi" | |
$output = "$downloadsDir\AWSCLIV2_$uuid.ms" | |
$requests.DownloadFile($url, $output) | |
if ($enableUnityDownload) { | |
Write-Host 'Downloading Unity Hub...'; | |
$uuid = [Guid]::newGuid() | |
$url = "https://public-cdn.cloud.unity3d.com/hub/prod/UnityHubSetup.exe" | |
$output = "$downloadsDir\UnityHubSetup_$uuid.exe" | |
$requests.DownloadFile($url, $output) | |
} | |
else { | |
Write-Host "User opted out of Unity Hub download." | |
} | |
if ($enableGeforceExperienceDownload) { | |
Write-Host 'Downloading GeForce Experience...'; | |
$uuid = [Guid]::newGuid() | |
$url = "https://us.download.nvidia.com/GFE/GFEClient/3.20.2.34/GeForce_Experience_v3.20.2.34.exe" | |
$output = "$downloadsDir\GeForce_Experience_v3.20.2.34_$uuid.exe" | |
$requests.DownloadFile($url, $output) | |
} else { | |
Write-Host "User opted out of GeForce Experience download." | |
} | |
Write-Output "Time taken (downloads): $((Get-Date).Subtract($start_time).Seconds) second(s)" | |
} | |
if (Get-Command "scoop" -ErrorAction SilentlyContinue) { | |
scoop install 7zip git nodejs-lts | |
scoop bucket add extras | |
scoop bucket add versions | |
scoop install python37 vcredist | |
if ($enableDevTools) { | |
scoop install vagrant tightvnc | |
} else { | |
Write-Host "User opted out of developer tools installation" | |
} | |
Get-Installers | |
} | |
else { | |
Write-Host "Package installation aborted." | |
Write-Host "Unable to find scoop in your PATH. Get the scoop package manager from https://scoop.sh/ if not already installed." | |
} | |
Write-Host 'Make sure to restart your shell if new packages were installed.'; | |
Write-Host -NoNewLine 'Press any key to continue...'; | |
$null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment