diff options
Diffstat (limited to 'src/core/module/ModuleInit.cpp')
-rw-r--r-- | src/core/module/ModuleInit.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/core/module/ModuleInit.cpp b/src/core/module/ModuleInit.cpp index ae784279..4fedc6c7 100644 --- a/src/core/module/ModuleInit.cpp +++ b/src/core/module/ModuleInit.cpp @@ -47,25 +47,26 @@ void LoadModuleFromPath(const QString& mods_path, bool integrated) { } auto LoadIntegratedMods() -> bool { - auto exec_binary_path = QCoreApplication::applicationDirPath(); + const auto exec_binary_path = QCoreApplication::applicationDirPath(); + QString mods_path = exec_binary_path + "/modules"; -#if defined(MACOS) && defined(RELEASE) - // App Bundle - auto mods_path = exec_binary_path + "/../Modules"; -#else - // Debug Or Windows Platform - auto mods_path = exec_binary_path + "/modules"; -#endif +#ifdef NDEBUG +#if defined(__APPLE__) && defined(__MACH__) + // App Bundle + mods_path = exec_binary_path + "/../Modules"; +#elif defined(__linux__) // AppImage if (!qEnvironmentVariable("APPIMAGE").isEmpty()) { mods_path = qEnvironmentVariable("APPDIR") + "/usr/modules"; } - // Flatpak if (!qEnvironmentVariable("container").isEmpty()) { mods_path = "/app/modules"; } +#endif + +#endif if (!QDir(mods_path).exists()) { qCWarning(core) << "integrated module directory at path: " << mods_path |