Skip to content

Commit b766514

Browse files
Windows gaming installer script added with testing CI workflow.
Signed-off-by: Michael Valdron <michael.valdron@gmail.com>
1 parent c412d11 commit b766514

2 files changed

Lines changed: 58 additions & 0 deletions

File tree

.github/workflows/test-installers.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,11 @@ jobs:
8080
- uses: actions/checkout@v3
8181
- name: Test Windows Install
8282
run: powershell.exe -executionpolicy bypass test/windows/test.ps1 installers/win_install_packages.ps1
83+
84+
windowsgaming:
85+
runs-on: windows-2022
86+
87+
steps:
88+
- uses: actions/checkout@v3
89+
- name: Test Windows Gaming Install
90+
run: powershell.exe -executionpolicy bypass test/windows/test.ps1 installers/wingaming_install_packages.ps1
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/usr/bin/env pwsh
2+
3+
# Variables
4+
$currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
5+
$base_dir = (Get-Item $MyInvocation.MyCommand.Path).Directory.FullName
6+
7+
# Check if running as an administrator
8+
if (!$currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
9+
Write-Error 'Please run as administrator'
10+
exit 1
11+
}
12+
13+
# Run base setup
14+
powershell.exe -executionpolicy bypass "$base_dir/win_setup.ps1"
15+
if ($LASTEXITCODE -ne 0) {
16+
exit $LASTEXITCODE
17+
}
18+
19+
# Update packages
20+
winget upgrade -h --all
21+
22+
# Install packages
23+
winget install -h Waterfox.Waterfox Microsoft.WindowsTerminal OBSProject.OBSStudio `
24+
Discord.Discord Valve.Steam ElectronicArts.EADesktop DolphinEmulator.Dolphin `
25+
Mupen64.Mupen64 DOSBox.DOSBox Duplicati.Duplicati
26+
if ($LASTEXITCODE -ne 0) {
27+
Write-Error 'Failed to install winget packages.'
28+
exit $LASTEXITCODE
29+
}
30+
31+
# Install Surfshark
32+
powershell.exe -executionpolicy bypass "$base_dir/packages/surfshark/win_install.ps1"
33+
if ($LASTEXITCODE -ne 0) {
34+
Write-Error 'Surfshark failed to install.'
35+
exit $LASTEXITCODE
36+
}
37+
38+
# Install GameRanger
39+
powershell.exe -executionpolicy bypass "$base_dir/packages/gameranger/win_install.ps1"
40+
if ($LASTEXITCODE -ne 0) {
41+
Write-Error 'GameRanger failed to install.'
42+
exit $LASTEXITCODE
43+
}
44+
45+
# Install Well Of Souls
46+
powershell.exe -executionpolicy bypass "$base_dir/packages/wos/win_install.ps1"
47+
if ($LASTEXITCODE -ne 0) {
48+
Write-Error 'Well Of Souls failed to install.'
49+
exit $LASTEXITCODE
50+
}

0 commit comments

Comments
 (0)