Skip to content
This repository was archived by the owner on Mar 9, 2025. It is now read-only.

Commit

Permalink
Merge pull request #3 from noxygalaxy/main
Browse files Browse the repository at this point in the history
Add steam.ps1 installer
  • Loading branch information
SpaceEnergy authored Oct 25, 2024
2 parents 8239f83 + 7c0d2aa commit 96a7e15
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions steam.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
$tempPath = "$env:TEMP\SpaceTheme_for_Steam.zip"
$skinsFolder = "C:\Program Files (x86)\Steam\steamui\skins"
$extractedFolderPath = "$skinsFolder\Steam-main"
$destinationFolder = "$skinsFolder\SpaceTheme For Steam"

if (Test-Path $skinsFolder) {
Write-Output "Millennium installed! Proceeding with SpaceTheme installation..."

Write-Output "Downloading SpaceTheme for Steam..."
Invoke-WebRequest -Uri "https://github.com/SpaceTheme/Steam/archive/refs/heads/main.zip" -OutFile $tempPath

Write-Output "Extracting files..."
Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::ExtractToDirectory($tempPath, $skinsFolder)

if (Test-Path $extractedFolderPath) {
if (!(Test-Path $destinationFolder)) {
New-Item -ItemType Directory -Path $destinationFolder | Out-Null
}
Get-ChildItem -Path $extractedFolderPath -Recurse | ForEach-Object {
Move-Item -Path $_.FullName -Destination $destinationFolder -Force
}

Write-Output "SpaceTheme for Steam installed successfully."

Remove-Item $extractedFolderPath -Recurse -Force
} else {
Write-Output "Failed to find the extracted 'Steam-main' folder."
}

Remove-Item $tempPath -Force
} else {
Write-Output "You don't have Millennium installed."

if (Test-Path $tempPath) {
Remove-Item $tempPath -Force
}
}

0 comments on commit 96a7e15

Please sign in to comment.