From 465162acbc684ee220c506f1ed456873a87372a9 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Nov 2025 23:06:58 +0000 Subject: [PATCH] fix(check_deps): Update support for Ubuntu and Debian versions * Adjusted version checks for supported distributions. * Added specific error messages for unsupported game titles based on OS version. --- lgsm/modules/check_deps.sh | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/lgsm/modules/check_deps.sh b/lgsm/modules/check_deps.sh index 308923fa9..edcdb6c7b 100644 --- a/lgsm/modules/check_deps.sh +++ b/lgsm/modules/check_deps.sh @@ -361,12 +361,22 @@ if [ -n "${distrosupport}" ]; then fi fi -if { [ "${distroid}" == "ubuntu" ] && dpkg --compare-versions "${distroversion}" "gt" "24.04"; } || { [ "${distroidlike}" == "debian" ] && dpkg --compare-versions "${distroversion}" "gt" "12"; }; then - if [ "${shortname}" == "bf1942" ] || [ "${shortname}" == "bfv" ]; then - fn_print_failure_nl "${gamename} is not supported on ${distroname}." - fn_script_log_fail "${gamename} is not supported on ${distroname}." - core_exit.sh - fi +# These titles are only supported up to Ubuntu 22.04 (Jammy) and Debian 12 (Bookworm). +if { [ "${distroid}" == "ubuntu" ] && dpkg --compare-versions "${distroversion}" "gt" "22.04"; } || { [ "${distroidlike}" == "debian" ] && dpkg --compare-versions "${distroversion}" "gt" "12"; }; then + if [ "${shortname}" == "bf1942" ] || [ "${shortname}" == "bfv" ]; then + fn_print_failure_nl "${gamename} is not supported on ${distroname} (requires Ubuntu <= 22.04 or Debian <= 12)." + fn_script_log_fail "${gamename} is not supported on ${distroname}." + core_exit.sh + fi +fi + +# These titles are only supported up to Ubuntu 20.04 and Debian 11 (and Debian-like derivatives). +if { [ "${distroid}" == "ubuntu" ] && dpkg --compare-versions "${distroversion}" "gt" "20.04"; } || { [ "${distroidlike}" == "debian" ] && dpkg --compare-versions "${distroversion}" "gt" "11"; }; then + if [ "${shortname}" == "onset" ] || [ "${shortname}" == "btl" ]; then + fn_print_failure_nl "${gamename} is not supported on ${distroname} (requires Ubuntu <= 20.04 or Debian <= 11)." + fn_script_log_fail "${gamename} is not supported on ${distroname}." + core_exit.sh + fi fi if [ ! -f "${tmpdir}/dependency-no-check.tmp" ] && [ ! -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then