diff --git a/ReadmeMacOS.md b/ReadmeMacOS.md index 3a916ce6a..463f08dcb 100644 --- a/ReadmeMacOS.md +++ b/ReadmeMacOS.md @@ -1,7 +1,7 @@ # MacOS ## Prerequisites for OSX (Sierra): -- Qt (used 5.6.2) +- Qt (used 5.12) - XCode with MacPorts - HackRF One @@ -9,17 +9,18 @@ We are only covering HackRF One, since is only the hardware I own. In the future we will test RTL based: NooElec NESDR Nano 3(RTL2832U & R820T2). ### Project dir structure: -SDRangel-3.x: - + build-sdrangel.macos-Desktop_Qt_5_6_2_clang_64bit-Release +SDRangel-4.x: + + build-sdrangel.macos-Desktop_Qt_5_12_0_clang_64bit-Release + sdrangel + deps + cm256cc + dsdcc + mbelib -+ boost_1_64_0/ + + nanomsg ++ boost_1_69_0/ ### Environment preparation -Boost 1.64: Download and unpack +Boost 1.69: Download and unpack There are a few dependencies which can be installed through MacPorts: ``` sudo port install cmake hackrf-devel bladeRF rtl-sdr opencv diff --git a/apple/deploy.sh b/apple/deploy.sh index 1837832e7..5e45230e6 100755 --- a/apple/deploy.sh +++ b/apple/deploy.sh @@ -1,38 +1,54 @@ #!/bin/bash -# Run from build directory -test -d "app/sdrangel.app/Contents" || { echo "Please build first or chdir to proper folder!"; exit 1; } +# Run from build directory after build +APP_PATH="app/sdrangel.app" +test -d "${APP_PATH}/Contents" || { echo "Please build first or chdir to proper folder!"; exit 1; } -APP_LIB="app/sdrangel.app/Contents/lib" +APP_LIB="${APP_PATH}/Contents/Frameworks" APP_PLUGINS="${APP_LIB}/plugins" -mkdir -p "${APP_PLUGINS}/channeltx" -mkdir -p "${APP_PLUGINS}/channelrx" -mkdir -p "${APP_PLUGINS}/samplesink" -mkdir -p "${APP_PLUGINS}/samplesource" +mkdir -p $APP_PLUGINS -cp -v fcdhid/libfcdhid.dylib $APP_LIB -cp -v fcdlib/libfcdlib.dylib $APP_LIB -cp -v mbelib/libmbelib.dylib $APP_LIB -cp -v sdrbase/libsdrbase.dylib $APP_LIB -cp -v sdrgui/libsdrgui.dylib $APP_LIB -cp -v devices/libdevices.dylib $APP_LIB -cp -v cm256cc/libcm256cc.dylib $APP_LIB -cp -v httpserver/libhttpserver.dylib $APP_LIB -cp -v swagger/libswagger.dylib $APP_LIB -cp -v logging/liblogging.dylib $APP_LIB +dply_lib() +{ + cp -f $1 $APP_LIB + echo "DeployLIB: `basename $1` to ${APP_LIB}" +} -for f in `find plugins/channelrx/ -name '*.dylib'`; do cp -v $f "${APP_PLUGINS}/channelrx/"; done -for f in `find plugins/channeltx/ -name '*.dylib'`; do cp -v $f "${APP_PLUGINS}/channeltx/"; done -for f in `find plugins/samplesink/ -name '*.dylib'`; do cp -v $f "${APP_PLUGINS}/samplesink/"; done -for f in `find plugins/samplesource/ -name '*.dylib'`; do cp -v $f "${APP_PLUGINS}/samplesource/"; done +dply_plugin() +{ + tmp=`dirname $1` + tmp=`dirname $tmp` + plugin_type=`basename $tmp` + plugin_path="${APP_PLUGINS}/${plugin_type}" + mkdir -p $plugin_path + cp -f $1 $plugin_path + echo "DeployPLUGIN: `basename $1` to ${plugin_path}" +} +# 1st-pass: Gather libs & plugins +for i in `find . -name '*.dylib' -type f -not -path "./${APP_PATH}/*"`; do + if [[ $i == *"plugins/"* ]]; then + dply_plugin $i + else + dply_lib $i + fi +done + +# 2nd-pass: Symlink libs cd $APP_LIB -ln -s libdsdcc.dylib libdsdcc.1.dylib -ln -s libdevices.dylib libdevices.1.dylib -ln -s libsdrbase.dylib libsdrbase.1.dylib -ln -s libsdrgui.dylib libsdrgui.1.dylib -ln -s libmbelib.dylib libmbelib.1.dylib -ln -s liblogging.dylib liblogging.1.dylib -ln -s libhttpserver.dylib libhttpserver.1.dylib -ln -s libswagger.dylib libswagger.1.dylib +for i in `find . -name '*.1.0.0.dylib' -type f -not -path "./plugins/*"`; do + ln -sf $i "${i/.1.0.0.dylib/.1.0.dylib}" + ln -sf $i "${i/.1.0.0.dylib/.1.dylib}" + ln -sf $i "${i/.1.0.0.dylib/.dylib}" +done +cd ../../.. +pwd + +# Deploy DMG +/Applications/Qt/5.12.0/clang_64/bin/macdeployqt ./sdrangel.app \ + -always-overwrite \ + -dmg \ + -libpath=sdrangel.app/Contents/Frameworks \ + -verbose=1 + diff --git a/apple/run.sh b/apple/run.sh deleted file mode 100755 index dadc6ed62..000000000 --- a/apple/run.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -test -d app/sdrangel.app/Contents || { echo "Please build first or chdir to proper folder!"; exit 1; } - -cd app/sdrangel.app/Contents/lib -DYLD_LIBRARY_PATH=/opt/local/lib:.; ../MacOS/sdrangel diff --git a/cm256cc/cm256cc.pro b/cm256cc/cm256cc.pro index 67c59ca7a..dba95a37c 100644 --- a/cm256cc/cm256cc.pro +++ b/cm256cc/cm256cc.pro @@ -22,6 +22,10 @@ INCLUDEPATH += $$LIBCM256CCSRC DEFINES += USE_SSSE3=1 QMAKE_CXXFLAGS += -mssse3 +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} + CONFIG(Release):build_subdir = release CONFIG(Debug):build_subdir = debug diff --git a/devices/devices.pro b/devices/devices.pro index c06a7188e..901eac7d7 100644 --- a/devices/devices.pro +++ b/devices/devices.pro @@ -204,6 +204,7 @@ macx { LIBS += -L/opt/local/lib -lhackrf LIBS += -L/usr/local/lib -lLimeSuite LIBS += -framework iio + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ } MSVC { diff --git a/dsdcc/dsdcc.pro b/dsdcc/dsdcc.pro index 89dc3b67a..406b043c4 100644 --- a/dsdcc/dsdcc.pro +++ b/dsdcc/dsdcc.pro @@ -90,3 +90,7 @@ $$LIBDSDCCSRC/timeutil.h\ $$LIBDSDCCSRC/export.h LIBS += -L../mbelib/$${build_subdir} -lmbelib + +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} diff --git a/fcdhid/fcdhid.pro b/fcdhid/fcdhid.pro index 5f2ef61ce..1b15218b6 100644 --- a/fcdhid/fcdhid.pro +++ b/fcdhid/fcdhid.pro @@ -29,3 +29,7 @@ HEADERS = $$PWD/fcdhid.h\ CONFIG(MINGW32):LIBS += -LC:\softs\libusb-1.0.22\MinGW32\dll -llibusb-1.0 -liconv CONFIG(MINGW64):LIBS += -LC:\softs\libusb-1.0.22\MinGW64\dll -llibusb-1.0 -liconv CONFIG(macx):LIBS += -L/opt/local/lib -lusb-1.0 -liconv + +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} diff --git a/fcdlib/fcdlib.pro b/fcdlib/fcdlib.pro index e69ae264a..6fcbcbb66 100644 --- a/fcdlib/fcdlib.pro +++ b/fcdlib/fcdlib.pro @@ -24,3 +24,7 @@ HEADERS = $$PWD/fcdtraits.h\ CONFIG(MINGW32):LIBS += -LC:\softs\libusb-1.0.22\MinGW32\dll -llibusb-1.0 CONFIG(MINGW64):LIBS += -LC:\softs\libusb-1.0.22\MinGW64\dll -llibusb-1.0 CONFIG(MSVC):LIBS += -LC:\softs\libusb-1.0.22\MS64\dll -llibusb-1.0 + +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} diff --git a/httpserver/httpserver.pro b/httpserver/httpserver.pro index a3f82fb0b..93d108727 100644 --- a/httpserver/httpserver.pro +++ b/httpserver/httpserver.pro @@ -13,6 +13,9 @@ INCLUDEPATH += $$PWD INCLUDEPATH += ../exports QMAKE_CXXFLAGS += -std=c++11 +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} CONFIG(Release):build_subdir = release CONFIG(Debug):build_subdir = debug diff --git a/librtlsdr/librtlsdr.pro b/librtlsdr/librtlsdr.pro index 3af498a62..c9dcbc274 100644 --- a/librtlsdr/librtlsdr.pro +++ b/librtlsdr/librtlsdr.pro @@ -13,11 +13,10 @@ CONFIG(MINGW32):LIBRTLSDRSRC = "C:\softs\librtlsdr" CONFIG(MINGW64):LIBRTLSDRSRC = "C:\softs\librtlsdr" CONFIG(MSVC):LIBRTLSDRSRC = "C:\softs\librtlsdr" -INCLUDEPATH += $$LIBRTLSDRSRC/include - CONFIG(MINGW32):INCLUDEPATH += "C:\softs\libusb-1.0.22\include\libusb-1.0" CONFIG(MINGW64):INCLUDEPATH += "C:\softs\libusb-1.0.22\include\libusb-1.0" CONFIG(MSVC):INCLUDEPATH += "C:\softs\libusb-1.0.22\include\libusb-1.0" +macx:INCLUDEPATH += /opt/local/include SOURCES = $$LIBRTLSDRSRC/src/librtlsdr.c\ $$LIBRTLSDRSRC/src/tuner_e4k.c\ diff --git a/logging/logging.pro b/logging/logging.pro index f3016a033..41954d50c 100644 --- a/logging/logging.pro +++ b/logging/logging.pro @@ -14,6 +14,10 @@ INCLUDEPATH += ../exports QMAKE_CXXFLAGS += -std=c++11 +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} + CONFIG(MSVC):DEFINES += logging_EXPORTS CONFIG(Release):build_subdir = release diff --git a/mbelib/mbelib.pro b/mbelib/mbelib.pro index 57cb623f2..7498beb63 100644 --- a/mbelib/mbelib.pro +++ b/mbelib/mbelib.pro @@ -16,6 +16,10 @@ CONFIG(MINGW64):LIBMBELIBSRC = "C:\softs\mbelib" CONFIG(MSVC):LIBMBELIBSRC = "C:\softs\mbelib" CONFIG(macx):LIBMBELIBSRC = "../../deps/mbelib" +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} + INCLUDEPATH += $$LIBMBELIBSRC SOURCES = $$LIBMBELIBSRC/ambe3600x2400.c\ diff --git a/plugins/channelrx/chanalyzer/chanalyzer.pro b/plugins/channelrx/chanalyzer/chanalyzer.pro index 14377d5b9..38e1f1522 100644 --- a/plugins/channelrx/chanalyzer/chanalyzer.pro +++ b/plugins/channelrx/chanalyzer/chanalyzer.pro @@ -26,7 +26,7 @@ CONFIG(ANDROID):INCLUDEPATH += /opt/softs/boost_1_60_0 CONFIG(MINGW32):INCLUDEPATH += "C:\softs\boost_1_66_0" CONFIG(MINGW64):INCLUDEPATH += "C:\softs\boost_1_66_0" CONFIG(MSVC):INCLUDEPATH += "C:\softs\boost_1_66_0" -CONFIG(macx):INCLUDEPATH += "../../../../../boost_1_64_0" +CONFIG(macx):INCLUDEPATH += "../../../../../boost_1_69_0" CONFIG(Release):build_subdir = release CONFIG(Debug):build_subdir = debug @@ -47,4 +47,8 @@ FORMS += chanalyzergui.ui LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} + RESOURCES = ../../../sdrgui/resources/res.qrc diff --git a/plugins/channelrx/demodam/demodam.pro b/plugins/channelrx/demodam/demodam.pro index 72a77a5fb..d3f430490 100644 --- a/plugins/channelrx/demodam/demodam.pro +++ b/plugins/channelrx/demodam/demodam.pro @@ -45,4 +45,8 @@ LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui LIBS += -L../../../swagger/$${build_subdir} -lswagger +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} + RESOURCES = ../../../sdrgui/resources/res.qrc diff --git a/plugins/channelrx/demodatv/demodatv.pro b/plugins/channelrx/demodatv/demodatv.pro index aa5fce3d4..8ac0bc4ad 100644 --- a/plugins/channelrx/demodatv/demodatv.pro +++ b/plugins/channelrx/demodatv/demodatv.pro @@ -28,7 +28,7 @@ CONFIG(Debug):build_subdir = debug CONFIG(MINGW32):INCLUDEPATH += "C:\softs\boost_1_66_0" CONFIG(MINGW64):INCLUDEPATH += "C:\softs\boost_1_66_0" CONFIG(MSVC):INCLUDEPATH += "C:\softs\boost_1_66_0" -CONFIG(macx):INCLUDEPATH += "../../../../../boost_1_64_0" +CONFIG(macx):INCLUDEPATH += "../../../../../boost_1_69_0" SOURCES += atvdemod.cpp\ atvdemodgui.cpp\ @@ -43,4 +43,8 @@ FORMS += atvdemodgui.ui LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} + RESOURCES = ../../../sdrgui/resources/res.qrc diff --git a/plugins/channelrx/demodbfm/demodbfm.pro b/plugins/channelrx/demodbfm/demodbfm.pro index efb129f79..2821bf0be 100644 --- a/plugins/channelrx/demodbfm/demodbfm.pro +++ b/plugins/channelrx/demodbfm/demodbfm.pro @@ -27,7 +27,7 @@ CONFIG(ANDROID):INCLUDEPATH += /opt/softs/boost_1_60_0 CONFIG(MINGW32):INCLUDEPATH += "C:\softs\boost_1_66_0" CONFIG(MINGW64):INCLUDEPATH += "C:\softs\boost_1_66_0" CONFIG(MSVC):INCLUDEPATH += "C:\softs\boost_1_66_0" -CONFIG(macx):INCLUDEPATH += "../../../../../boost_1_64_0" +CONFIG(macx):INCLUDEPATH += "../../../../../boost_1_69_0" CONFIG(Release):build_subdir = release CONFIG(Debug):build_subdir = debug @@ -56,4 +56,8 @@ LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui LIBS += -L../../../swagger/$${build_subdir} -lswagger +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} + RESOURCES = ../../../sdrgui/resources/res.qrc diff --git a/plugins/channelrx/demoddatv/demoddatv.pro b/plugins/channelrx/demoddatv/demoddatv.pro index 46c0404d9..5eb081f31 100644 --- a/plugins/channelrx/demoddatv/demoddatv.pro +++ b/plugins/channelrx/demoddatv/demoddatv.pro @@ -27,7 +27,7 @@ CONFIG(Debug):build_subdir = debug CONFIG(MSVC):INCLUDEPATH += "C:\softs\boost_1_66_0" CONFIG(MSVC):INCLUDEPATH += "C:\softs\ffmpeg-20181127-1035206-win64-dev\include" -CONFIG(macx):INCLUDEPATH += "../../../../../boost_1_64_0" +CONFIG(macx):INCLUDEPATH += "../../../../../boost_1_69_0" SOURCES += datvdemod.cpp\ datvdemodgui.cpp\ diff --git a/plugins/channelrx/demoddsd/demoddsd.pro b/plugins/channelrx/demoddsd/demoddsd.pro index d9e085168..b78c79546 100644 --- a/plugins/channelrx/demoddsd/demoddsd.pro +++ b/plugins/channelrx/demoddsd/demoddsd.pro @@ -30,7 +30,7 @@ CONFIG(macx):LIBMBELIBSRC = "../../../../deps/mbelib" CONFIG(MINGW32):INCLUDEPATH += "C:\softs\boost_1_66_0" CONFIG(MINGW64):INCLUDEPATH += "C:\softs\boost_1_66_0" CONFIG(MSVC):INCLUDEPATH += "C:\softs\boost_1_66_0" -CONFIG(macx):INCLUDEPATH += "../../../../../boost_1_64_0" +CONFIG(macx):INCLUDEPATH += "../../../../../boost_1_69_0" INCLUDEPATH += $$PWD INCLUDEPATH += ../../../exports @@ -67,4 +67,8 @@ LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui LIBS += -L../../../swagger/$${build_subdir} -lswagger LIBS += -L../../../dsdcc/$${build_subdir} -ldsdcc +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} + RESOURCES = ../../../sdrgui/resources/res.qrc diff --git a/plugins/channelrx/demodlora/demodlora.pro b/plugins/channelrx/demodlora/demodlora.pro index 9f96323bc..94f298354 100644 --- a/plugins/channelrx/demodlora/demodlora.pro +++ b/plugins/channelrx/demodlora/demodlora.pro @@ -40,4 +40,8 @@ FORMS += lorademodgui.ui LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} + RESOURCES = ../../../sdrgui/resources/res.qrc diff --git a/plugins/channelrx/demodnfm/demodnfm.pro b/plugins/channelrx/demodnfm/demodnfm.pro index 347e194f8..8ac72fc88 100644 --- a/plugins/channelrx/demodnfm/demodnfm.pro +++ b/plugins/channelrx/demodnfm/demodnfm.pro @@ -42,4 +42,8 @@ LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui LIBS += -L../../../swagger/$${build_subdir} -lswagger +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} + RESOURCES = ../../../sdrgui/resources/res.qrc diff --git a/plugins/channelrx/demodssb/demodssb.pro b/plugins/channelrx/demodssb/demodssb.pro index 9fa689509..964e07294 100644 --- a/plugins/channelrx/demodssb/demodssb.pro +++ b/plugins/channelrx/demodssb/demodssb.pro @@ -42,4 +42,8 @@ LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui LIBS += -L../../../swagger/$${build_subdir} -lswagger +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} + RESOURCES = ../../../sdrgui/resources/res.qrc diff --git a/plugins/channelrx/demodwfm/demodwfm.pro b/plugins/channelrx/demodwfm/demodwfm.pro index ebb9c8859..cf0c4a825 100644 --- a/plugins/channelrx/demodwfm/demodwfm.pro +++ b/plugins/channelrx/demodwfm/demodwfm.pro @@ -42,4 +42,8 @@ LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui LIBS += -L../../../swagger/$${build_subdir} -lswagger +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} + RESOURCES = ../../../sdrgui/resources/res.qrc diff --git a/plugins/channelrx/udpsink/udpsink.pro b/plugins/channelrx/udpsink/udpsink.pro index 534f2f6cc..834019cd2 100644 --- a/plugins/channelrx/udpsink/udpsink.pro +++ b/plugins/channelrx/udpsink/udpsink.pro @@ -42,4 +42,8 @@ LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui LIBS += -L../../../swagger/$${build_subdir} -lswagger +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} + RESOURCES = ../../../sdrgui/resources/res.qrc diff --git a/plugins/channeltx/modam/modam.pro b/plugins/channeltx/modam/modam.pro index 3eb914740..3c359f93d 100644 --- a/plugins/channeltx/modam/modam.pro +++ b/plugins/channeltx/modam/modam.pro @@ -42,4 +42,8 @@ LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui LIBS += -L../../../swagger/$${build_subdir} -lswagger +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} + RESOURCES = ../../../sdrgui/resources/res.qrc diff --git a/plugins/channeltx/modatv/modatv.pro b/plugins/channeltx/modatv/modatv.pro index 04adb5fe7..99d76db6f 100644 --- a/plugins/channeltx/modatv/modatv.pro +++ b/plugins/channeltx/modatv/modatv.pro @@ -18,6 +18,7 @@ QMAKE_CXXFLAGS += -msse4.1 QMAKE_CXXFLAGS += -std=c++11 INCLUDEPATH += $$PWD +INCLUDEPATH += ../../../swagger/sdrangel/code/qt5/client INCLUDEPATH += ../../../exports INCLUDEPATH += ../../../sdrbase INCLUDEPATH += ../../../sdrgui @@ -43,6 +44,11 @@ FORMS += atvmodgui.ui LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui +LIBS += -L../../../swagger/$${build_subdir} -lswagger + +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} CONFIG(MINGW32):LIBS += -LD:\softs\opencv\build\mw32\install\x86\mingw\bin -llibopencv_core2413 -llibopencv_highgui2413 -llibopencv_imgproc2413 CONFIG(MINGW64):LIBS += -LD:\softs\opencv\build\mw64\install\x64\mingw\bin -llibopencv_core2413 -llibopencv_highgui2413 -llibopencv_imgproc2413 diff --git a/plugins/channeltx/modnfm/modnfm.pro b/plugins/channeltx/modnfm/modnfm.pro index ec9622875..bce3fc8a7 100644 --- a/plugins/channeltx/modnfm/modnfm.pro +++ b/plugins/channeltx/modnfm/modnfm.pro @@ -42,4 +42,8 @@ LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui LIBS += -L../../../swagger/$${build_subdir} -lswagger +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} + RESOURCES = ../../../sdrgui/resources/res.qrc diff --git a/plugins/channeltx/modssb/modssb.pro b/plugins/channeltx/modssb/modssb.pro index 460fc9dc9..ade9e97f2 100644 --- a/plugins/channeltx/modssb/modssb.pro +++ b/plugins/channeltx/modssb/modssb.pro @@ -42,4 +42,8 @@ LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui LIBS += -L../../../swagger/$${build_subdir} -lswagger +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} + RESOURCES = ../../../sdrgui/resources/res.qrc diff --git a/plugins/channeltx/modwfm/modwfm.pro b/plugins/channeltx/modwfm/modwfm.pro index 4ab4b513c..2f065c6a0 100644 --- a/plugins/channeltx/modwfm/modwfm.pro +++ b/plugins/channeltx/modwfm/modwfm.pro @@ -42,4 +42,8 @@ LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui LIBS += -L../../../swagger/$${build_subdir} -lswagger +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} + RESOURCES = ../../../sdrgui/resources/res.qrc diff --git a/plugins/channeltx/udpsource/udpsource.pro b/plugins/channeltx/udpsource/udpsource.pro index 835fb8fe8..6305a261a 100644 --- a/plugins/channeltx/udpsource/udpsource.pro +++ b/plugins/channeltx/udpsource/udpsource.pro @@ -46,4 +46,8 @@ LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui LIBS += -L../../../swagger/$${build_subdir} -lswagger +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} + RESOURCES = ../../../sdrgui/resources/res.qrc diff --git a/plugins/samplesink/filesink/filesink.pro b/plugins/samplesink/filesink/filesink.pro index 370183c48..4dd47dc3c 100644 --- a/plugins/samplesink/filesink/filesink.pro +++ b/plugins/samplesink/filesink/filesink.pro @@ -44,4 +44,8 @@ LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui LIBS += -L../../../swagger/$${build_subdir} -lswagger +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} + RESOURCES = ../../../sdrgui/resources/res.qrc diff --git a/plugins/samplesink/hackrfoutput/hackrfoutput.pro b/plugins/samplesink/hackrfoutput/hackrfoutput.pro index f8c1f1113..910fbb579 100644 --- a/plugins/samplesink/hackrfoutput/hackrfoutput.pro +++ b/plugins/samplesink/hackrfoutput/hackrfoutput.pro @@ -29,6 +29,9 @@ INCLUDEPATH += ../../../swagger/sdrangel/code/qt5/client INCLUDEPATH += ../../../devices !macx:INCLUDEPATH += $$LIBHACKRFSRC macx:INCLUDEPATH += /opt/local/include +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} CONFIG(Release):build_subdir = release CONFIG(Debug):build_subdir = debug diff --git a/plugins/samplesink/sdrdaemonsink/sdrdaemonsink.pro b/plugins/samplesink/sdrdaemonsink/sdrdaemonsink.pro index b70d7a122..edec1918d 100644 --- a/plugins/samplesink/sdrdaemonsink/sdrdaemonsink.pro +++ b/plugins/samplesink/sdrdaemonsink/sdrdaemonsink.pro @@ -38,7 +38,7 @@ CONFIG(Debug):build_subdir = debug CONFIG(MINGW32):INCLUDEPATH += "C:\softs\boost_1_66_0" CONFIG(MINGW64):INCLUDEPATH += "C:\softs\boost_1_66_0" CONFIG(MSVC):INCLUDEPATH += "C:\softs\boost_1_66_0" -CONFIG(macx):INCLUDEPATH += "../../../boost_1_64_0" +CONFIG(macx):INCLUDEPATH += "../../../boost_1_69_0" SOURCES += sdrdaemonsinkthread.cpp\ sdrdaemonsinkgui.cpp\ @@ -63,6 +63,10 @@ LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui LIBS += -L../../../swagger/$${build_subdir} -lswagger LIBS += -L../../../cm256cc/$${build_subdir} -lcm256cc +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} + RESOURCES = ../../../sdrgui/resources/res.qrc CONFIG(MINGW32):DEFINES += USE_INTERNAL_TIMER=1 diff --git a/plugins/samplesource/filesource/filesource.pro b/plugins/samplesource/filesource/filesource.pro index 7a85b75b6..af515f086 100644 --- a/plugins/samplesource/filesource/filesource.pro +++ b/plugins/samplesource/filesource/filesource.pro @@ -44,4 +44,8 @@ LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui LIBS += -L../../../swagger/$${build_subdir} -lswagger +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} + RESOURCES = ../../../sdrgui/resources/res.qrc diff --git a/plugins/samplesource/hackrfinput/hackrfinput.pro b/plugins/samplesource/hackrfinput/hackrfinput.pro index 573d81165..afb2cf9d7 100644 --- a/plugins/samplesource/hackrfinput/hackrfinput.pro +++ b/plugins/samplesource/hackrfinput/hackrfinput.pro @@ -54,4 +54,8 @@ LIBS += -L../../../swagger/$${build_subdir} -lswagger macx:LIBS += -L/opt/local/lib -lhackrf LIBS += -L../../../devices/$${build_subdir} -ldevices +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} + RESOURCES = ../../../sdrgui/resources/res.qrc diff --git a/plugins/samplesource/rtlsdr/rtlsdr.pro b/plugins/samplesource/rtlsdr/rtlsdr.pro index f88833f4a..cff062277 100644 --- a/plugins/samplesource/rtlsdr/rtlsdr.pro +++ b/plugins/samplesource/rtlsdr/rtlsdr.pro @@ -53,4 +53,8 @@ LIBS += -L../../../swagger/$${build_subdir} -lswagger !macx:LIBS += -L../../../librtlsdr/$${build_subdir} -llibrtlsdr macx:LIBS += -L/opt/local/lib -lrtlsdr +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} + RESOURCES = ../../../sdrgui/resources/res.qrc diff --git a/plugins/samplesource/sdrdaemonsource/sdrdaemonsource.pro b/plugins/samplesource/sdrdaemonsource/sdrdaemonsource.pro index 3b2d766dd..6f2a61d21 100644 --- a/plugins/samplesource/sdrdaemonsource/sdrdaemonsource.pro +++ b/plugins/samplesource/sdrdaemonsource/sdrdaemonsource.pro @@ -38,7 +38,7 @@ CONFIG(Debug):build_subdir = debug CONFIG(MINGW32):INCLUDEPATH += "C:\softs\boost_1_66_0" CONFIG(MINGW64):INCLUDEPATH += "C:\softs\boost_1_66_0" CONFIG(MSVC):INCLUDEPATH += "C:\softs\boost_1_66_0" -CONFIG(macx):INCLUDEPATH += "../../../boost_1_64_0" +CONFIG(macx):INCLUDEPATH += "../../../boost_1_69_0" SOURCES += sdrdaemonsourcebuffer.cpp\ sdrdaemonsourcegui.cpp\ @@ -64,6 +64,10 @@ LIBS += -L../../../swagger/$${build_subdir} -lswagger macx:LIBS += -L/usr/local/lib -lnanomsg LIBS += -L../../../cm256cc/$${build_subdir} -lcm256cc +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} + RESOURCES = ../../../sdrgui/resources/res.qrc CONFIG(MINGW32):DEFINES += USE_INTERNAL_TIMER=1 diff --git a/qrtplib/qrtplib.pro b/qrtplib/qrtplib.pro index adfffceca..08a1d4b6e 100644 --- a/qrtplib/qrtplib.pro +++ b/qrtplib/qrtplib.pro @@ -13,6 +13,9 @@ INCLUDEPATH += $$PWD INCLUDEPATH += ../exports QMAKE_CXXFLAGS += -std=c++11 +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} CONFIG(MSVC):DEFINES += qrtplib_EXPORTS diff --git a/sdrangel.macos.pro b/sdrangel.macos.pro index 8795a26fd..c5fac395d 100644 --- a/sdrangel.macos.pro +++ b/sdrangel.macos.pro @@ -5,7 +5,8 @@ #-------------------------------------------------------- TEMPLATE = subdirs -SUBDIRS = httpserver +SUBDIRS = qrtplib +SUBDIRS += httpserver SUBDIRS += swagger SUBDIRS += logging SUBDIRS += sdrbase @@ -20,12 +21,13 @@ SUBDIRS += cm256cc #SUBDIRS += librtlsdr SUBDIRS += plugins/samplesource/filesource SUBDIRS += plugins/samplesource/sdrdaemonsource -SUBDIRS += plugins/samplesource/rtlsdr SUBDIRS += plugins/samplesource/hackrfinput +SUBDIRS += plugins/samplesource/rtlsdr SUBDIRS += plugins/samplesink/filesink +SUBDIRS += plugins/samplesink/sdrdaemonsink SUBDIRS += plugins/samplesink/hackrfoutput SUBDIRS += plugins/channelrx/chanalyzer -SUBDIRS += plugins/channelrx/chanalyzerng +#SUBDIRS += plugins/channelrx/daemonsink SUBDIRS += plugins/channelrx/demodam SUBDIRS += plugins/channelrx/demodatv SUBDIRS += plugins/channelrx/demodbfm @@ -34,14 +36,14 @@ SUBDIRS += plugins/channelrx/demodlora SUBDIRS += plugins/channelrx/demodnfm SUBDIRS += plugins/channelrx/demodssb SUBDIRS += plugins/channelrx/demodwfm -SUBDIRS += plugins/channelrx/tcpsrc -SUBDIRS += plugins/channelrx/udpsrc +SUBDIRS += plugins/channelrx/udpsink +#SUBDIRS += plugins/channeltx/daemonsource SUBDIRS += plugins/channeltx/modam SUBDIRS += plugins/channeltx/modatv SUBDIRS += plugins/channeltx/modnfm SUBDIRS += plugins/channeltx/modssb SUBDIRS += plugins/channeltx/modwfm -SUBDIRS += plugins/channeltx/udpsink +SUBDIRS += plugins/channeltx/udpsource # Main app must be last CONFIG += ordered diff --git a/sdrbase/plugin/pluginmanager.cpp b/sdrbase/plugin/pluginmanager.cpp index 17574b33e..ce6d09e28 100644 --- a/sdrbase/plugin/pluginmanager.cpp +++ b/sdrbase/plugin/pluginmanager.cpp @@ -63,6 +63,10 @@ void PluginManager::loadPluginsPart(const QString& pluginsSubDir) { QString applicationDirPath = QCoreApplication::instance()->applicationDirPath(); QString applicationLibPath = applicationDirPath + "/../lib/" + pluginsSubDir; +#ifdef __APPLE__ + applicationLibPath.clear(); + applicationLibPath.append(applicationDirPath + "/../Frameworks/" + pluginsSubDir); +#endif QString applicationBuildPath = applicationDirPath + "/" + pluginsSubDir; qDebug() << "PluginManager::loadPlugins: " << qPrintable(applicationLibPath) << "," << qPrintable(applicationBuildPath); diff --git a/sdrbase/sdrbase.pro b/sdrbase/sdrbase.pro index eb6eed3f8..28c433bfc 100644 --- a/sdrbase/sdrbase.pro +++ b/sdrbase/sdrbase.pro @@ -42,7 +42,7 @@ CONFIG(MINGW32):INCLUDEPATH += "C:\softs\serialDV" CONFIG(MINGW64):INCLUDEPATH += "C:\softs\serialDV" CONFIG(MSVC):INCLUDEPATH += "C:\softs\serialDV" -CONFIG(macx):INCLUDEPATH += "../../../boost_1_64_0" +CONFIG(macx):INCLUDEPATH += "../../../boost_1_69_0" MINGW32 || MINGW64 || MSVC { HEADERS += \ @@ -234,6 +234,10 @@ LIBS += -L../httpserver/$${build_subdir} -lhttpserver LIBS += -L../qrtplib/$${build_subdir} -lqrtplib LIBS += -L../swagger/$${build_subdir} -lswagger +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} + RCC_BINARY_SOURCES += resources/res.qrc asset_builder.commands = $$[QT_HOST_BINS]/rcc -binary ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT} -no-compress diff --git a/sdrgui/sdrgui.pro b/sdrgui/sdrgui.pro index 2df36a04d..e863575b9 100644 --- a/sdrgui/sdrgui.pro +++ b/sdrgui/sdrgui.pro @@ -38,7 +38,7 @@ CONFIG(MINGW32):INCLUDEPATH += "C:\softs\boost_1_66_0" CONFIG(MINGW64):INCLUDEPATH += "C:\softs\boost_1_66_0" CONFIG(MSVC):INCLUDEPATH += "C:\softs\boost_1_66_0" -CONFIG(macx):INCLUDEPATH += "../../../boost_1_64_0" +CONFIG(macx):INCLUDEPATH += "../../../boost_1_69_0" SOURCES += mainwindow.cpp\ device/deviceuiset.cpp\ @@ -185,6 +185,10 @@ LIBS += -L../sdrbase/$${build_subdir} -lsdrbase LIBS += -L../logging/$${build_subdir} -llogging LIBS += -L../swagger/$${build_subdir} -lswagger +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} + RESOURCES = resources/res.qrc CONFIG(ANDROID):CONFIG += mobility diff --git a/swagger/swagger.pro b/swagger/swagger.pro index 364940d69..4759c19fc 100644 --- a/swagger/swagger.pro +++ b/swagger/swagger.pro @@ -23,6 +23,10 @@ QMAKE_CXXFLAGS += -msse4.1 QMAKE_CXXFLAGS += -std=c++11 +macx { + QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/ +} + CONFIG(MSVC):DEFINES += swagger_EXPORTS CONFIG(Release):build_subdir = release