More work on Slay the Spire installer. GOgs version of the installer mostly working. Still need to add the included modes.

This commit is contained in:
Storm Dragon 2023-08-01 16:08:20 -04:00
parent 30935bd583
commit a00659dd45

20
linux-game-manager.sh Executable file → Normal file
View File

@ -707,19 +707,27 @@ case "${game}" in
steamcmd +@sSteamCmdForcePlatformType linux +login "$steamUser" "$steamPass" +force_install_dir "${HOME}/.local/games/SlayTheSpire" +app_update "$appId" +quit
else
DISPLAY=""
find ~/Downloads -maxdepth 1 -type f -name './slay_the_spire_2020_12_15_8735c9fe3cc2280b76aa3ec47c953352a7df1f65_43444.sh' -exec bash "{}" \; ||
find ~/Desktop -maxdepth 1 -type f -name './slay_the_spire_2020_12_15_8735c9fe3cc2280b76aa3ec47c953352a7df1f65_43444.sh' -exec bash "{}" \;
find ~/Downloads -maxdepth 1 -type f -name 'slay_the_spire_2020_12_15_8735c9fe3cc2280b76aa3ec47c953352a7df1f65_43444.sh' -exec bash "{}" \; ||
find ~/Desktop -maxdepth 1 -type f -name 'slay_the_spire_2020_12_15_8735c9fe3cc2280b76aa3ec47c953352a7df1f65_43444.sh' -exec bash "{}" \;
if [[ $? -eq 0 ]]; then
ln -sf "${HOME}/GOG Games/Slay the Spire/game" "${HOME}/.local/games/SlayTheSpire" ||
{ echo "Error creating link."
exit 1; }
else
echo "Error installing game."
exit 1
fi
fi
# Move files into place
mkdir -p ~/.config/ModTheSpire/
mkdir -p "${HOME}/.config/ModTheSpire"
if [[ -f ~"/.config/ModTheSpire/mod_lists.json" ]]; then
dialog --backtitle "Linux Game manager" \
--yesno "Existing mod_lists.json file found. Would you like to replace it?" -1 -1 --stdout &&
cp -v .files/SlayTheSpire/mod_lists.json ~"/.config/ModTheSpire/mod_lists.json"
cp -v .files/SlayTheSpire/mod_lists.json "${HOME}/.config/ModTheSpire/mod_lists.json"
else
cp -v .files/SlayTheSpire/mod_lists.json ~"/.config/ModTheSpire/mod_lists.json"
cp -v .files/SlayTheSpire/mod_lists.json "${HOME}/.config/ModTheSpire/mod_lists.json"
fi
cp -v .files/SlayTheSpire/MTS.sh ~/.local/games/SlayTheSpire/
cp -v .files/SlayTheSpire/MTS.sh "${HOME}/.local/games/SlayTheSpire/"
launcherPath="$(readlink -f "$0")"
launcherPath="${launcherPath%/*}"
add_launcher "${launcherPath}/.scripts/SlayTheSpire.sh"