mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2024-12-24 18:08:27 +01:00
CI bugfix and refactoring
This commit is contained in:
parent
170a48f83f
commit
dde95019ea
10
.github/workflows/build_all.yml
vendored
10
.github/workflows/build_all.yml
vendored
@ -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
|
||||
|
@ -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")
|
||||
|
@ -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")
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user