Code refactor to use only C partition

This commit is contained in:
camoy 2024-08-13 21:34:32 -07:00
parent d7f6cc64e9
commit 40769175ec
5 changed files with 30 additions and 37 deletions

View File

@ -1 +0,0 @@
Todo

View File

@ -1,16 +0,0 @@
Write-Host "---Assigning Drive Letter D To Sweetcade Partition---"
Get-Partition -DriveLetter D
If ($? -eq True)
{
Write-Host "SC-HDD-ERR001: CANNOT ASSIGN D DRIVE LETTER"
Write-Host "Another disk is using the drive letter D:"
Write-Host "Sweetcade required that the second data partition is assigned drive letter D:"
Write-Host "Unable to continue. Please check that a USB drive, optical drive, or card reader is not using drive letter D:."
Write-Host "This script will exit after 60 seconds."
Start-Sleep -Seconds 60
Exit 1
}
Else
{
Get-Partition -DiskNumber 0 -PartitionNumber 5 | Set-Partition -NewDriveLetter D
}

View File

@ -1,18 +1,18 @@
Write-Host "---Download Wget---"
Invoke-WebRequest "https://eternallybored.org/misc/wget/1.21.4/64/wget.exe" -OutFile "C:\sctools\wget\wget.exe"
Write-Host "---Download 7-Zip---"
C:\sctools\wget\wget.exe -O "C:\sctools\7zip\7zr.exe" "https://7-zip.org/a/7zr.exe"
C:\sctools\wget\wget.exe -O "C:\sc\tools\7zip\7zr.exe" "https://7-zip.org/a/7zr.exe"
Write-Host "---Download git---"
C:\sctools\wget\wget.exe -O "C:\sctools\git\PortableGit.7z.exe" "https://github.com/git-for-windows/git/releases/download/v2.45.2.windows.1/PortableGit-2.45.2-64-bit.7z.exe"
C:\sctools\wget\wget.exe -O "C:\sc\tools\git\PortableGit.7z.exe" "https://github.com/git-for-windows/git/releases/download/v2.45.2.windows.1/PortableGit-2.45.2-64-bit.7z.exe"
Write-Host "---Download Custom Resolution Utility---"
C:\sctools\wget\wget.exe -O "C:\sctools\cru\customresolutionutility.zip" "https://customresolutionutility.b-cdn.net/cru-1.5.2.zip"
C:\sctools\wget\wget.exe -O "C:\sc\tools\cru\customresolutionutility.zip" "https://customresolutionutility.b-cdn.net/cru-1.5.2.zip"
Write-Host "---Download AntimicroX---"
C:\sctools\wget\wget.exe -O "C:\sctools\antimicrox\antimicrox-portable.zip" "https://github.com/AntiMicroX/antimicrox/releases/download/3.4.0/antimicrox-3.4.0-PortableWindows-AMD64.zip"
C:\sctools\wget\wget.exe -O "C:\sc\tools\antimicrox\antimicrox-portable.zip" "https://github.com/AntiMicroX/antimicrox/releases/download/3.4.0/antimicrox-3.4.0-PortableWindows-AMD64.zip"
Write-Host "---Download Attract-Mode---"
C:\sctools\wget\wget.exe -O "C:\sctools\attractmode\attract.zip" "https://github.com/mickelson/attract/releases/download/v2.7.0/attract-v2.7.0-win64.zip"
C:\sctools\wget\wget.exe -O "C:\sc\tools\attractmode\attract.zip" "https://github.com/mickelson/attract/releases/download/v2.7.0/attract-v2.7.0-win64.zip"
Write-Host "---Download FastIO2KB---"
C:\sctools\wget\wget.exe -O "C:\sctools\fastio2kb\fastio2kb.zip" "https://github.com/JoeHowse/FastIO2KB/releases/download/2021.04.04_Easter/FastIO2KB_2021.04.04_Easter.zip"
C:\sctools\wget\wget.exe -O "C:\sc\tools\fastio2kb\fastio2kb.zip" "https://github.com/JoeHowse/FastIO2KB/releases/download/2021.04.04_Easter/FastIO2KB_2021.04.04_Easter.zip"
Write-Host "---Download AutoHotKey---"
C:\sctools\wget\wget.exe -O "C:\sctools\ahk\ahk-v2.exe" "https://www.autohotkey.com/download/ahk-v2.exe"
C:\sctools\wget\wget.exe -O "C:\sc\tools\ahk\ahk-v2.exe" "https://www.autohotkey.com/download/ahk-v2.exe"
Write-Host "---Download I-PAC---"
C:\sctools\wget\wget.exe -O "C:\sctools\ipac\winipacv2setup.exe" "https://www.ultimarc.com/winipacv2setup.exe"
C:\sctools\wget\wget.exe -O "C:\sc\tools\ipac\winipacv2setup.exe" "https://www.ultimarc.com/winipacv2setup.exe"

