Skip to content

Commit

Permalink
Try a switch statement
Browse files Browse the repository at this point in the history
  • Loading branch information
Francommit committed May 16, 2024
1 parent 8c4b58a commit e4dc87b
Showing 1 changed file with 34 additions and 16 deletions.
50 changes: 34 additions & 16 deletions prepare.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1213,22 +1213,40 @@ function Setup-DesktopShortcuts {
}



# Main script
Get-ScriptPath -ScriptPath $MyInvocation.MyCommand.Path
Install-Chocolatey
InstallScoop
ConfigureScoop
Install-AdditionalSoftware
AcquireFiles
Install-EmulationStation
Setup-EmulatorCores
Start-RetroarchAndGenerateConfig
Setup-Roms
Setup-EmulationStationConfig
Setup-DolphinConfig
Setup-Scraper
Setup-DesktopShortcuts
switch ($args[0]) {
"-installDependencies" {
Install-Chocolatey
InstallScoop
ConfigureScoop
Install-AdditionalSoftware
}
"-acquireFiles" {
AcquireFiles
}
"-setupRoms" {
Setup-Roms
Setup-EmulationStationConfig
Setup-DolphinConfig
Setup-Scraper
Setup-DesktopShortcuts
}
default {
# If no parameter is provided, execute all functions
Install-Chocolatey
InstallScoop
ConfigureScoop
Install-AdditionalSoftware
AcquireFiles
Install-EmulationStation
Setup-EmulatorCores
Start-RetroarchAndGenerateConfig
Setup-Roms
Setup-EmulationStationConfig
Setup-DolphinConfig
Setup-Scraper
Setup-DesktopShortcuts
}
}

# TO-DO: Review if this is still needed or not
# # https://www.ngemu.com/threads/epsxe-2-0-5-startup-crash-black-screen-fix-here.199169/
Expand Down

0 comments on commit e4dc87b

Please sign in to comment.