mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-10-19 04:10:02 +02:00
add global definitions for all paths
This commit is contained in:
@@ -24,14 +24,16 @@
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
#ifndef INSTALL_PREFIX
|
||||
#ifdef __APPLE__
|
||||
#define INSTALL_PREFIX "/usr/local"
|
||||
#else
|
||||
#define INSTALL_PREFIX "/usr"
|
||||
|
||||
// Default install dirs to make the IDE happy
|
||||
#ifndef SDRPP_MODULES_LOAD_DIR
|
||||
#define SDRPP_MODULES_LOAD_DIR ""
|
||||
#endif
|
||||
#ifndef SDRPP_RES_LOAD_DIR
|
||||
#define SDRPP_RES_LOAD_DIR ""
|
||||
#endif
|
||||
|
||||
|
||||
namespace core {
|
||||
ConfigManager configManager;
|
||||
ModuleManager moduleManager;
|
||||
@@ -248,19 +250,14 @@ int sdrpp_main(int argc, char* argv[]) {
|
||||
defConfig["lockMenuOrder"] = false;
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
defConfig["modulesDirectory"] = "./modules";
|
||||
defConfig["resourcesDirectory"] = "./res";
|
||||
#elif defined(IS_MACOS_BUNDLE)
|
||||
defConfig["modulesDirectory"] = "../Plugins";
|
||||
defConfig["resourcesDirectory"] = "../Resources";
|
||||
#elif defined(__ANDROID__)
|
||||
defConfig["modulesDirectory"] = root + "/modules";
|
||||
defConfig["resourcesDirectory"] = root + "/res";
|
||||
#if define(__ANDROID__)
|
||||
defConfig["modulesDirectory"] = root + SDRPP_MODULES_LOAD_DIR;
|
||||
defConfig["resourcesDirectory"] = root + SDRPP_RES_LOAD_DIR;
|
||||
#else
|
||||
defConfig["modulesDirectory"] = INSTALL_PREFIX "/lib/sdrpp/plugins";
|
||||
defConfig["resourcesDirectory"] = INSTALL_PREFIX "/share/sdrpp";
|
||||
defConfig["modulesDirectory"] = SDRPP_MODULES_LOAD_DIR;
|
||||
defConfig["resourcesDirectory"] = SDRPP_RES_LOAD_DIR;
|
||||
#endif
|
||||
|
||||
|
||||
// Load config
|
||||
flog::info("Loading config");
|
||||
|
Reference in New Issue
Block a user