View File

@ -1,20 +1,20 @@
Write-Host "---Installing Programs---"
Write-Host "---Installing git---"
C:\sctools\7zip\7zr.exe x -o "C:\sctools\git\" "C:\sctools\git\PortableGit.7z.exe"
C:\sc\tools\7zip\7zr.exe x -o "C:\sc\tools\git\" "C:\sctools\git\PortableGit.7z.exe"
Write-Host "---Installing Custom Resolution Utility---"
C:\sctools\7zip\7zr.exe x -o "C:\sctools\cru\" "C:\sctools\cru\customresolutionutility.zip"
C:\sc\tools\7zip\7zr.exe x -o "C:\sc\tools\cru\" "C:\sctools\cru\customresolutionutility.zip"
Write-Host "---Installing AntiMicroX---"
C:\sctools\7zip\7zr.exe x -o "C:\sctools\antimicrox\" "C:\sctools\antimicrox\antimicrox-portable.zip"
C:\sc\tools\7zip\7zr.exe x -o "C:\sc\tools\antimicrox\" "C:\sctools\antimicrox\antimicrox-portable.zip"
Write-Host "---Installing Attract Mode---"
C:\sctools\7zip\7zr.exe x -o "C:\sctools\attractmode\" "C:\sctools\attractmode\attract.zip"
C:\sc\tools\7zip\7zr.exe x -o "C:\sc\tools\attractmode\" "C:\sctools\attractmode\attract.zip"
Write-Host "---Installing FastIO2KB---"
C:\sctools\7zip\7zr.exe x -o "C:\sctools\fastio2kb\" "C:\sctools\fastio2kb\fastio2kb.zip"
C:\sc\tools\7zip\7zr.exe x -o "C:\sc\tools\fastio2kb\" "C:\sctools\fastio2kb\fastio2kb.zip"
Write-Host "---Installing AutoHotKeyV2---"
C:\sctools\ahk\ahk-v2.exe /S
C:\sc\tools\ahk\ahk-v2.exe /S
Write-Host "---Installing WinIPAC Version 2---"
C:\sctools\ipac\winipacv2setup.exe /S /W
C:\sc\tools\ipac\winipacv2setup.exe /S /W
Write-Host "---Setting Wallpaper---"
$vSCSetWallpaperPath = "C:\sctools\wall\wallpaper.png"
$vSCSetWallpaperPath = "C:\sc\tools\wall\wallpaper.png"
$vSCSetWallpaperCode = @'
using System.Runtime.InteropServices;

View File

@ -1,10 +1,10 @@
Write-Host "---Create Directories---"
New-Item -Path "C:\" -Name "sctools" -ItemType "Directory"
New-Item -Path "C:\" -Name "sc" -ItemType "Directory"
if ( ?$ -neq True )
{
Write-Host "SC-DIR-ERR001: CANNOT CREATE NEEDED DIRECTORIES"
Write-Host "Creating the following directories has failed."
Write-Host "C:\sctools"
Write-Host "C:\sc"
Write-Host "Unable to continue. Please check that these locations are writable and that they do not already exist."
Start-Sleep -Seconds 60
Exit 1
@ -14,12 +14,22 @@ New-Item -Path "C:\" -Name "sctools" -ItemType "Directory"
{
#PSEUDO - Continue without writing function? TODO
}
New-Item -Path "D:\" -Name "sccontent" -ItemType "Directory"
New-Item -Path "C:\sc" -Name "tools" -ItemType "Directory"
if ( ?$ -neq True )
{
Write-Host "SC-DIR-ERR001: CANNOT CREATE NEEDED DIRECTORIES"
Write-Host "Creating the following directories has failed."
Write-Host "D:\sccontent"
Write-Host "C:\sc\tools"
Write-Host "Unable to continue. Please check that these locations are writable and that they do not already exist."
Start-Sleep -Seconds 60
Exit 1
}
New-Item -Path "C:\sc" -Name "content" -ItemType "Directory"
if ( ?$ -neq True )
{
Write-Host "SC-DIR-ERR001: CANNOT CREATE NEEDED DIRECTORIES"
Write-Host "Creating the following directories has failed."
Write-Host "C:\sc\content"
Write-Host "Unable to continue. Please check that these locations are writable and that they do not already exist."
Start-Sleep -Seconds 60
Exit 1