From 6d53fbdf4f2c381500fa4e1dc04aa3a166b1988b Mon Sep 17 00:00:00 2001 From: barracuda156 Date: Thu, 10 Aug 2023 04:45:28 +0800 Subject: [PATCH 1/3] Fix broken linking and settings --- libresapi/src/libresapi.pro | 4 +- libretroshare/src/libretroshare.pro | 19 +++----- retroshare-gui/src/retroshare-gui.pro | 14 +++--- retroshare-nogui/src/retroshare-nogui.pro | 16 +++++-- retroshare.pri | 57 +++++++---------------- 5 files changed, 47 insertions(+), 63 deletions(-) diff --git libresapi/src/libresapi.pro libresapi/src/libresapi.pro index ea2daa082..06ac04930 100644 --- libresapi/src/libresapi.pro +++ libresapi/src/libresapi.pro @@ -146,8 +146,8 @@ libresapihttpserver { } else { mac { INCLUDEPATH += . $$INC_DIR - #for(lib, LIB_DIR):exists($$lib/libmicrohttpd.a){ LIBS *= $$lib/libmicrohttpd.a} - LIBS *= -lmicrohttpd + # for(lib, LIB_DIR):exists($$lib/libmicrohttpd.a){ LIBS *= $$lib/libmicrohttpd.a} + LIBS *= @PREFIX@/lib/libmicrohttpd.a } else { LIBS *= -lmicrohttpd } diff --git libretroshare/src/libretroshare.pro libretroshare/src/libretroshare.pro index c2604fa4a..3c1872dcd 100644 --- libretroshare/src/libretroshare.pro +++ libretroshare/src/libretroshare.pro @@ -306,32 +306,27 @@ mac { QMAKE_CC = $${QMAKE_CXX} OBJECTS_DIR = temp/obj MOC_DIR = temp/moc - #DEFINES = WINDOWS_SYS WIN32 STATICLIB MINGW - #DEFINES *= MINIUPNPC_VERSION=13 + # DEFINES *= MINIUPNPC_VERSION=25 CONFIG += upnp_miniupnpc - CONFIG += c++11 + CONFIG += c++11 # zeroconf disabled at the end of libretroshare.pro (but need the code) - #CONFIG += zeroconf - #CONFIG += zcnatassist + # CONFIG += zeroconf + # CONFIG += zcnatassist - # Beautiful Hack to fix 64bit file access. + # Beautiful Hack to fix 64-bit file access. QMAKE_CXXFLAGS *= -Dfseeko64=fseeko -Dftello64=ftello -Dfopen64=fopen -Dvstatfs64=vstatfs - #GPG_ERROR_DIR = ../../../../libgpg-error-1.7 - #GPGME_DIR = ../../../../gpgme-1.1.8 - for(lib, LIB_DIR):LIBS += -L"$$lib" - for(bin, BIN_DIR):LIBS += -L"$$bin" DEPENDPATH += . $$INC_DIR INCLUDEPATH += . $$INC_DIR INCLUDEPATH += ../../../. + INCLUDEPATH += @PREFIX@/include # We need a explicit path here, to force using the home version of sqlite3 that really encrypts the database. - LIBS += /usr/local/lib/libsqlcipher.a - #LIBS += -lsqlite3 + LIBS += -lsqlite3 DEFINES *= PLUGIN_DIR=\"\\\"$${PLUGIN_DIR}\\\"\" DEFINES *= DATA_DIR=\"\\\"$${DATA_DIR}\\\"\" diff --git retroshare-gui/src/retroshare-gui.pro retroshare-gui/src/retroshare-gui.pro index 7a6d8d2a9..8f25e2891 100644 --- retroshare-gui/src/retroshare-gui.pro +++ retroshare-gui/src/retroshare-gui.pro @@ -238,8 +238,8 @@ win32 { macx { # ENABLE THIS OPTION FOR Univeral Binary BUILD. - #CONFIG += ppc x86 - #QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4 + # CONFIG += ppc x86 + # QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4 QMAKE_INFO_PLIST = Info.plist mac_icon.files = $$files($$PWD/rsMacIcon.icns) mac_icon.path = Contents/Resources @@ -249,18 +249,20 @@ macx { QMAKE_BUNDLE_DATA += mac_webui CONFIG += version_detail_bash_script - LIBS += -lssl -lcrypto -lz - #LIBS += -lssl -lcrypto -lz -lgpgme -lgpg-error -lassuan - for(lib, LIB_DIR):exists($$lib/libminiupnpc.a){ LIBS += $$lib/libminiupnpc.a} + LIBS += -lssl -lcrypto -lgnutls -lz -lgpg-error -lassuan + LIBS += -lsqlite3 + LIBS += @PREFIX@/lib/libgpgme.a + # LIBS += @PREFIX@/lib/libgpg-error.a + LIBS += @PREFIX@/lib/libminiupnpc.a LIBS += -framework CoreFoundation LIBS += -framework Security LIBS += -framework Carbon for(lib, LIB_DIR):LIBS += -L"$$lib" - for(bin, BIN_DIR):LIBS += -L"$$bin" DEPENDPATH += . $$INC_DIR INCLUDEPATH += . $$INC_DIR + INCLUDEPATH += @PREFIX@/include #DEFINES *= MAC_IDLE # for idle feature CONFIG -= uitools diff --git retroshare-nogui/src/retroshare-nogui.pro retroshare-nogui/src/retroshare-nogui.pro index 1fdb27b71..e825982f6 100644 --- retroshare-nogui/src/retroshare-nogui.pro +++ retroshare-nogui/src/retroshare-nogui.pro @@ -98,15 +98,19 @@ macx { # CONFIG += ppc x86 LIBS += -Wl,-search_paths_first - LIBS += -lssl -lcrypto -lz - for(lib, LIB_DIR):exists($$lib/libminiupnpc.a){ LIBS += $$lib/libminiupnpc.a} + LIBS += -lssl -lcrypto -lgnutls -lz -lbz2 -lgpg-error + LIBS += -lsqlite3 + LIBS += @PREFIX@/lib/libgpgme.a + # LIBS += @PREFIX@/lib/libgpg-error.a + LIBS += @PREFIX@/lib/libminiupnpc.a + LIBS += @PREFIX@/lib/libmicrohttpd.a LIBS += -framework CoreFoundation LIBS += -framework Security for(lib, LIB_DIR):LIBS += -L"$$lib" - for(bin, BIN_DIR):LIBS += -L"$$bin" DEPENDPATH += . $$INC_DIR INCLUDEPATH += . $$INC_DIR + INCLUDEPATH += @PREFIX@/include QMAKE_CXXFLAGS *= -Dfseeko64=fseeko -Dftello64=ftello -Dstat64=stat -Dstatvfs64=statvfs -Dfopen64=fopen } @@ -162,6 +166,12 @@ INCLUDEPATH += . $$PWD/../../libretroshare/src PRE_TARGETDEPS *= $$OUT_PWD/../../libretroshare/src/lib/libretroshare.a LIBS *= $$OUT_PWD/../../libretroshare/src/lib/libretroshare.a +PRE_TARGETDEPS *= $$OUT_PWD/../../openpgpsdk/src/lib/libops.a +LIBS *= $$OUT_PWD/../../openpgpsdk/src/lib/libops.a + +PRE_TARGETDEPS *= $$OUT_PWD/../../libbitdht/src/lib/libbitdht.a +LIBS *= $$OUT_PWD/../../libbitdht/src/lib/libbitdht.a + # Input HEADERS += notifytxt.h SOURCES += notifytxt.cc \ diff --git retroshare.pri retroshare.pri index 446c1bd61..dae663386 100644 --- retroshare.pri +++ retroshare.pri @@ -85,7 +85,7 @@ rs_cppwarning:CONFIG -= no_rs_cppwarning # To disable GXS mail append the following assignation to qmake command line # "CONFIG+=no_rs_gxs_trans" CONFIG *= rs_gxs_trans -#no_rs_gxs_trans:CONFIG -= rs_gxs_trans ## Disabing not supported ATM +# no_rs_gxs_trans:CONFIG -= rs_gxs_trans ## Disabing not supported ATM # To enable GXS based async chat append the following assignation to qmake # command line "CONFIG+=rs_async_chat" @@ -93,12 +93,8 @@ CONFIG *= no_rs_async_chat rs_async_chat:CONFIG -= no_rs_async_chat # To select your MacOsX version append the following assignation to qmake -# command line "CONFIG+=rs_macos10.11" where 10.11 depends your version -macx:CONFIG *= rs_macos10.11 -rs_macos10.8:CONFIG -= rs_macos10.11 -rs_macos10.9:CONFIG -= rs_macos10.11 -rs_macos10.10:CONFIG -= rs_macos10.11 -rs_macos10.12:CONFIG -= rs_macos10.11 +# command line "CONFIG+=rs_macos@TARGET@" where @TARGET@ depends your version +# macx:CONFIG *= rs_macos@TARGET@ linux-* { @@ -165,45 +161,26 @@ win32 { } macx { - rs_macos10.8 { - message(***retroshare.pri: Set Target and SDK to MacOS 10.8 ) - QMAKE_MACOSX_DEPLOYMENT_TARGET=10.8 - QMAKE_MAC_SDK = macosx10.8 + rs_macos@TARGET@ { + message(***retroshare.pri: Set Target and SDK to MacOS @TARGET@ ) + QMAKE_MACOSX_DEPLOYMENT_TARGET=@TARGET@ + QMAKE_MAC_SDK = macosx@TARGET@ } - rs_macos10.9 { - message(***retroshare.pri: Set Target and SDK to MacOS 10.9 ) - QMAKE_MACOSX_DEPLOYMENT_TARGET=10.9 - QMAKE_MAC_SDK = macosx10.9 - } - - rs_macos10.10 { - message(***retroshare.pri: Set Target and SDK to MacOS 10.10 ) - QMAKE_MACOSX_DEPLOYMENT_TARGET=10.10 - QMAKE_MAC_SDK = macosx10.10 - } - - rs_macos10.11 { - message(***retroshare.pri: Set Target and SDK to MacOS 10.11 ) - QMAKE_MACOSX_DEPLOYMENT_TARGET=10.11 - QMAKE_MAC_SDK = macosx10.11 - } - - rs_macos10.12 { - message(***retroshare.pri: Set Target and SDK to MacOS 10.12 ) - QMAKE_MACOSX_DEPLOYMENT_TARGET=10.12 - QMAKE_MAC_SDK = macosx10.12 - QMAKE_CXXFLAGS += -Wno-nullability-completeness - QMAKE_CFLAGS += -Wno-nullability-completeness - } +# rs_macos10.12 { +# message(***retroshare.pri: Set Target and SDK to MacOS 10.12 ) +# QMAKE_MACOSX_DEPLOYMENT_TARGET=10.12 +# QMAKE_MAC_SDK = macosx10.12 +# QMAKE_CXXFLAGS += -Wno-nullability-completeness +# QMAKE_CFLAGS += -Wno-nullability-completeness +# } message(***retroshare.pri:MacOSX) BIN_DIR += "/usr/bin" INC_DIR += "/usr/include" - INC_DIR += "/usr/local/include" - INC_DIR += "/opt/local/include" - LIB_DIR += "/usr/local/lib" - LIB_DIR += "/opt/local/lib" + BIN_DIR += "@PREFIX@/bin" + INC_DIR += "@PREFIX@/include" + LIB_DIR += "@PREFIX@/lib" CONFIG += c++11 }