automate game path when preparing install package

This commit is contained in:
Jesse Plamondon-Willard
2024-12-14 17:30:41 -05:00
parent 0133ca9729
commit dfd8949eb5
2 changed files with 53 additions and 4 deletions
+27 -2
View File
@@ -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
+26 -2
View File
@@ -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