From e1859c7913aa6b998d8c126b0f60235d10a43a1b Mon Sep 17 00:00:00 2001 From: saturneric Date: Mon, 2 Dec 2024 21:11:48 +0100 Subject: fix: support debug module loading by AppImage --- src/core/module/ModuleInit.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/core/module/ModuleInit.cpp') diff --git a/src/core/module/ModuleInit.cpp b/src/core/module/ModuleInit.cpp index 977dd21e..a5459882 100644 --- a/src/core/module/ModuleInit.cpp +++ b/src/core/module/ModuleInit.cpp @@ -52,12 +52,7 @@ auto LoadIntegratedMods() -> QMap { const auto exec_binary_path = GlobalSettingStation::GetInstance().GetAppDir(); QString mods_path = exec_binary_path + "/modules"; -#ifdef NDEBUG - -#if defined(__APPLE__) && defined(__MACH__) - // App Bundle - mods_path = exec_binary_path + "/../Modules"; -#elif defined(__linux__) +#if defined(__linux__) // AppImage if (!qEnvironmentVariable("APPIMAGE").isEmpty()) { mods_path = qEnvironmentVariable("APPDIR") + "/usr/modules"; @@ -68,12 +63,17 @@ auto LoadIntegratedMods() -> QMap { } #endif -#else - #if defined(_WIN32) || defined(WIN32) mods_path = exec_binary_path + "/../modules/bin"; #endif +#ifdef NDEBUG + +#if defined(__APPLE__) && defined(__MACH__) + // App Bundle + mods_path = exec_binary_path + "/../Modules"; +#endif + #endif if (!QDir(mods_path).exists()) { -- cgit v1.2.3