diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml index 8c425352..4fe9b812 100644 --- a/.github/workflows/build_all.yml +++ b/.github/workflows/build_all.yml @@ -95,15 +95,9 @@ jobs: - name: Install SDRplay API run: wget https://www.sdrplay.com/software/SDRplay_RSP_API-MacOSX-3.07.3.pkg && sudo installer -pkg SDRplay_RSP_API-MacOSX-3.07.3.pkg -target / - - name: Install libiio - run: mkdir libiio && cd libiio && wget https://github.com/analogdevicesinc/libiio/releases/download/v0.23/macOS-10.15.pkg && sudo installer -pkg macOS-10.15.pkg -target / - - - name: Install libad9361 - run: wget https://github.com/analogdevicesinc/libad9361-iio/releases/download/v0.2/libad9361-0.2.pkg && sudo installer -pkg libad9361-0.2.pkg -target / - - name: Prepare CMake working-directory: ${{runner.workspace}}/build - run: cmake $GITHUB_WORKSPACE -DOPT_BUILD_PLUTOSDR_SOURCE=ON -DOPT_BUILD_SOAPY_SOURCE=OFF -DOPT_BUILD_BLADERF_SOURCE=ON -DOPT_BUILD_SDRPLAY_SOURCE=ON -DOPT_BUILD_AUDIO_SINK=OFF -DOPT_BUILD_PORTAUDIO_SINK=ON -DOPT_BUILD_NEW_PORTAUDIO_SINK=ON -DOPT_BUILD_M17_DECODER=ON -DUSE_DOTAPP_DEFAULTS=ON -DCMAKE_BUILD_TYPE=Release + run: cmake $GITHUB_WORKSPACE -DOPT_BUILD_PLUTOSDR_SOURCE=OFF -DOPT_BUILD_SOAPY_SOURCE=OFF -DOPT_BUILD_BLADERF_SOURCE=ON -DOPT_BUILD_SDRPLAY_SOURCE=ON -DOPT_BUILD_AUDIO_SINK=OFF -DOPT_BUILD_PORTAUDIO_SINK=ON -DOPT_BUILD_NEW_PORTAUDIO_SINK=ON -DOPT_BUILD_M17_DECODER=ON -DUSE_BUNDLE_DEFAULTS=ON -DCMAKE_BUILD_TYPE=Release - name: Build working-directory: ${{runner.workspace}}/build @@ -111,7 +105,7 @@ jobs: - name: Create Archive working-directory: ${{runner.workspace}} - run: cd $GITHUB_WORKSPACE && sh make_macos_dotapp.sh ${{runner.workspace}}/build ./SDR++.app && zip -r ${{runner.workspace}}/sdrpp_macos_intel.zip SDR++.app + run: cd $GITHUB_WORKSPACE && sh make_macos_bundle.sh ${{runner.workspace}}/build ./SDR++.app && zip -r ${{runner.workspace}}/sdrpp_macos_intel.zip SDR++.app - name: Save Archive uses: actions/upload-artifact@v2 diff --git a/CMakeLists.txt b/CMakeLists.txt index e12f3e10..5e5e291b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,7 +49,7 @@ option(OPT_BUILD_SCHEDULER "Build the scheduler" OFF) # Other options option(USE_INTERNAL_LIBCORRECT "Use an external version of libcorrect" ON) -option(USE_DOTAPP_DEFAULTS "Set the default resource and module directories to the right ones for a MacOS .app" OFF) +option(USE_BUNDLE_DEFAULTS "Set the default resource and module directories to the right ones for a MacOS .app" OFF) # Core of SDR++ add_subdirectory("core") diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 24f74f29..d78ede58 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -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") diff --git a/core/src/core.cpp b/core/src/core.cpp index 1702b476..adf8f018 100644 --- a/core/src/core.cpp +++ b/core/src/core.cpp @@ -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 diff --git a/core/src/options.cpp b/core/src/options.cpp index 73540c22..1418541d 100644 --- a/core/src/options.cpp +++ b/core/src/options.cpp @@ -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