From e0b8e8440ab64679f2e1b6b5b648d12bc4f93770 Mon Sep 17 00:00:00 2001 From: OpenSauce04 Date: Fri, 28 Nov 2025 14:06:42 +0000 Subject: [PATCH] cmake: Fixed AppImage build failure caused by upstream changes to linuxdeploy Also improved error message when linuxdeploy run fails --- CMakeModules/BundleTarget.cmake | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/CMakeModules/BundleTarget.cmake b/CMakeModules/BundleTarget.cmake index bd30faf91..fead41acf 100644 --- a/CMakeModules/BundleTarget.cmake +++ b/CMakeModules/BundleTarget.cmake @@ -130,25 +130,10 @@ if (BUNDLE_TARGET_EXECUTE) --icon-file "${CMAKE_BINARY_DIR}/dist/org.azahar_emu.Azahar.svg" --desktop-file "${source_path}/dist/${executable_name}.desktop" --appdir "${appdir_path}" - RESULT_VARIABLE linuxdeploy_appdir_result) + RESULT_VARIABLE linuxdeploy_appdir_result + ERROR_VARIABLE linuxdeploy_appdir_error) if (NOT linuxdeploy_appdir_result EQUAL "0") - message(FATAL_ERROR "linuxdeploy failed to create AppDir: ${linuxdeploy_appdir_result}") - endif() - - if (enable_qt) - set(qt_hook_file "${appdir_path}/apprun-hooks/linuxdeploy-plugin-qt-hook.sh") - file(READ "${qt_hook_file}" qt_hook_contents) - # Add Cinnamon to list of DEs for GTK3 theming. - string(REPLACE - "*XFCE*" - "*X-Cinnamon*|*XFCE*" - qt_hook_contents "${qt_hook_contents}") - # Wayland backend crashes due to changed schemas in Gnome 40. - string(REPLACE - "export QT_QPA_PLATFORMTHEME=gtk3" - "export QT_QPA_PLATFORMTHEME=gtk3; export GDK_BACKEND=x11" - qt_hook_contents "${qt_hook_contents}") - file(WRITE "${qt_hook_file}" "${qt_hook_contents}") + message(FATAL_ERROR "linuxdeploy failed to create AppDir w/ exit code ${linuxdeploy_appdir_result}:\n${linuxdeploy_appdir_error}") endif() message(STATUS "Creating AppImage for executable ${executable_path}")