diff --git a/linux-game-manager.sh b/linux-game-manager.sh index 62fa022..3beb011 100755 --- a/linux-game-manager.sh +++ b/linux-game-manager.sh @@ -64,6 +64,19 @@ fi exit $? } +# Check architecture compatibility +check_architecture() { + local architecture="$(uname -m)" + for i in "$@" ; do + if [[ "${architecture}" == "$i" ]]; then + return + fi + done + dialog --backtitle "Linux Game Manager" \ + --infobox "This game is not compatible with $architecture architecture." -1 -1 + exit 1 +} + # Function to open a terminal emulator terminal_emulator() { terminals=( @@ -406,30 +419,35 @@ case "${game}" in add_launcher "${installPath}/tintin-alteraeon/aa.tin" ;; "Audo") + 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" ;; "Auroboros") + 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" ;; "Bladius") + 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" ;; "Chimera") + 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" ;; "E.X.O.") + 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" @@ -441,6 +459,7 @@ case "${game}" in add_launcher "${installPath}/tintin-empiremud/em.tin" ;; "Fantasy Story II") + check_architecture x86_64 get_installer "FS2_2.6_Linux.zip" "https://drive.google.com/file/d/187OaD1HhPoty85yJafZyvfqD5_G3P04c/view?usp=sharing" unzip -d "${installPath}" "${cache}/FS2_2.6_Linux.zip" chmod +x "${installPath}/FS2_2.6_Linux/FS2.x86_64" @@ -455,6 +474,7 @@ case "${game}" in add_launcher "${installPath}/numnastics/numnastics" ;; "Onslaught") + 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" @@ -462,12 +482,14 @@ case "${game}" in add_launcher "${installPath}/Onslaught/onslaught.AppImage" ;; "S.E.A.") + 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" ;; "soundStrider") + 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" @@ -479,6 +501,7 @@ case "${game}" in add_launcher "${installPath}/tintin-stickmud/stickmud.tin" ;; "System Fault") + 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" @@ -486,6 +509,7 @@ case "${game}" in add_launcher "${installPath}/System_Fault/system-fault-linux-x86_64.AppImage" ;; "Wurmus") + 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"