mirror of
https://github.com/Pathoschild/SMAPI.git
synced 2026-10-12 02:08:51 +00:00
automate game path when preparing install package
This commit is contained in:
@@ -9,10 +9,35 @@
|
||||
|
||||
|
||||
##########
|
||||
## Fetch values
|
||||
## Find the game folder
|
||||
##########
|
||||
possibleGamePaths=(
|
||||
# override
|
||||
"$HOME/StardewValley"
|
||||
|
||||
# Linux
|
||||
"$HOME/GOG Games/Stardew Valley/game"
|
||||
"$HOME/.steam/steam/steamapps/common/Stardew Valley"
|
||||
"$HOME/.local/share/Steam/steamapps/common/Stardew Valley"
|
||||
"$HOME/.var/app/com.valvesoftware.Steam/data/Steam/steamapps/common/Stardew Valley"
|
||||
|
||||
# macOS
|
||||
"/Applications/Stardew Valley.app/Contents/MacOS"
|
||||
"$HOME/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS"
|
||||
)
|
||||
gamePath=""
|
||||
for possibleGamePath in "${possibleGamePaths[@]}"; do
|
||||
if [[ -d "$possibleGamePath" ]]; then
|
||||
gamePath="$possibleGamePath"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
##########
|
||||
## Preset values
|
||||
##########
|
||||
# paths
|
||||
gamePath="/home/pathoschild/Stardew Valley"
|
||||
bundleModNames=("ConsoleCommands" "SaveBackup")
|
||||
|
||||
# build configuration
|
||||
|
||||
@@ -13,10 +13,34 @@
|
||||
|
||||
|
||||
##########
|
||||
## Fetch values
|
||||
## Find the game folder
|
||||
##########
|
||||
$possibleGamePaths=(
|
||||
# GOG
|
||||
"C:\Program Files\GalaxyClient\Games\Stardew Valley",
|
||||
"C:\Program Files\GOG Galaxy\Games\Stardew Valley",
|
||||
"C:\Program Files\GOG Games\Stardew Valley",
|
||||
"C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley",
|
||||
"C:\Program Files (x86)\GOG Galaxy\Games\Stardew Valley",
|
||||
"C:\Program Files (x86)\GOG Games\Stardew Valley",
|
||||
|
||||
# Steam
|
||||
"C:\Program Files\Steam\steamapps\common\Stardew Valley",
|
||||
"C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley"
|
||||
)
|
||||
$gamePath = ""
|
||||
foreach ($possibleGamePath in $possibleGamePaths) {
|
||||
if (Test-Path $possibleGamePath -PathType Container) {
|
||||
$gamePath = $possibleGamePath
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
##########
|
||||
## Preset values
|
||||
##########
|
||||
# paths
|
||||
$gamePath = "C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley"
|
||||
$bundleModNames = "ConsoleCommands", "SaveBackup"
|
||||
|
||||
# build configuration
|
||||
|
||||
Reference in New Issue
Block a user