1 # we want more secure TLS 1.2
2 [Net
.ServicePointManager
]::SecurityProtocol
= [Net
.SecurityProtocolType
]::Tls12
;
5 Write-Host "Installing Chocolatey"
6 Invoke-Expression ((New-Object System
.Net
.WebClient
).DownloadString
('https://chocolatey.org/install.ps1'))
7 Import-Module
"$env:ProgramData\chocolatey\helpers\chocolateyProfile.psm1"
8 Update-SessionEnvironment
9 Write-Host "Installing Chocolatey packages"
10 choco install
--allow-empty-checksums
-y cmake
--installargs
"ADD_CMAKE_TO_PATH=System"
11 choco install
--allow-empty-checksums
-y python3 git ninja
13 # Add Chocolatey's native install path
14 Update-SessionEnvironment
15 # Python and CMake add themselves to the system environment path, which doesn't get refreshed
16 # until we start a new shell
17 $env:PATH
= "C:\python3;C:\python3\scripts;C:\Program Files\CMake\bin;$env:PATH"
19 Start-Process
-NoNewWindow
-Wait git
-ArgumentList
'config --global core.autocrlf false'
22 Write-Host "Installing Python PIP packages"
23 pip3 install mako
"numpy<2.0"
25 Write-Host "Failed to install dependencies from pip"
30 $msvc_2019_url = 'https://aka.ms/vs/16/release/vs_buildtools.exe'
33 Write-Host "Downloading Visual Studio 2019 build tools"
34 Invoke-WebRequest
-Uri
$msvc_2019_url -OutFile C
:\vs_buildtools
.exe
37 Write-Host "Installing Visual Studio 2019"
38 Start-Process
-NoNewWindow
-Wait C
:\vs_buildtools
.exe
-ArgumentList
'--wait --quiet --norestart --nocache --installPath C:\BuildTools --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.ATL --add Microsoft.VisualStudio.Component.VC.ATLMFC --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Graphics.Tools --add Microsoft.VisualStudio.Component.Windows10SDK.18362 --includeRecommended'
40 Write-Host "Failed to install Visual Studio tools"
43 Remove-Item C
:\vs_buildtools
.exe
-Force
46 Write-Host "Downloading Freeglut"
47 $freeglut_zip = 'freeglut-MSVC.zip'
48 $freeglut_url = "https://www.transmissionzero.co.uk/files/software/development/GLUT/$freeglut_zip"
49 Invoke-WebRequest
-Uri
$freeglut_url -OutFile
$freeglut_zip
51 Write-Host "Failed to download Freeglut"
56 Write-Host "Installing Freeglut"
57 Expand-Archive
$freeglut_zip -DestinationPath C
:\
59 Write-Host "Failed to install Freeglut"
64 Write-Host "Downloading glext.h"
65 New-Item -ItemType Directory
-Path
"C:\glext" -Name
"GL"
66 $ProgressPreference = "SilentlyContinue"
67 Invoke-WebRequest
-Uri
'https://www.khronos.org/registry/OpenGL/api/GL/glext.h' -OutFile
'C:\glext\GL\glext.h' | Out-Null