Skip to content

Instantly share code, notes, and snippets.

@sjg
Last active June 21, 2023 04:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sjg/dbe49638551aaac0bd75806a89b14425 to your computer and use it in GitHub Desktop.
Save sjg/dbe49638551aaac0bd75806a89b14425 to your computer and use it in GitHub Desktop.
Install CE Apps - Windows
#!/usr/bin/env pwsh
# CASA Conntected Environments - Windows Install Script
# Author: Steven Gray (@sjg)
# Date: 28-03-2023
# Updated: 28-03-2023
# Version: 1.0.1
# -----------------------------------------------------------------------------------
# WARNING - TOTAL INSTALL TIME IS APPROXIMATELY 1 HOUR AND WILL USE 35GB OF HD SPACE
# -----------------------------------------------------------------------------------
# This script is intended to be run on a clean install of Windows 11.
# It will install a number of applications and may overwrite existing
# applications. It is recommended that you run this script on a fresh
# install of Windows 11.
# -----------------------------------------------------------------------------------
# -- Instructions --------------------------------------------------------------
# 1. Download this file to your desktop
# 2. Open PowerShell (Windows key + X, then select Windows PowerShell)
# 3. Type [ Start-Process powershell.exe -Verb RunAs ] (Remove the brackets)
# 4. Press Enter to run PowerShell as Administrator
# 5. In the new window Type [ cd ~/Desktop/; Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process -Force; ./ce-apps-install.ps1 ] (Remove the brackets)
# 6. Press Enter to run the script.
# ------------------------------------------------------------------------------
$welcome = @"
██████╗ █████╗ ███████╗ █████╗ ██████╗███████╗ ██╗ ██╗██╗███╗ ██╗██████╗ ██████╗ ██╗ ██╗███████╗
██╔════╝██╔══██╗██╔════╝██╔══██╗ ██╔════╝██╔════╝ ██║ ██║██║████╗ ██║██╔══██╗██╔═══██╗██║ ██║██╔════╝
██║ ███████║███████╗███████║ ██║ █████╗ ██║ █╗ ██║██║██╔██╗ ██║██║ ██║██║ ██║██║ █╗ ██║███████╗
██║ ██╔══██║╚════██║██╔══██║ ██║ ██╔══╝ ██║███╗██║██║██║╚██╗██║██║ ██║██║ ██║██║███╗██║╚════██║
╚██████╗██║ ██║███████║██║ ██║ ╚██████╗███████╗ ╚███╔███╔╝██║██║ ╚████║██████╔╝╚██████╔╝╚███╔███╔╝███████║
╚═════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═════╝╚══════╝ ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝╚═════╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝
██╗███╗ ██╗███████╗████████╗ █████╗ ██╗ ██╗ ███████╗ ██████╗██████╗ ██╗██████╗ ████████╗
██║████╗ ██║██╔════╝╚══██╔══╝██╔══██╗██║ ██║ ██╔════╝██╔════╝██╔══██╗██║██╔══██╗╚══██╔══╝
██║██╔██╗ ██║███████╗ ██║ ███████║██║ ██║ ███████╗██║ ██████╔╝██║██████╔╝ ██║
██║██║╚██╗██║╚════██║ ██║ ██╔══██║██║ ██║ ╚════██║██║ ██╔══██╗██║██╔═══╝ ██║
██║██║ ╚████║███████║ ██║ ██║ ██║███████╗███████╗ ███████║╚██████╗██║ ██║██║██║ ██║
╚═╝╚═╝ ╚═══╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚══════╝ ╚══════╝ ╚═════╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝
"@
Write-Host $welcome
# Install Chocolatey
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
scoop install git
scoop install sudo
# ---------------------------------------------------------------
# Install Scoop Repositories
# ---------------------------------------------------------------
Write-Host "Adding Scoops Buckets for installation"
scoop bucket add extras
scoop bucket add nonportable
scoop bucket add java
# ---------------------------------------------------------------
# Install Course Essential Applications
# ---------------------------------------------------------------
function course_essential_apps {
Write-Host "Installing Course Essential Applications"
scoop install vscode
scoop install googlechrome
scoop install firefox
scoop install blender-launcher
# scoop install unity-hub-np
scoop install inkscape
scoop install android-studio
scoop install mysql-workbench
scoop install vlc
scoop install raspberry-pi-imager
# ---------------------------------------------------------------
# Install Apps with Chocolatey which are not in Scoop
# ---------------------------------------------------------------
Write-Host "Installing Course Essential Apps with Chocolatey"
choco feature enable -n allowGlobalConfirmation
choco install -y autodesk-fusion360
choco install -y eagle
choco install -y netfx-4.7.1-devpack
choco install -y blender --version=3.3.1
choco install -y prusaslicer
Write-Host "To update these apps in future use:"
Write-Host " choco upgrade all -y"
}
$answer = Read-Host "Do you wish to install CE Essential Apps? (y/n)"
if ($answer.ToLower() -eq "y") {
course_essential_apps
}
# ---------------------------------------------------------------
# Install Recommended CLI Tools
# ---------------------------------------------------------------
function recommended_cli {
Write-Host "Installing Recommended Command Line Tools."
scoop install mysql
scoop install git-aliases
scoop install ntop
scoop install ffmpeg
scoop install git
scoop install git-lfs
scoop install curlie
scoop install jq
scoop install nano
scoop install corretto-jdk
scoop install speedtest-cli
scoop install wget
scoop install curl
}
$answer = Read-Host "Do you wish to install CE Recommended Command Line Tools? (y/n)"
if ($answer.ToLower() -eq "y") {
recommended_cli
}
# ---------------------------------------------------------------
# Install UCL/CASA Recommended Tools
# ---------------------------------------------------------------
function ucl_apps {
Write-Host "Installing UCL/CASA recommended tools."
scoop install slack
sudo scoop install office-365-apps-np
scoop install microsoft-teams
}
$answer = Read-Host "Do you wish to install UCL/CASA Recommended Tools (Office/Slack/Teams)? (y/n)"
if ($answer.ToLower() -eq "y") {
ucl_apps
}
# ---------------------------------------------------------------
# Install CE Staff Favourites
# ---------------------------------------------------------------
function staff_apps {
Write-Host "Installing CE Staff Favourite Tools."
scoop install git-tower
scoop install meshlab
scoop install docker
scoop install posh-docker
scoop install docker-compose
scoop install lazydocker
}
$answer = Read-Host "Do you wish to install CE Staff Favourite Tools (Tower/MeshLab/Docker)? (y/n)"
if ($answer.ToLower() -eq "y") {
staff_apps
}
# ---------------------------------------------------------------
# Android Specific
# ---------------------------------------------------------------
function android_tools {
Write-Host "Installing Android Studio and Android Tools."
scoop install ant
scoop install maven
scoop install gradle
scoop install android-sdk
scoop install adb
scoop install android-clt
}
$answer = Read-Host "Do you wish to install Android Specific Tools (Mobile Systems Class)? (y/n)"
if ($answer.ToLower() -eq "y") {
android_tools
}
# ---------------------------------------------------------------
# .NET SDK Specific
# ---------------------------------------------------------------
function dotnet_tools {
Write-Host "Installing Windows .NET SDK tools."
scoop install dotnet-sdk
scoop install vcredist
# Removing the installers now that we've installed the apps
scoop uninstall vcredist2005 vcredist2008 vcredist2010 vcredist2012 vcredist2013 vcredist
}
$answer = Read-Host "Do you wish to install Windows .NET SDK Tools? (y/n)"
if ($answer.ToLower() -eq "y") {
dotnet_tools
}
# ------------------------------------------------------------------
# Install Node.JS and Set to latest Version // LTS previous as well
# ------------------------------------------------------------------
function nodejs_tools {
Write-Host "Installing Node.JS and NVM."
scoop install nvm
mkdir ~/.nvm
nvm install 16.17.1
nvm install 16.19.1
nvm install 18.15.0
nvm use 16.17.1
}
$answer = Read-Host "Do you wish to install Node.JS and NVM? (Web Course) (y/n)"
if ($answer.ToLower() -eq "y") {
nodejs_tools
}
# ------------------------------------------------------------------
# Wrap up the install script
# ------------------------------------------------------------------
Write-Host "Install Script Finished."
# Write-Host "Now go and open Unity Hub and Install the Unity App .... It's another 5Gb to download."

Execute Install Script from Powershell

  1. Open PowerShell (Windows key + R, type powershell and press Enter).
  2. Copy and Paste the following commands
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser 
irm get.scoop.sh | iex
Start-Process powershell.exe -Verb RunAs
  1. Click Yes to Enter Administrator Mode
  2. Copy the following command in the new window to launch the install script:
$remoteFile = New-Object System.Net.WebClient
$remoteFile.Encoding = [System.Text.Encoding]::UTF8
Invoke-Expression($remoteFile.DownloadString('https://gist.githubusercontent.com/sjg/dbe49638551aaac0bd75806a89b14425/raw/869daf9fd32704d515d3487521268362598bf898/ce-apps-win-install.ps1'))
@avin
Copy link

avin commented May 30, 2023

try volta instead of nvm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment