diff --git a/.install/Alter Aeon.sh b/.install/Alter Aeon.sh new file mode 100644 index 0000000..80c3c8d --- /dev/null +++ b/.install/Alter Aeon.sh @@ -0,0 +1,4 @@ +check_dependencies git sox tt++ +git -C "${installPath}/" clone --recurse-submodules https://github.com/lilmike/tintin-alteraeon.git | \ + dialog --progressbox "Installing \"${game}\", please wait..." -1 -1 +add_launcher "${installPath}/tintin-alteraeon/aa.tin" diff --git a/.install/Audo.sh b/.install/Audo.sh new file mode 100644 index 0000000..ce0d016 --- /dev/null +++ b/.install/Audo.sh @@ -0,0 +1,5 @@ +check_architecture x86_64 +get_installer "Audo-linux-x64.zip" "https://shiftbacktick.itch.io/audo" +mkdir -p "${installPath}/Audo" +unzip -d "${installPath}/Audo" "${cache}/Audo-linux-x64.zip" +add_launcher "${installPath}/Audo/Audo" diff --git a/.install/Auroboros.sh b/.install/Auroboros.sh new file mode 100644 index 0000000..8be2ee7 --- /dev/null +++ b/.install/Auroboros.sh @@ -0,0 +1,5 @@ +check_architecture x86_64 +get_installer "Auroboros-linux-x64.zip" "https://shiftbacktick.itch.io/auroboros" +mkdir -p "${installPath}/Auroboros" +unzip -d "${installPath}/Auroboros" "${cache}/Auroboros-linux-x64.zip" +add_launcher "${installPath}/Auroboros/Auroboros" diff --git a/.install/Ball Bouncer.sh b/.install/Ball Bouncer.sh new file mode 100644 index 0000000..8613e80 --- /dev/null +++ b/.install/Ball Bouncer.sh @@ -0,0 +1,5 @@ +check_architecture x86_64 +download "https://files.sooslandia.ru/BallBouncer/1.2.1/BallBouncer-linux-1.2.1.zip" +unzip -d "${installPath}/" "${cache}/BallBouncer-linux-1.2.1.zip" +chmod +x "${installPath}/BallBouncer/BallBouncer" +add_launcher "${installPath}/BallBouncer/BallBouncer" diff --git a/.install/Bladius.sh b/.install/Bladius.sh new file mode 100644 index 0000000..8630a78 --- /dev/null +++ b/.install/Bladius.sh @@ -0,0 +1,5 @@ +check_architecture x86_64 +get_installer "Bladius-linux-x64.zip" "https://shiftbacktick.itch.io/bladius" +mkdir -p "${installPath}/Bladius" +unzip -d "${installPath}/Bladius" "${cache}/Bladius-linux-x64.zip" +add_launcher "${installPath}/Bladius/Bladius" diff --git a/.install/Chimera.sh b/.install/Chimera.sh new file mode 100644 index 0000000..7f62ef7 --- /dev/null +++ b/.install/Chimera.sh @@ -0,0 +1,5 @@ +check_architecture x86_64 +get_installer "Chimera-linux-x64.zip" "https://shiftbacktick.itch.io/chimera" +mkdir -p "${installPath}/Chimera" +unzip -d "${installPath}/Chimera" "${cache}/Chimera-linux-x64.zip" +add_launcher "${installPath}/Chimera/Chimera" diff --git a/.install/Critter Sanctuary.sh b/.install/Critter Sanctuary.sh new file mode 100644 index 0000000..4b8f597 --- /dev/null +++ b/.install/Critter Sanctuary.sh @@ -0,0 +1,7 @@ +check_architecture x86_64 +get_installer "critter-sanctuary-linux.zip" "https://punishedfelix.itch.io/critter-sanctuary" +mkdir -p "${installPath}/critter-sanctuary" +unzip -d "${installPath}/critter-sanctuary" "${cache}/critter-sanctuary-linux.zip" +mkdir -p "${XDG_DATA_HOME:-${HOME}/.local}/share/godot/app_userdata/OverworldMovementEngine" +cp -v "${installPath}/critter-sanctuary/blind_options.save" "${XDG_DATA_HOME:-${HOME}/.local}/share/godot/app_userdata/OverworldMovementEngine/options.save" +add_launcher "${installPath}/critter-sanctuary/linux.x86_64" diff --git a/.install/E.X.O..sh b/.install/E.X.O..sh new file mode 100644 index 0000000..9eb1a62 --- /dev/null +++ b/.install/E.X.O..sh @@ -0,0 +1,5 @@ +check_architecture x86_64 +get_installer "EXO-linux-x64.zip" "https://shiftbacktick.itch.io/exo" +mkdir -p "${installPath}/E.X.O." +unzip -d "${installPath}/E.X.O." "${cache}/EXO-linux-x64.zip" +add_launcher "${installPath}/E.X.O./EXO" diff --git a/.install/Echo Command.sh b/.install/Echo Command.sh new file mode 100644 index 0000000..8621cce --- /dev/null +++ b/.install/Echo Command.sh @@ -0,0 +1,6 @@ +check_architecture x86_64 +get_installer "Echo Command.tar.xz" "https://pancakedev.itch.io/echo-command" +mkdir -p "${installPath}/Echo-Command" +tar xf "${cache}/Echo Command.tar.xz" -C "${installPath}/Echo-Command" +ln -sr "${installPath}/Echo-Command/Echo Command.x86_64" "${installPath}/Echo-Command/Echo_Command.x86_64" +add_launcher "${installPath}/Echo-Command/Echo_Command.x86_64" diff --git a/.install/EmpireMUD.sh b/.install/EmpireMUD.sh new file mode 100644 index 0000000..6b8201a --- /dev/null +++ b/.install/EmpireMUD.sh @@ -0,0 +1,4 @@ +check_dependencies git sox tt++ +git -C "${installPath}/" clone --recurse-submodules https://github.com/lilmike/tintin-empiremud.git | \ + dialog --progressbox "Installing \"${game}\", please wait..." -1 -1 +add_launcher "${installPath}/tintin-empiremud/em.tin" diff --git a/.install/End of Time.sh b/.install/End of Time.sh new file mode 100644 index 0000000..0338cdc --- /dev/null +++ b/.install/End of Time.sh @@ -0,0 +1,4 @@ +check_dependencies git opusdec sox tt++ +git -C "${installPath}/" clone https://git.2mb.codes/~stormdragon2976/tintin-endoftime | \ + dialog --progressbox "Installing \"${game}\", please wait..." -1 -1 +add_launcher "${installPath}/tintin-endoftime/eot.tin" diff --git a/.install/Fantasy Story II.sh b/.install/Fantasy Story II.sh new file mode 100644 index 0000000..2c01ce1 --- /dev/null +++ b/.install/Fantasy Story II.sh @@ -0,0 +1,5 @@ +check_architecture x86_64 +get_installer "FS2_3.0_Linux.zip" "https://drive.google.com/file/d/15Y5nxR1zl9vVNzMilpaXdCSBFhNUIDC9/view" +unzip -d "${installPath}" "${cache}/FS2_3.0_Linux.zip" +chmod +x "${installPath}/FS2_3.0_Linux/fs2.x86_64" +add_launcher "${installPath}/FS2_3.0_Linux/fs2.x86_64" "-ESpeakApplication=espeak-ng" diff --git a/.install/Freedoom.sh b/.install/Freedoom.sh new file mode 100644 index 0000000..7ed9035 --- /dev/null +++ b/.install/Freedoom.sh @@ -0,0 +1,59 @@ +tobyVersion="7-5" +mkdir -p "${installPath}/doom" +doomPath="$(find /usr/share -type d -name "doom" 2> /dev/null)" +if [[ ${#doomPath} -lt 5 ]]; then + dialog --backtitle "Linux Game Manager" \ + --yesno "Do you want Linux Game Manager to install freedoom and gzdoom for you? If you want to do this manually, select no." -1 -1 --stdout || exit 0 + if command -v yay &> /dev/null ; then + yay -Sy --noconfirm --sudoloop freedoom gzdoom freedm blasphemer-wad + elif command -v slapt-src &> /dev/null ; then + su -c 'slapt-src -i freedoom gzdoom' + elif command -v dnf &> /dev/null ; then + sudo dnf copr -y enable nalika/gzdoom + sudo dnf -q -y install freedoom + sudo dnf -q -y install gzdoom + else + dialog --backtitle "Linux Game Manager" --msgbox "No supported package managers found. Please install the freedoom and gzdoom packages manually." -1 -1 + exit 0 + fi +fi +doomPath="$(find /usr/share -type d -name "doom" 2> /dev/null | head -1)" +if ! [[ -e "${installPath}/doom/DoomMetalVol6.wad" ]] && ! [[ -e "${installPath}/doom/DoomMetalVol7.wad" ]]; then +alert +dialog --backtitle "Linux Game manager" \ + --extra-button \ + --yes-label "6" \ + --no-label "7" \ + --extra-label "None" \ + --yesno "Would you like Doom Metal Volume 6 or 7? Use arrow keys to select your answer." \ + -1 -1 --stdout + buttonCode=$? + if [[ $buttonCode -eq 0 ]]; then + download "${ipfsGateway}/ipfs/QmSzWKtP3wPvzn5GNd9F7n4RAhkFHxh2UHxXGefiAufwQW?filename=DoomMetalVol6.wad" + fi + if [[ $buttonCode -eq 1 ]]; then + download "${ipfsGateway}/ipfs/QmfXkz3tzicKGfhcYSiWUZkjkDKP2aVp53Y49n127wMr7D?filename=DoomMetalVol7.wad" + fi +fi +# The url breaks the normal download function +download_named "keyshare-universal.pk3" "https://forum.zdoom.org/download/file.php?id=42262" +download "${ipfsGateway}/ipfs/QmRjg1GSBmVCCtPv8GRTZSjNNDMjHEXE2k5hKxoBnYMFKQ?filename=TobyAccessibilityMod_V${tobyVersion}.zip" +[[ -e "${cache}/DoomMetalVol6.wad" ]] && mv "${cache}/DoomMetalVol6.wad" "${installPath}/doom" +[[ -e "${cache}/DoomMetalVol7.wad" ]] && mv "${cache}/DoomMetalVol7.wad" "${installPath}/doom" +unzip -n -d "${installPath}/doom" "${cache}/TobyAccessibilityMod_V${tobyVersion}.zip" +unzip -n -d "${installPath}/doom" "${cache}/OpMDK_ForV${tobyVersion}.zip" +cp -v "${cache}/keyshare-universal.pk3" "${installPath}/doom" +rm -fv "${installPath}/doom/"*.{ahk,bat,exe,dll,ps1} +if [[ -e /usr/share/doom/blasphem.wad ]]; then + ln -s /usr/share/doom/blasphem.wad "${installPath}/doom/" +fi +mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom" +cp "${installPath}/doom/TobyConfig.ini" "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/gzdoom.ini" +cp "${installPath}/doom/zcajun/bots.cfg" "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/" + sed -i "s;^\[IWADSearch.Directories\]$;[IWADSearch.Directories]\nPath=${doomPath}\nPath=${installPath}/doom;" "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/gzdoom.ini" + sed -i "s;^\[FileSearch.Directories\]$;[FileSearch.Directories]\nPath=${doomPath}\nPath=${installPath}/doom;" "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/gzdoom.ini" + sed -i "s;^\[SoundfontSearch.Directories\]$;[SoundfontSearch.Directories]\nPath=${doomPath}/fm_banks\nPath=${doomPath}/soundfonts\nPath=${installPath}/doom/soundfonts\nPath=${installPath}/doom/fm_banks;" "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/gzdoom.ini" + # sed -i 's/Mouse1=+attack/CTRL=+attack/' "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/gzdoom.ini" +launcherPath="$(readlink -f "$0")" +launcherPath="${launcherPath%/*}" +add_launcher "${launcherPath}/.scripts/FreeDoom.sh" diff --git a/.install/Monkey Spank.sh b/.install/Monkey Spank.sh new file mode 100644 index 0000000..5b4cbcb --- /dev/null +++ b/.install/Monkey Spank.sh @@ -0,0 +1,3 @@ +check_dependencies python-pygame:pygame python-xdg:xdg python-pyperclip:pyperclip python-requests:requests python-setproctitle:setproctitle +git -C "${installPath}" clone --recurse-submodules https://gitlab.com/stormdragon2976/monkeyspank.git +add_launcher "${installPath}/monkeyspank/monkeyspank" diff --git a/.install/Numnastics.sh b/.install/Numnastics.sh new file mode 100644 index 0000000..e08c603 --- /dev/null +++ b/.install/Numnastics.sh @@ -0,0 +1,3 @@ +check_dependencies python-pygame:pygame python-xdg:xdg python-pyperclip:pyperclip python-requests:requests python-setproctitle:setproctitle +git -C "${installPath}" clone --recurse-submodules https://gitlab.com/stormdragon2976/numnastics.git +add_launcher "${installPath}/numnastics/numnastics" diff --git a/.install/Onslaught.sh b/.install/Onslaught.sh new file mode 100644 index 0000000..216b4ad --- /dev/null +++ b/.install/Onslaught.sh @@ -0,0 +1,6 @@ +check_architecture x86_64 +get_installer "onslaught.AppImage" "https://lightsoutgames.itch.io/onslaught" +mkdir -p "${installPath}/Onslaught" +cp -v "${cache}/onslaught.AppImage" "${installPath}/Onslaught/onslaught.AppImage" +chmod +x "${installPath}/Onslaught/onslaught.AppImage" +add_launcher "${installPath}/Onslaught/onslaught.AppImage" diff --git a/.install/Periphery Synthetic EP.sh b/.install/Periphery Synthetic EP.sh new file mode 100644 index 0000000..7a2f7da --- /dev/null +++ b/.install/Periphery Synthetic EP.sh @@ -0,0 +1,5 @@ +check_architecture x86_64 +get_installer "periphery-synthetic-ep-linux-x64.zip" "https://shiftbacktick.itch.io/periphery-synthetic-ep" +mkdir -p "${installPath}/periphery-synthetic-ep" +unzip -d "${installPath}/periphery-synthetic-ep" "${cache}/periphery-synthetic-ep-linux-x64.zip" +add_launcher "${installPath}/periphery-synthetic-ep/periphery-synthetic-ep" diff --git a/.install/S.E.A..sh b/.install/S.E.A..sh new file mode 100644 index 0000000..8f0cce2 --- /dev/null +++ b/.install/S.E.A..sh @@ -0,0 +1,5 @@ +check_architecture x86_64 +get_installer "SEA-linux-x64.zip" "https://shiftbacktick.itch.io/sea" +mkdir -p "${installPath}/S.E.A." +unzip -d "${installPath}/S.E.A." "${cache}/SEA-linux-x64.zip" +add_launcher "${installPath}/S.E.A./SEA" diff --git a/.install/Slay the Spire.sh b/.install/Slay the Spire.sh new file mode 100644 index 0000000..e036cc7 --- /dev/null +++ b/.install/Slay the Spire.sh @@ -0,0 +1,59 @@ +check_architecture x86_64 +echo "Please note this requires the game to be available either in your Steam library" +echo "or as the installer purchased from gog.com." +echo "If using the gog.com installer, please use the default path when prompted." +alert +check_dependencies steamcmd +appId="646570" +if ! [[ -f ~/Downloads/slay_the_spire_2020_12_15_8735c9fe3cc2280b76aa3ec47c953352a7df1f65_43444.sh ]] && ! [[ -f ~/Desktop/slay_the_spire_2020_12_15_8735c9fe3cc2280b76aa3ec47c953352a7df1f65_43444.sh ]]; then + echo "Please enter Steam user name:" + read -er steamUser + steamcmd +@sSteamCmdForcePlatformType linux +force_install_dir "${HOME}/.local/games/SlayTheSpire" +login "$steamUser" +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 "{}" \; + if [[ $? -eq 0 ]]; then + ln -sf "${HOME}/GOG Games/Slay the Spire/game" "${installPath}/SlayTheSpire" || + { echo "Error creating link." + exit 1; } +else + echo "Error installing game." + 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 && + 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" +fi +cp -v .files/SlayTheSpire/MTS.sh "${HOME}/.local/games/SlayTheSpire/" +# Get mods +declare -A mods=( + [mod the spire]=1605060445 + [base mod]=1605833019 + [stslib]=1609158507 + [curses come first]=2304840098 + [achievement enabler]=1692554109 + [say the spire]=2239220106 +) +installString="" +for x in ${mods[@]} ; do + installString="$installString +workshop_download_item $appId $x" +done +steamcmd +@sSteamCmdForcePlatformType linux +force_install_dir "${HOME}/.local/games/SlayTheSpire/" +login anonymous $installString +quit +mkdir -p "$HOME/.local/games/SlayTheSpire/mods" +for x in "${!mods[@]}" ; do + if [ "$x" == "mod the spire" ] ; then + ln -sr "$HOME/.local/games/SlayTheSpire/steamapps/workshop/content/$appId/${mods[$x]}"/* "$HOME/.local/games/SlayTheSpire/" + else + ln -sr "$HOME/.local/games/SlayTheSpire/steamapps/workshop/content/$appId/${mods[$x]}"/* "$HOME/.local/games/SlayTheSpire/mods/" + fi +done +launcherPath="$(readlink -f "$0")" +launcherPath="${launcherPath%/*}" +add_launcher "${launcherPath}/.scripts/SlayTheSpire.sh" diff --git a/.install/Slay the Text.sh b/.install/Slay the Text.sh new file mode 100644 index 0000000..3850218 --- /dev/null +++ b/.install/Slay the Text.sh @@ -0,0 +1,4 @@ +check_dependencies python-ansimarkup:ansimarkup +git -C "${installPath}/" clone https://github.com/Difio3333/slaythetext.git | \ + dialog --progressbox "Installing \"${game}\", please wait..." -1 -1 +add_launcher "${installPath}/slaythetext/main.py" diff --git a/.install/SoundRTS.sh b/.install/SoundRTS.sh new file mode 100644 index 0000000..ffe2116 --- /dev/null +++ b/.install/SoundRTS.sh @@ -0,0 +1,6 @@ +check_dependencies python3 +mkdir -p "${installPath}" +git -C "${installPath}" clone "https://github.com/soundmud/soundrts.git" +git -C "${installPath}/soundrts" checkout v1.3.8 +sed -i 's;git+https://github.com/soundmud/accessible_output2;accessible_output2;' "${installPath}/soundrts/requirements.txt" +python3 -m venv --system-site-packages "${installPath}/soundrts/.venv" diff --git a/.install/Stardew Valley.sh b/.install/Stardew Valley.sh new file mode 100644 index 0000000..da22e79 --- /dev/null +++ b/.install/Stardew Valley.sh @@ -0,0 +1,19 @@ +check_architecture x86_64 +DISPLAY="" +echo "Please select the default path when prompted by the installer." +alert +get_installer "stardew_valley_1_5_6_1988831614_53040.sh" "https://www.gog.com/game/stardew_valley" +bash "${cache}/stardew_valley_1_5_6_1988831614_53040.sh" || + { echo "Error installing game." + exit 1; } +smapiVersion="3.18.4" +download "https://github.com/Pathoschild/SMAPI/releases/download/${smapiVersion}/SMAPI-${smapiVersion}-installer.zip" "https://stormgames.wolfe.casa/downloads/stardew-valley/Mods.tar.xz" +smapiTmp="$(mktemp -d)" +unzip "${cache}/SMAPI-${smapiVersion}-installer.zip" -d "$smapiTmp" +echo "Preparing to install mods. Please select the same path as before when prompted." +echo "When it says SMAPI has been installed, press enter to finish installation." +alert +bash "${smapiTmp}/SMAPI ${smapiVersion} installer/install on Linux.sh" +ln -sf "${HOME}/GOG Games/Stardew Valley/game" "${installPath}/StardewValley" +tar -xvf "${cache}/Mods.tar.xz" -C "${installPath}/StardewValley/" +add_launcher "${installPath}/StardewValley/StardewValley" diff --git a/.install/StickMUD.sh b/.install/StickMUD.sh new file mode 100644 index 0000000..092956d --- /dev/null +++ b/.install/StickMUD.sh @@ -0,0 +1,4 @@ +check_dependencies git sox tt++ +git -C "${installPath}/" clone --recurse-submodules https://github.com/stormdragon2976/tintin-stickmud.git | \ + dialog --progressbox "Installing \"${game}\", please wait..." -1 -1 +add_launcher "${installPath}/tintin-stickmud/stickmud.tin" diff --git a/.install/System Fault.sh b/.install/System Fault.sh new file mode 100644 index 0000000..15a3706 --- /dev/null +++ b/.install/System Fault.sh @@ -0,0 +1,6 @@ +check_architecture x86_64 +get_installer "system-fault-linux-x86_64.AppImage" "https://lightsoutgames.itch.io/systemfault" +mkdir -p "${installPath}/System_Fault" +cp -v "${cache}/system-fault-linux-x86_64.AppImage" "${installPath}/System_Fault/system-fault-linux-x86_64.AppImage" +chmod +x "${installPath}/System_Fault/system-fault-linux-x86_64.AppImage" +add_launcher "${installPath}/System_Fault/system-fault-linux-x86_64.AppImage" diff --git a/.install/Upheaval Commandline.sh b/.install/Upheaval Commandline.sh new file mode 100644 index 0000000..2f9ce65 --- /dev/null +++ b/.install/Upheaval Commandline.sh @@ -0,0 +1,6 @@ +check_architecture x86_64 +check_dependencies dmidecode +get_installer "upheaval-linux-console.zip" "https://leonegaming.itch.io/upheaval" +mkdir -p "${installPath}/Upheaval_Commandline" +unzip -d "${installPath}/Upheaval_Commandline" "${cache}/upheaval-linux-console.zip" +add_launcher "${installPath}/Upheaval_Commandline/Upheaval_Command_Line" diff --git a/.install/Upheaval Gui.sh b/.install/Upheaval Gui.sh new file mode 100644 index 0000000..8a434f2 --- /dev/null +++ b/.install/Upheaval Gui.sh @@ -0,0 +1,8 @@ +check_architecture x86_64 +check_dependencies dmidecode +get_installer "upheaval-linux.zip" "https://leonegaming.itch.io/upheaval" +mkdir -p "${installPath}/Upheaval_Gui" +unzip -d "${installPath}/Upheaval_Gui" "${cache}/upheaval-linux.zip" +add_launcher "${installPath}/Upheaval_Gui/Upheaval" +echo "To enable accessibility, press shift t when the game starts." +alert diff --git a/.install/Wurmus.sh b/.install/Wurmus.sh new file mode 100644 index 0000000..06f4818 --- /dev/null +++ b/.install/Wurmus.sh @@ -0,0 +1,5 @@ +check_architecture x86_64 +get_installer "Wurmus-linux-x64.zip" "https://shiftbacktick.itch.io/wurmus" +mkdir -p "${installPath}/Wurmus" +unzip -d "${installPath}/Wurmus" "${cache}/Wurmus-linux-x64.zip" +add_launcher "${installPath}/Wurmus/Wurmus" diff --git a/.install/Zombowl.sh b/.install/Zombowl.sh new file mode 100644 index 0000000..143565f --- /dev/null +++ b/.install/Zombowl.sh @@ -0,0 +1,13 @@ +architecture="$(uname -m)" +if [[ "${architecture}" == "aarch64" ]]; then + pkgname="Zombowl-Linux-aarch64.zip" +elif [[ "${architecture}" == "x86_64" ]]; then + pkgname="Zombowl-Linux-X86_64.zip" +else + echo "Architecture ${architecture} is not supported." + exit 1 +fi +get_installer "${pkgname}" "https://stormdragon2976.itch.io/zombowl" +mkdir -p "${installPath}/" +unzip -d "${installPath}/" "${cache}/${pkgname}" +add_launcher "${installPath}/${pkgname%.*}/Zombowl" diff --git a/.install/soundStrider.sh b/.install/soundStrider.sh new file mode 100644 index 0000000..fd44940 --- /dev/null +++ b/.install/soundStrider.sh @@ -0,0 +1,5 @@ +check_architecture x86_64 +get_installer "soundStrider-linux-x64.zip" "https://shiftbacktick.itch.io/soundstrider" +mkdir -p "${installPath}/soundStrider" +unzip -d "${installPath}/soundStrider" "${cache}/soundStrider-linux-x64.zip" +add_launcher "${installPath}/soundStrider/soundStrider" diff --git a/linux-game-manager.sh b/linux-game-manager.sh index 55695ee..f8554a9 100755 --- a/linux-game-manager.sh +++ b/linux-game-manager.sh @@ -337,31 +337,47 @@ add_launcher() { fi } + # Install games game_installer() { + # Get list of installed games from config file mapfile -t installedGames < <(sed '/^$/d' "${configFile}" 2> /dev/null | cut -d '|' -f1) - # Create the menu of installed games + # Create the menu of available games by reading from .install directory declare -a menuList - for i in "${gameList[@]}" ; do - local menuItem="$i" - for j in "${installedGames[@]}" ; do + # Get all .sh files from .install directory, excluding those starting with #, and sort them + mapfile -t sortedGames < <(for f in "${0%/*}/.install/"*.sh; do + # Skip if first line starts with # + [[ $(head -n1 "$f") == "#"* ]] && continue + # Output filename without .sh extension + echo "${f##*/}" + done | sort) + for i in "${sortedGames[@]}"; do + local menuItem="${i%.sh}" + # Check if game is already installed + for j in "${installedGames[@]}"; do if [[ "$j" == "$menuItem" ]]; then unset menuItem + break fi done + # Add to menu if not installed if [[ -n "$menuItem" ]]; then menuList+=("$menuItem" "$menuItem") fi done + # If all games are installed, exit if [[ ${#menuList[@]} -eq 0 ]]; then echo "All games are already installed." exit 0 fi + # Add donation option at the end menuList+=("Donate" "Donate") + # Show game selection dialog game="$(dialog --backtitle "Game Installer" \ --clear \ --no-tags \ --menu "Please select a game to install" 0 0 0 "${menuList[@]}" --stdout)" + exit 0 }