CI bugfix and refactoring

This commit is contained in:
Alexandre
2021-11-17 15:37:21 -06:00
parent 170a48f83f
commit dde95019ea
5 changed files with 9 additions and 15 deletions

View File

@ -5,9 +5,9 @@ if (USE_INTERNAL_LIBCORRECT)
add_subdirectory("libcorrect/")
endif (USE_INTERNAL_LIBCORRECT)
if (USE_DOTAPP_DEFAULTS)
add_definitions(-DMACOS_DOTAPP)
endif (USE_DOTAPP_DEFAULTS)
if (USE_BUNDLE_DEFAULTS)
add_definitions(-DIS_MACOS_BUNDLE)
endif (USE_BUNDLE_DEFAULTS)
# Main code
file(GLOB_RECURSE SRC "src/*.cpp" "src/*.c")

View File

@ -102,7 +102,7 @@ static void maximized_callback(GLFWwindow* window, int n) {
int sdrpp_main(int argc, char *argv[]) {
spdlog::info("SDR++ v" VERSION_STR);
#ifdef MACOS_DOTAPP
#ifdef IS_MACOS_BUNDLE
// If this is a MacOS .app, CD to the correct directory
auto execPath = std::filesystem::absolute(argv[0]);
chdir(execPath.parent_path().string().c_str());
@ -248,7 +248,7 @@ int sdrpp_main(int argc, char *argv[]) {
#if defined(_WIN32)
defConfig["modulesDirectory"] = "./modules";
defConfig["resourcesDirectory"] = "./res";
#elif defined(MACOS_DOTAPP)
#elif defined(IS_MACOS_BUNDLE)
defConfig["modulesDirectory"] = "../Plugins";
defConfig["resourcesDirectory"] = "../Resources";
#else

View File

@ -9,7 +9,7 @@ namespace options {
#if defined(_WIN32)
opts.root = ".";
opts.showConsole = false;
#elif defined(MACOS_DOTAPP)
#elif defined(IS_MACOS_BUNDLE)
std::string homedir = getenv("HOME");
opts.root = homedir + "/Library/Application Support/sdrpp";
#else