More work on the new dialogue system. Game installers updated.
This commit is contained in:
@ -1,24 +1,21 @@
|
||||
check_architecture x86_64
|
||||
alert
|
||||
dialog --backtitle "Linux Game manager" \
|
||||
--msgbox \
|
||||
"Please note this requires the game to be available either in your Steam library\nor as the installer purchased from gog.com.\nIf using the gog.com installer, please use the default path when prompted." -1 -1 --stdout
|
||||
dialog --backtitle "Linux Game Manager" \
|
||||
--yes-label "GOG" \
|
||||
--no-label "Steam" \
|
||||
--yesno "Select installation method" -1 -1 --stdout
|
||||
installationMethod=$?
|
||||
ui_msgbox "Game Installer" "Game Installer" "Please note this requires the game to be available either in your Steam library or as the installer purchased from gog.com.\n\nIf using the gog.com installer, please use the default path when prompted."
|
||||
installMethod=$(ui_menu "Installation Method" "Installation Method" "Select installation method" "gog" "GOG" "steam" "Steam")
|
||||
if [[ "$installMethod" == "steam" ]]; then
|
||||
installationMethod=1
|
||||
else
|
||||
installationMethod=0
|
||||
fi
|
||||
appId="646570"
|
||||
gogFileName="slay_the_spire_2020_12_15_8735c9fe3cc2280b76aa3ec47c953352a7df1f65_43444.sh"
|
||||
if [[ $installMethod -eq 1 ]]; then
|
||||
# Steam Installation
|
||||
check_dependencies steamcmd
|
||||
echo "Please enter Steam user name:"
|
||||
read -er steamUser
|
||||
steamUser=$(ui_inputbox "Game Installer" "Game Installer" "Please enter Steam user name:" "")
|
||||
steamcmd +@sSteamCmdForcePlatformType linux +force_install_dir "${HOME}/.local/games/SlayTheSpire" +login "$steamUser" +app_update "$appId" +quit
|
||||
if [[ $? -ne 0 ]]; then
|
||||
dialog --backtitle "Linux Game Manager" \
|
||||
--msgbox "Error installing game through Steam." -1 -1 --stdout
|
||||
ui_msgbox "Game Installer" "Game Installer" "Error installing game through Steam."
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
@ -28,20 +25,17 @@ else
|
||||
DISPLAY="" find ~/Desktop -maxdepth 1 -type f -name "$gogFileName" -exec bash "{}" \;
|
||||
if [[ $? -eq 0 ]]; then
|
||||
ln -sf "${HOME}/GOG Games/Slay the Spire/game" "${installPath}/SlayTheSpire" ||
|
||||
{ dialog --backtitle "Linux Game Manager" \
|
||||
--msgbox "Error creating link to game directory." -1 -1 --stdout
|
||||
{ ui_msgbox "Game Installer" "Game Installer" "Error creating link to game directory."
|
||||
exit 1; }
|
||||
else
|
||||
dialog --backtitle "Linux Game Manager" \
|
||||
--msgbox "Error installing game from GOG installer." -1 -1 --stdout
|
||||
ui_msgbox "Game Installer" "Game Installer" "Error installing game from GOG installer."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
# Move files into place
|
||||
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 &&
|
||||
ui_yesno "Game Installer" "Game Installer" "Existing mod_lists.json file found. Would you like to replace it?" &&
|
||||
cp -v .files/SlayTheSpire/mod_lists.json "${HOME}/.config/ModTheSpire/mod_lists.json"
|
||||
else
|
||||
cp -v .files/SlayTheSpire/mod_lists.json "${HOME}/.config/ModTheSpire/mod_lists.json"
|
||||
@ -62,8 +56,7 @@ for modId in ${modsMap[@]} ; do
|
||||
done
|
||||
steamcmd +@sSteamCmdForcePlatformType linux +force_install_dir "${HOME}/.local/games/SlayTheSpire/" +login anonymous $installString +quit
|
||||
if [[ $? -ne 0 ]]; then
|
||||
dialog --backtitle "Linux Game Manager" \
|
||||
--msgbox "Error installing required mods. Some accessibility features may not be available." -1 -1 --stdout
|
||||
ui_msgbox "Game Installer" "Game Installer" "Error installing required mods. Some accessibility features may not be available."
|
||||
exit 1
|
||||
fi
|
||||
mkdir -p "$HOME/.local/games/SlayTheSpire/mods"
|
||||
@ -74,8 +67,7 @@ for modName in "${!modsMap[@]}" ; do
|
||||
ln -sr "$HOME/.local/games/SlayTheSpire/steamapps/workshop/content/$appId/${modsMap[$modName]}"/* "$HOME/.local/games/SlayTheSpire/mods/"
|
||||
fi
|
||||
if [[ $? -ne 0 ]] && [[ "$modName" == "say the spire" ]]; then
|
||||
dialog --backtitle "Linux Game Manager" \
|
||||
--msgbox "Error installing SayTheSpire mod. Screen reader support will not be available." -1 -1 --stdout
|
||||
ui_msgbox "Game Installer" "Game Installer" "Error installing SayTheSpire mod. Screen reader support will not be available."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
Reference in New Issue
Block a user