diff options
author | saturneric <[email protected]> | 2024-12-02 20:11:48 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-12-02 20:11:48 +0000 |
commit | e1859c7913aa6b998d8c126b0f60235d10a43a1b (patch) | |
tree | ad6cc69a26dec6f1b24bb82811fc526ef07a4411 | |
parent | fix: should add matrix.os in the dmg name (diff) | |
download | GpgFrontend-e1859c7913aa6b998d8c126b0f60235d10a43a1b.tar.gz GpgFrontend-e1859c7913aa6b998d8c126b0f60235d10a43a1b.zip |
fix: support debug module loading by AppImage
-rw-r--r-- | src/core/module/ModuleInit.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
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<QString, bool> { 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<QString, bool> { } #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()) { |