mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-24 23:19:29 -05:00
Multiple improvements to build process
Restructure and document retroshare.pri variables and helper functions Link sqlite statically like other libraries on Android qmake has multiple win32-* specs match them correctly Move a buch of generic thing to retroshare.pri instead of having them replocated accross project specific .pro Fix retroshare-gui too many symbols exported on windows liking error by adding QMAKE_LFLAGS+=-Wl,--exclude-libs,ALL Rename retroshare-gui/src/util/win32.h because the name is too prone to confusion and build conflicts libreasapi avoid usage of cretar_prl link_prl that seems unreliable on some platforms libreasapi rename LIBRESAPI_QT to more understendable LIBRESAPI_SETTINGS Use use_*.pri instead of copy pasting error prone qmake snippets around Expose bitdht option to retroshare.pri Add RS_THREAD_LIB qmake variable for better crossplatform support Move debug and profiling generic options to retroshare.pri (avoid copy/pasting) Remove Qt script module in qmake as it is not available anymore
This commit is contained in:
parent
b36cb1ef17
commit
4876a0ea3b
@ -1,7 +1,6 @@
|
|||||||
!include("retroshare.pri"): error("Could not include file retroshare.pri")
|
!include("retroshare.pri"): error("Could not include file retroshare.pri")
|
||||||
|
|
||||||
TEMPLATE = subdirs
|
TEMPLATE = subdirs
|
||||||
#CONFIG += tests
|
|
||||||
|
|
||||||
SUBDIRS += openpgpsdk
|
SUBDIRS += openpgpsdk
|
||||||
openpgpsdk.file = openpgpsdk/src/openpgpsdk.pro
|
openpgpsdk.file = openpgpsdk/src/openpgpsdk.pro
|
||||||
|
@ -248,8 +248,8 @@ build_sqlite()
|
|||||||
make -j${HOST_NUM_CPU}
|
make -j${HOST_NUM_CPU}
|
||||||
make install
|
make install
|
||||||
rm -f ${SYSROOT}/usr/lib/libsqlite3.so*
|
rm -f ${SYSROOT}/usr/lib/libsqlite3.so*
|
||||||
${CC} -shared -o libsqlite3.so -fPIC sqlite3.o -ldl
|
# ${CC} -shared -o libsqlite3.so -fPIC sqlite3.o -ldl
|
||||||
cp libsqlite3.so "${SYSROOT}/usr/lib"
|
# cp libsqlite3.so "${SYSROOT}/usr/lib"
|
||||||
cd ..
|
cd ..
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,23 +6,10 @@ CONFIG -= qt
|
|||||||
TARGET = bitdht
|
TARGET = bitdht
|
||||||
DESTDIR = lib
|
DESTDIR = lib
|
||||||
|
|
||||||
|
!include("use_libbitdht.pri"):error("Including")
|
||||||
|
|
||||||
QMAKE_CXXFLAGS *= -Wall -DBE_DEBUG
|
QMAKE_CXXFLAGS *= -Wall -DBE_DEBUG
|
||||||
|
|
||||||
profiling {
|
|
||||||
QMAKE_CXXFLAGS -= -fomit-frame-pointer
|
|
||||||
QMAKE_CXXFLAGS *= -pg -g -fno-omit-frame-pointer
|
|
||||||
}
|
|
||||||
|
|
||||||
release {
|
|
||||||
# not much here yet.
|
|
||||||
}
|
|
||||||
|
|
||||||
#CONFIG += debug
|
|
||||||
debug {
|
|
||||||
QMAKE_CXXFLAGS -= -O2 -fomit-frame-pointer
|
|
||||||
QMAKE_CXXFLAGS *= -g -fno-omit-frame-pointer
|
|
||||||
}
|
|
||||||
|
|
||||||
# treat warnings as error for better removing
|
# treat warnings as error for better removing
|
||||||
#QMAKE_CFLAGS += -Werror
|
#QMAKE_CFLAGS += -Werror
|
||||||
#QMAKE_CXXFLAGS += -Werror
|
#QMAKE_CXXFLAGS += -Werror
|
||||||
|
5
libbitdht/src/use_libbitdht.pri
Normal file
5
libbitdht/src/use_libbitdht.pri
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
DEPENDPATH *= $$system_path($$clean_path($${PWD}/../../libbitdht/src))
|
||||||
|
INCLUDEPATH *= $$system_path($$clean_path($${PWD}/../../libbitdht/src))
|
||||||
|
LIBS *= -L$$system_path($$clean_path($${OUT_PWD}/../../libbitdht/src/lib/)) -lbitdht
|
||||||
|
|
||||||
|
!equals(TARGET, bitdht):PRE_TARGETDEPS *= $$system_path($$clean_path($${OUT_PWD}/../../libbitdht/src/lib/libbitdht.a))
|
@ -17,7 +17,7 @@
|
|||||||
#include "ChannelsHandler.h"
|
#include "ChannelsHandler.h"
|
||||||
#include "StatsHandler.h"
|
#include "StatsHandler.h"
|
||||||
|
|
||||||
#ifdef LIBRESAPI_QT
|
#ifdef LIBRESAPI_SETTINGS
|
||||||
#include "SettingsHandler.h"
|
#include "SettingsHandler.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -242,7 +242,7 @@ public:
|
|||||||
mApiPluginHandler(sts, ifaces),
|
mApiPluginHandler(sts, ifaces),
|
||||||
mChannelsHandler(ifaces.mGxsChannels),
|
mChannelsHandler(ifaces.mGxsChannels),
|
||||||
mStatsHandler()
|
mStatsHandler()
|
||||||
#ifdef LIBRESAPI_QT
|
#ifdef LIBRESAPI_SETTINGS
|
||||||
,mSettingsHandler(sts)
|
,mSettingsHandler(sts)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
@ -272,7 +272,7 @@ public:
|
|||||||
&ChannelsHandler::handleRequest);
|
&ChannelsHandler::handleRequest);
|
||||||
router.addResourceHandler("stats", dynamic_cast<ResourceRouter*>(&mStatsHandler),
|
router.addResourceHandler("stats", dynamic_cast<ResourceRouter*>(&mStatsHandler),
|
||||||
&StatsHandler::handleRequest);
|
&StatsHandler::handleRequest);
|
||||||
#ifdef LIBRESAPI_QT
|
#ifdef LIBRESAPI_SETTINGS
|
||||||
router.addResourceHandler("settings", dynamic_cast<ResourceRouter*>(&mSettingsHandler),
|
router.addResourceHandler("settings", dynamic_cast<ResourceRouter*>(&mSettingsHandler),
|
||||||
&SettingsHandler::handleRequest);
|
&SettingsHandler::handleRequest);
|
||||||
#endif
|
#endif
|
||||||
@ -290,7 +290,7 @@ public:
|
|||||||
ChannelsHandler mChannelsHandler;
|
ChannelsHandler mChannelsHandler;
|
||||||
StatsHandler mStatsHandler;
|
StatsHandler mStatsHandler;
|
||||||
|
|
||||||
#ifdef LIBRESAPI_QT
|
#ifdef LIBRESAPI_SETTINGS
|
||||||
SettingsHandler mSettingsHandler;
|
SettingsHandler mSettingsHandler;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
@ -2,50 +2,29 @@
|
|||||||
|
|
||||||
TEMPLATE = lib
|
TEMPLATE = lib
|
||||||
CONFIG += staticlib
|
CONFIG += staticlib
|
||||||
CONFIG += create_prl
|
|
||||||
CONFIG -= qt
|
CONFIG -= qt
|
||||||
TARGET = resapi
|
TARGET = resapi
|
||||||
TARGET_PRL = libresapi
|
TARGET_PRL = libresapi
|
||||||
DESTDIR = lib
|
DESTDIR = lib
|
||||||
|
|
||||||
DEPENDPATH += ../../libretroshare/src/
|
!include(use_libresapi.pri):error("Including")
|
||||||
INCLUDEPATH += ../../libretroshare/src
|
|
||||||
|
|
||||||
|
libresapilocalserver {
|
||||||
|
CONFIG *= qt
|
||||||
|
QT *= network
|
||||||
|
SOURCES *= api/ApiServerLocal.cpp
|
||||||
|
HEADERS *= api/ApiServerLocal.h
|
||||||
|
}
|
||||||
|
|
||||||
retroshare_android_service {
|
libresapi_settings {
|
||||||
win32 {
|
CONFIG *= qt
|
||||||
OBJECTS_DIR = temp/obj
|
QT *= core
|
||||||
|
|
||||||
LIBS_DIR = $$PWD/../../libs/lib
|
SOURCES += api/SettingsHandler.cpp
|
||||||
LIBS += $$OUT_PWD/../../libretroshare/src/lib/libretroshare.a
|
HEADERS += api/SettingsHandler.h
|
||||||
LIBS += $$OUT_PWD/../../openpgpsdk/src/lib/libops.a
|
|
||||||
|
|
||||||
for(lib, LIB_DIR):LIBS += -L"$$lib"
|
|
||||||
for(bin, BIN_DIR):LIBS += -L"$$bin"
|
|
||||||
|
|
||||||
|
|
||||||
LIBS += -lssl -lcrypto -lpthread -lminiupnpc -lz -lws2_32
|
|
||||||
LIBS += -luuid -lole32 -liphlpapi -lcrypt32 -lgdi32
|
|
||||||
LIBS += -lwinmm
|
|
||||||
|
|
||||||
DEFINES *= WINDOWS_SYS WIN32_LEAN_AND_MEAN _USE_32BIT_TIME_T
|
|
||||||
|
|
||||||
DEPENDPATH += . $$INC_DIR
|
|
||||||
INCLUDEPATH += . $$INC_DIR
|
|
||||||
|
|
||||||
greaterThan(QT_MAJOR_VERSION, 4) {
|
|
||||||
# Qt 5
|
|
||||||
RC_INCLUDEPATH += $$_PRO_FILE_PWD_/../../libretroshare/src
|
|
||||||
} else {
|
|
||||||
# Qt 4
|
|
||||||
QMAKE_RC += --include-dir=$$_PRO_FILE_PWD_/../../libretroshare/src
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
libresapihttpserver {
|
libresapihttpserver {
|
||||||
CONFIG += libmicrohttpd
|
|
||||||
|
|
||||||
unix {
|
unix {
|
||||||
|
|
||||||
webui_files.path = "$${DATA_DIR}/webui"
|
webui_files.path = "$${DATA_DIR}/webui"
|
||||||
@ -211,18 +190,3 @@ HEADERS += \
|
|||||||
api/ChannelsHandler.h \
|
api/ChannelsHandler.h \
|
||||||
api/StatsHandler.h \
|
api/StatsHandler.h \
|
||||||
api/FileSharingHandler.h
|
api/FileSharingHandler.h
|
||||||
|
|
||||||
libresapilocalserver {
|
|
||||||
CONFIG *= qt
|
|
||||||
QT *= network
|
|
||||||
SOURCES *= api/ApiServerLocal.cpp
|
|
||||||
HEADERS *= api/ApiServerLocal.h
|
|
||||||
}
|
|
||||||
|
|
||||||
qt_dependencies {
|
|
||||||
CONFIG *= qt
|
|
||||||
QT *= core
|
|
||||||
|
|
||||||
SOURCES += api/SettingsHandler.cpp
|
|
||||||
HEADERS += api/SettingsHandler.h
|
|
||||||
}
|
|
||||||
|
27
libresapi/src/use_libresapi.pri
Normal file
27
libresapi/src/use_libresapi.pri
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
DEPENDPATH *= $$system_path($$clean_path($$PWD/../../libresapi/src))
|
||||||
|
INCLUDEPATH *= $$system_path($$clean_path($${PWD}/../../libresapi/src))
|
||||||
|
LIBS *= -L$$system_path($$clean_path($${OUT_PWD}/../../libresapi/src/lib/)) -lresapi
|
||||||
|
|
||||||
|
!equals(TARGET, resapi):PRE_TARGETDEPS *= $$system_path($$clean_path($${OUT_PWD}/../../libresapi/src/lib/libresapi.a))
|
||||||
|
|
||||||
|
!include("../../libretroshare/src/use_libretroshare.pri"):error("Including")
|
||||||
|
|
||||||
|
sLibs =
|
||||||
|
mLibs =
|
||||||
|
dLibs =
|
||||||
|
|
||||||
|
libresapihttpserver {
|
||||||
|
mLibs *= microhttpd
|
||||||
|
}
|
||||||
|
|
||||||
|
static {
|
||||||
|
sLibs *= $$mLibs
|
||||||
|
} else {
|
||||||
|
dLibs *= $$mLibs
|
||||||
|
}
|
||||||
|
|
||||||
|
LIBS += $$linkStaticLibs(sLibs)
|
||||||
|
PRE_TARGETDEPS += $$pretargetStaticLibs(sLibs)
|
||||||
|
|
||||||
|
LIBS += $$linkDynamicLibs(dLibs)
|
||||||
|
|
@ -2,30 +2,17 @@
|
|||||||
|
|
||||||
TEMPLATE = lib
|
TEMPLATE = lib
|
||||||
CONFIG += staticlib
|
CONFIG += staticlib
|
||||||
CONFIG += create_prl
|
|
||||||
CONFIG -= qt
|
CONFIG -= qt
|
||||||
TARGET = retroshare
|
TARGET = retroshare
|
||||||
TARGET_PRL = libretroshare
|
TARGET_PRL = libretroshare
|
||||||
DESTDIR = lib
|
DESTDIR = lib
|
||||||
|
|
||||||
#CONFIG += dsdv
|
!include("use_libretroshare.pri"):error("Including")
|
||||||
|
|
||||||
retrotor {
|
|
||||||
DEFINES *= RETROTOR
|
|
||||||
CONFIG -= bitdht
|
|
||||||
} else {
|
|
||||||
CONFIG += bitdht
|
|
||||||
}
|
|
||||||
|
|
||||||
# the dht stunner is used to obtain RS external ip addr. when it is natted
|
# the dht stunner is used to obtain RS external ip addr. when it is natted
|
||||||
# this system is unreliable and rs supports a newer and better one (asking connected peers)
|
# this system is unreliable and rs supports a newer and better one (asking connected peers)
|
||||||
# CONFIG += useDhtStunner
|
# CONFIG += useDhtStunner
|
||||||
|
|
||||||
profiling {
|
|
||||||
QMAKE_CXXFLAGS -= -fomit-frame-pointer
|
|
||||||
QMAKE_CXXFLAGS *= -pg -g -fno-omit-frame-pointer
|
|
||||||
}
|
|
||||||
|
|
||||||
# treat warnings as error for better removing
|
# treat warnings as error for better removing
|
||||||
#QMAKE_CFLAGS += -Werror
|
#QMAKE_CFLAGS += -Werror
|
||||||
#QMAKE_CXXFLAGS += -Werror
|
#QMAKE_CXXFLAGS += -Werror
|
||||||
@ -203,21 +190,11 @@ linux-* {
|
|||||||
|
|
||||||
PKGCONFIG *= libssl libupnp
|
PKGCONFIG *= libssl libupnp
|
||||||
PKGCONFIG *= libcrypto zlib
|
PKGCONFIG *= libcrypto zlib
|
||||||
LIBS *= -lpthread -ldl
|
no_sqlcipher:PKGCONFIG *= sqlite3
|
||||||
}
|
LIBS *= -ldl
|
||||||
|
|
||||||
linux-* {
|
|
||||||
DEFINES *= PLUGIN_DIR=\"\\\"$${PLUGIN_DIR}\\\"\"
|
DEFINES *= PLUGIN_DIR=\"\\\"$${PLUGIN_DIR}\\\"\"
|
||||||
DEFINES *= DATA_DIR=\"\\\"$${DATA_DIR}\\\"\"
|
DEFINES *= DATA_DIR=\"\\\"$${DATA_DIR}\\\"\"
|
||||||
|
|
||||||
## where to put the librarys interface
|
|
||||||
#include_rsiface.path = "$${INC_DIR}"
|
|
||||||
#include_rsiface.files = $$PUBLIC_HEADERS
|
|
||||||
#INSTALLS += include_rsiface
|
|
||||||
|
|
||||||
## where to put the shared library itself
|
|
||||||
#target.path = "$$LIB_DIR"
|
|
||||||
#INSTALLS *= target
|
|
||||||
}
|
}
|
||||||
|
|
||||||
linux-g++ {
|
linux-g++ {
|
||||||
@ -234,7 +211,7 @@ version_detail_bash_script {
|
|||||||
PRE_TARGETDEPS = write_version_detail
|
PRE_TARGETDEPS = write_version_detail
|
||||||
write_version_detail.commands = $$PWD/version_detail.sh
|
write_version_detail.commands = $$PWD/version_detail.sh
|
||||||
}
|
}
|
||||||
win32 {
|
win32-* {
|
||||||
QMAKE_EXTRA_TARGETS += write_version_detail
|
QMAKE_EXTRA_TARGETS += write_version_detail
|
||||||
PRE_TARGETDEPS = write_version_detail
|
PRE_TARGETDEPS = write_version_detail
|
||||||
write_version_detail.commands = $$PWD/version_detail.bat
|
write_version_detail.commands = $$PWD/version_detail.bat
|
||||||
@ -263,13 +240,11 @@ win32-x-g++ {
|
|||||||
}
|
}
|
||||||
################################# Windows ##########################################
|
################################# Windows ##########################################
|
||||||
|
|
||||||
win32 {
|
win32-g++ {
|
||||||
QMAKE_CC = $${QMAKE_CXX}
|
QMAKE_CC = $${QMAKE_CXX}
|
||||||
OBJECTS_DIR = temp/obj
|
OBJECTS_DIR = temp/obj
|
||||||
MOC_DIR = temp/moc
|
MOC_DIR = temp/moc
|
||||||
DEFINES *= WINDOWS_SYS WIN32 STATICLIB MINGW WIN32_LEAN_AND_MEAN _USE_32BIT_TIME_T
|
DEFINES *= STATICLIB
|
||||||
# This defines the platform to be WinXP or later and is needed for getaddrinfo (_WIN32_WINNT_WINXP)
|
|
||||||
DEFINES *= WINVER=0x0501
|
|
||||||
|
|
||||||
# Switch on extra warnings
|
# Switch on extra warnings
|
||||||
QMAKE_CFLAGS += -Wextra
|
QMAKE_CFLAGS += -Wextra
|
||||||
@ -289,15 +264,8 @@ win32 {
|
|||||||
|
|
||||||
CONFIG += upnp_miniupnpc
|
CONFIG += upnp_miniupnpc
|
||||||
|
|
||||||
no_sqlcipher {
|
wLibs = ws2_32 gdi32 uuid iphlpapi crypt32 ole32 winmm
|
||||||
PKGCONFIG *= sqlite3
|
LIBS += $$linkDynamicLibs(wLibs)
|
||||||
LIBS += -lsqlite3
|
|
||||||
} else {
|
|
||||||
LIBS += -lsqlcipher
|
|
||||||
}
|
|
||||||
|
|
||||||
DEPENDPATH += . $$INC_DIR
|
|
||||||
INCLUDEPATH += . $$INC_DIR
|
|
||||||
}
|
}
|
||||||
|
|
||||||
################################# MacOSX ##########################################
|
################################# MacOSX ##########################################
|
||||||
@ -697,13 +665,16 @@ SOURCES += util/folderiterator.cc \
|
|||||||
util/rsrecogn.cc \
|
util/rsrecogn.cc \
|
||||||
util/rstime.cc
|
util/rstime.cc
|
||||||
|
|
||||||
|
## Added for retrocompatibility remove ASAP
|
||||||
upnp_miniupnpc {
|
isEmpty(RS_UPNP_LIB) {
|
||||||
HEADERS += upnp/upnputil.h upnp/upnphandler_miniupnp.h
|
upnp_miniupnpc:RS_UPNP_LIB=miniupnpc
|
||||||
SOURCES += upnp/upnputil.c upnp/upnphandler_miniupnp.cc
|
upnp_libupnp:RS_UPNP_LIB="upnp ixml threadutil"
|
||||||
}
|
}
|
||||||
|
|
||||||
upnp_libupnp {
|
equals(RS_UPNP_LIB, miniupnpc) {
|
||||||
|
HEADERS += upnp/upnputil.h upnp/upnphandler_miniupnp.h
|
||||||
|
SOURCES += upnp/upnputil.c upnp/upnphandler_miniupnp.cc
|
||||||
|
} else {
|
||||||
HEADERS += upnp/UPnPBase.h upnp/upnphandler_linux.h
|
HEADERS += upnp/UPnPBase.h upnp/upnphandler_linux.h
|
||||||
SOURCES += upnp/UPnPBase.cpp upnp/upnphandler_linux.cc
|
SOURCES += upnp/UPnPBase.cpp upnp/upnphandler_linux.cc
|
||||||
DEFINES *= RS_USE_LIBUPNP
|
DEFINES *= RS_USE_LIBUPNP
|
||||||
@ -934,19 +905,13 @@ android-* {
|
|||||||
DEFINES *= "fopen64=fopen"
|
DEFINES *= "fopen64=fopen"
|
||||||
DEFINES *= "fseeko64=fseeko"
|
DEFINES *= "fseeko64=fseeko"
|
||||||
DEFINES *= "ftello64=ftello"
|
DEFINES *= "ftello64=ftello"
|
||||||
LIBS *= -lbz2 -lupnp -lixml -lthreadutil -lsqlite3
|
|
||||||
|
|
||||||
## Static library are verysensible to order in command line, has to be in the
|
## Static library are very susceptible to order in command line
|
||||||
## end of file for this reason
|
sLibs = bz2 $$RS_UPNP_LIB $$RS_SQL_LIB ssl crypto
|
||||||
|
|
||||||
LIBS += -L$$NATIVE_LIBS_TOOLCHAIN_PATH/sysroot/usr/lib/ -lsqlcipher
|
LIBS += $$linkStaticLibs(sLibs)
|
||||||
PRE_TARGETDEPS += $$NATIVE_LIBS_TOOLCHAIN_PATH/sysroot/usr/lib/libsqlcipher.a
|
PRE_TARGETDEPS += $$pretargetStaticLibs(sLibs)
|
||||||
|
|
||||||
LIBS += -L$$NATIVE_LIBS_TOOLCHAIN_PATH/sysroot/usr/lib/ -lssl
|
|
||||||
PRE_TARGETDEPS += $$NATIVE_LIBS_TOOLCHAIN_PATH/sysroot/usr/lib/libssl.a
|
|
||||||
|
|
||||||
LIBS += -L$$NATIVE_LIBS_TOOLCHAIN_PATH/sysroot/usr/lib/ -lcrypto
|
|
||||||
PRE_TARGETDEPS += $$NATIVE_LIBS_TOOLCHAIN_PATH/sysroot/usr/lib/libcrypto.a
|
|
||||||
|
|
||||||
HEADERS += util/androiddebug.h
|
HEADERS += util/androiddebug.h
|
||||||
}
|
}
|
||||||
|
|
||||||
|
33
libretroshare/src/use_libretroshare.pri
Normal file
33
libretroshare/src/use_libretroshare.pri
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
DEPENDPATH *= $$system_path($$clean_path($${PWD}/../../libretroshare/src/))
|
||||||
|
INCLUDEPATH *= $$system_path($$clean_path($${PWD}/../../libretroshare/src))
|
||||||
|
LIBS *= -L$$system_path($$clean_path($${OUT_PWD}/../../libretroshare/src/lib/)) -lretroshare
|
||||||
|
|
||||||
|
equals(TARGET, retroshare):equals(TEMPLATE, lib){
|
||||||
|
} else {
|
||||||
|
PRE_TARGETDEPS *= $$system_path($$clean_path($$OUT_PWD/../../libretroshare/src/lib/libretroshare.a))
|
||||||
|
}
|
||||||
|
|
||||||
|
!include("../../openpgpsdk/src/use_openpgpsdk.pri"):error("Including")
|
||||||
|
|
||||||
|
bitdht {
|
||||||
|
!include("../../libbitdht/src/use_libbitdht.pri"):error("Including")
|
||||||
|
}
|
||||||
|
|
||||||
|
sLibs =
|
||||||
|
mLibs = $$RS_SQL_LIB ssl crypto $$RS_THREAD_LIB $$RS_UPNP_LIB
|
||||||
|
dLibs =
|
||||||
|
|
||||||
|
linux-* {
|
||||||
|
mLibs += dl
|
||||||
|
}
|
||||||
|
|
||||||
|
static {
|
||||||
|
sLibs *= $$mLibs
|
||||||
|
} else {
|
||||||
|
dLibs *= $$mLibs
|
||||||
|
}
|
||||||
|
|
||||||
|
LIBS += $$linkStaticLibs(sLibs)
|
||||||
|
PRE_TARGETDEPS += $$pretargetStaticLibs(sLibs)
|
||||||
|
|
||||||
|
LIBS += $$linkDynamicLibs(dLibs)
|
@ -9,8 +9,8 @@ QMAKE_CXXFLAGS *= -Wall -Werror -W
|
|||||||
|
|
||||||
TARGET = ops
|
TARGET = ops
|
||||||
DESTDIR = lib
|
DESTDIR = lib
|
||||||
DEPENDPATH += . $$INC_DIR
|
|
||||||
INCLUDEPATH += . $$INC_DIR
|
!include(use_openpgpsdk.pri):error("Including")
|
||||||
|
|
||||||
#################################### Windows #####################################
|
#################################### Windows #####################################
|
||||||
|
|
||||||
@ -18,7 +18,11 @@ linux-* {
|
|||||||
OBJECTS_DIR = temp/linux/obj
|
OBJECTS_DIR = temp/linux/obj
|
||||||
}
|
}
|
||||||
|
|
||||||
win32 {
|
win32-g++ {
|
||||||
|
|
||||||
|
HEADERS += openpgpsdk/opsstring.h
|
||||||
|
SOURCES += openpgpsdk/opsstring.c
|
||||||
|
|
||||||
DEFINES *= WIN32_LEAN_AND_MEAN _USE_32BIT_TIME_T
|
DEFINES *= WIN32_LEAN_AND_MEAN _USE_32BIT_TIME_T
|
||||||
|
|
||||||
# Switch off optimization for release version
|
# Switch off optimization for release version
|
||||||
@ -27,9 +31,13 @@ win32 {
|
|||||||
QMAKE_CFLAGS_RELEASE -= -O2
|
QMAKE_CFLAGS_RELEASE -= -O2
|
||||||
QMAKE_CFLAGS_RELEASE += -O0
|
QMAKE_CFLAGS_RELEASE += -O0
|
||||||
|
|
||||||
# Switch on optimization for debug version
|
mLibs = bz2 z ssl crypto
|
||||||
#QMAKE_CXXFLAGS_DEBUG += -O2
|
static {
|
||||||
#QMAKE_CFLAGS_DEBUG += -O2
|
LIBS += $$linkStaticLibs(mLibs)
|
||||||
|
PRE_TARGETDEPS += $$pretargetStaticLibs(mLibs)
|
||||||
|
} else {
|
||||||
|
LIBS += $$linkDynamicLibs(mLibs)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -74,9 +82,6 @@ HEADERS += openpgpsdk/writer.h \
|
|||||||
openpgpsdk/parse_local.h \
|
openpgpsdk/parse_local.h \
|
||||||
openpgpsdk/keyring_local.h \
|
openpgpsdk/keyring_local.h \
|
||||||
openpgpsdk/opsdir.h
|
openpgpsdk/opsdir.h
|
||||||
win32{
|
|
||||||
HEADERS += openpgpsdk/opsstring.h
|
|
||||||
}
|
|
||||||
|
|
||||||
SOURCES += openpgpsdk/accumulate.c \
|
SOURCES += openpgpsdk/accumulate.c \
|
||||||
openpgpsdk/compress.c \
|
openpgpsdk/compress.c \
|
||||||
@ -116,9 +121,7 @@ SOURCES += openpgpsdk/accumulate.c \
|
|||||||
openpgpsdk/writer_skey_checksum.c \
|
openpgpsdk/writer_skey_checksum.c \
|
||||||
openpgpsdk/writer_stream_encrypt_se_ip.c \
|
openpgpsdk/writer_stream_encrypt_se_ip.c \
|
||||||
openpgpsdk/opsdir.c
|
openpgpsdk/opsdir.c
|
||||||
win32{
|
|
||||||
SOURCES += openpgpsdk/opsstring.c
|
|
||||||
}
|
|
||||||
|
|
||||||
################################# Android #####################################
|
################################# Android #####################################
|
||||||
|
|
||||||
|
20
openpgpsdk/src/use_openpgpsdk.pri
Normal file
20
openpgpsdk/src/use_openpgpsdk.pri
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
DEPENDPATH *= $$system_path($$clean_path($${PWD}/../../openpgpsdk/src))
|
||||||
|
INCLUDEPATH *= $$system_path($$clean_path($${PWD}/../../openpgpsdk/src))
|
||||||
|
LIBS *= -L$$system_path($$clean_path($${OUT_PWD}/../../openpgpsdk/src/lib/)) -lops
|
||||||
|
|
||||||
|
!equals(TARGET, ops):PRE_TARGETDEPS *= $$system_path($$clean_path($${OUT_PWD}/../../openpgpsdk/src/lib/libops.a))
|
||||||
|
|
||||||
|
sLibs =
|
||||||
|
mLibs = ssl crypto z bz2
|
||||||
|
dLibs =
|
||||||
|
|
||||||
|
static {
|
||||||
|
sLibs *= $$mLibs
|
||||||
|
} else {
|
||||||
|
dLibs *= $$mLibs
|
||||||
|
}
|
||||||
|
|
||||||
|
LIBS += $$linkStaticLibs(sLibs)
|
||||||
|
PRE_TARGETDEPS += $$pretargetStaticLibs(sLibs)
|
||||||
|
|
||||||
|
LIBS += $$linkDynamicLibs(dLibs)
|
@ -11,43 +11,8 @@ android-*:CONFIG += dll
|
|||||||
android-*:TEMPLATE = lib
|
android-*:TEMPLATE = lib
|
||||||
!android-*:TEMPLATE = app
|
!android-*:TEMPLATE = app
|
||||||
|
|
||||||
DEPENDPATH *= ../../libresapi/src
|
!include("../../libresapi/src/use_libresapi.pri"):error("Including")
|
||||||
INCLUDEPATH *= ../../libresapi/src
|
|
||||||
PRE_TARGETDEPS *= ../../libresapi/src/lib/libresapi.a
|
|
||||||
LIBS *= ../../libresapi/src/lib/libresapi.a
|
|
||||||
|
|
||||||
DEPENDPATH *= ../../libretroshare/src
|
!include("../../libretroshare/src/use_libretroshare.pri"):error("Including")
|
||||||
INCLUDEPATH *= ../../libretroshare/src
|
|
||||||
PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a
|
|
||||||
LIBS *= ../../libretroshare/src/lib/libretroshare.a
|
|
||||||
|
|
||||||
win32 {
|
|
||||||
OBJECTS_DIR = temp/obj
|
|
||||||
|
|
||||||
LIBS_DIR = $$PWD/../../libs/lib
|
|
||||||
LIBS += $$OUT_PWD/../../libretroshare/src/lib/libretroshare.a
|
|
||||||
LIBS += $$OUT_PWD/../../openpgpsdk/src/lib/libops.a
|
|
||||||
|
|
||||||
for(lib, LIB_DIR):LIBS += -L"$$lib"
|
|
||||||
for(bin, BIN_DIR):LIBS += -L"$$bin"
|
|
||||||
|
|
||||||
|
|
||||||
LIBS += -lssl -lcrypto -lpthread -lminiupnpc -lz -lws2_32
|
|
||||||
LIBS += -luuid -lole32 -liphlpapi -lcrypt32 -lgdi32
|
|
||||||
LIBS += -lwinmm
|
|
||||||
|
|
||||||
DEFINES *= WINDOWS_SYS WIN32_LEAN_AND_MEAN _USE_32BIT_TIME_T
|
|
||||||
|
|
||||||
DEPENDPATH += . $$INC_DIR
|
|
||||||
INCLUDEPATH += . $$INC_DIR
|
|
||||||
|
|
||||||
greaterThan(QT_MAJOR_VERSION, 4) {
|
|
||||||
# Qt 5
|
|
||||||
RC_INCLUDEPATH += $$_PRO_FILE_PWD_/../../libretroshare/src
|
|
||||||
} else {
|
|
||||||
# Qt 4
|
|
||||||
QMAKE_RC += --include-dir=$$_PRO_FILE_PWD_/../../libretroshare/src
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SOURCES += service.cpp
|
SOURCES += service.cpp
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
#include <retroshare/rspeers.h>
|
#include <retroshare/rspeers.h>
|
||||||
|
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
#include <util/win32.h>
|
#include <util/retroshareWin32.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Retroshare's Settings */
|
/* Retroshare's Settings */
|
||||||
|
@ -2,28 +2,24 @@
|
|||||||
|
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
QT += network xml
|
QT += network xml
|
||||||
CONFIG += qt gui uic qrc resources idle bitdht
|
CONFIG += qt gui uic qrc resources idle
|
||||||
CONFIG += link_prl
|
|
||||||
CONFIG += console
|
CONFIG += console
|
||||||
TARGET = retroshare
|
TARGET = retroshare
|
||||||
DEFINES += TARGET=\\\"$${TARGET}\\\"
|
DEFINES += TARGET=\\\"$${TARGET}\\\"
|
||||||
|
|
||||||
# Plz never commit the .pro with these flags enabled.
|
DEPENDPATH *= $${PWD} $${RS_INCLUDE_DIR} retroshare-gui
|
||||||
# Use this flag when developping new features only.
|
INCLUDEPATH *= $${PWD} $${RS_INCLUDE_DIR} retroshare-gui
|
||||||
#
|
|
||||||
#CONFIG += unfinished
|
|
||||||
#CONFIG += debug
|
|
||||||
#DEFINES *= SIGFPE_DEBUG
|
|
||||||
|
|
||||||
profiling {
|
libresapihttpserver {
|
||||||
QMAKE_CXXFLAGS -= -fomit-frame-pointer
|
!include("../../libresapi/src/use_libresapi.pri"):error("Including")
|
||||||
QMAKE_CXXFLAGS *= -pg -g -fno-omit-frame-pointer
|
HEADERS *= gui/settings/WebuiPage.h
|
||||||
QMAKE_LFLAGS *= -pg
|
SOURCES *= gui/settings/WebuiPage.cpp
|
||||||
|
FORMS *= gui/settings/WebuiPage.ui
|
||||||
}
|
}
|
||||||
|
|
||||||
retrotor {
|
!include("../../libretroshare/src/use_libretroshare.pri"):error("Including")
|
||||||
DEFINES *= RETROTOR
|
|
||||||
|
|
||||||
|
retrotor {
|
||||||
FORMS += TorControl/TorControlWindow.ui
|
FORMS += TorControl/TorControlWindow.ui
|
||||||
SOURCES += TorControl/TorControlWindow.cpp
|
SOURCES += TorControl/TorControlWindow.cpp
|
||||||
HEADERS += TorControl/TorControlWindow.h
|
HEADERS += TorControl/TorControlWindow.h
|
||||||
@ -59,22 +55,6 @@ RCC_DIR = temp/qrc
|
|||||||
UI_DIR = temp/ui
|
UI_DIR = temp/ui
|
||||||
MOC_DIR = temp/moc
|
MOC_DIR = temp/moc
|
||||||
|
|
||||||
#CONFIG += debug
|
|
||||||
debug {
|
|
||||||
QMAKE_CFLAGS += -g
|
|
||||||
QMAKE_CXXFLAGS -= -O2
|
|
||||||
QMAKE_CXXFLAGS += -O0
|
|
||||||
QMAKE_CFLAGS -= -O2
|
|
||||||
QMAKE_CFLAGS += -O0
|
|
||||||
}
|
|
||||||
|
|
||||||
DEPENDPATH *= retroshare-gui
|
|
||||||
INCLUDEPATH *= retroshare-gui
|
|
||||||
|
|
||||||
# treat warnings as error for better removing
|
|
||||||
#QMAKE_CFLAGS += -Werror
|
|
||||||
#QMAKE_CXXFLAGS += -Werror
|
|
||||||
|
|
||||||
################################# Linux ##########################################
|
################################# Linux ##########################################
|
||||||
# Put lib dir in QMAKE_LFLAGS so it appears before -L/usr/lib
|
# Put lib dir in QMAKE_LFLAGS so it appears before -L/usr/lib
|
||||||
linux-* {
|
linux-* {
|
||||||
@ -133,7 +113,7 @@ version_detail_bash_script {
|
|||||||
PRE_TARGETDEPS = write_version_detail
|
PRE_TARGETDEPS = write_version_detail
|
||||||
write_version_detail.commands = $$PWD/version_detail.sh
|
write_version_detail.commands = $$PWD/version_detail.sh
|
||||||
}
|
}
|
||||||
win32 {
|
win32-* {
|
||||||
QMAKE_EXTRA_TARGETS += write_version_detail
|
QMAKE_EXTRA_TARGETS += write_version_detail
|
||||||
PRE_TARGETDEPS = write_version_detail
|
PRE_TARGETDEPS = write_version_detail
|
||||||
write_version_detail.commands = $$PWD/version_detail.bat
|
write_version_detail.commands = $$PWD/version_detail.bat
|
||||||
@ -165,7 +145,7 @@ win32-x-g++ {
|
|||||||
|
|
||||||
#################################### Windows #####################################
|
#################################### Windows #####################################
|
||||||
|
|
||||||
win32 {
|
win32-g++ {
|
||||||
CONFIG(debug, debug|release) {
|
CONFIG(debug, debug|release) {
|
||||||
# show console output
|
# show console output
|
||||||
CONFIG += console
|
CONFIG += console
|
||||||
@ -185,8 +165,9 @@ win32 {
|
|||||||
QMAKE_LFLAGS += -Wl,-nxcompat
|
QMAKE_LFLAGS += -Wl,-nxcompat
|
||||||
}
|
}
|
||||||
|
|
||||||
# solve linker warnings because of the order of the libraries
|
# Fix linking error (ld.exe: Error: export ordinal too large) due to too
|
||||||
QMAKE_LFLAGS += -Wl,--start-group
|
# many exported symbols.
|
||||||
|
QMAKE_LFLAGS+=-Wl,--exclude-libs,ALL
|
||||||
|
|
||||||
# Switch off optimization for release version
|
# Switch off optimization for release version
|
||||||
QMAKE_CXXFLAGS_RELEASE -= -O2
|
QMAKE_CXXFLAGS_RELEASE -= -O2
|
||||||
@ -199,15 +180,10 @@ win32 {
|
|||||||
#QMAKE_CFLAGS_DEBUG += -O2
|
#QMAKE_CFLAGS_DEBUG += -O2
|
||||||
|
|
||||||
OBJECTS_DIR = temp/obj
|
OBJECTS_DIR = temp/obj
|
||||||
#LIBS += -L"D/Qt/2009.03/qt/plugins/imageformats"
|
|
||||||
#QTPLUGIN += qjpeg
|
|
||||||
|
|
||||||
for(lib, LIB_DIR):LIBS += -L"$$lib"
|
dLib = ws2_32 gdi32 uuid ole32 iphlpapi crypt32 winmm
|
||||||
for(bin, BIN_DIR):LIBS += -L"$$bin"
|
LIBS *= $$linkDynamicLibs(dLib)
|
||||||
|
|
||||||
LIBS += -lssl -lcrypto -lpthread -lminiupnpc -lz -lws2_32
|
|
||||||
LIBS += -luuid -lole32 -liphlpapi -lcrypt32 -lgdi32
|
|
||||||
LIBS += -lwinmm
|
|
||||||
RC_FILE = gui/images/retroshare_win.rc
|
RC_FILE = gui/images/retroshare_win.rc
|
||||||
|
|
||||||
# export symbols for the plugins
|
# export symbols for the plugins
|
||||||
@ -220,11 +196,6 @@ win32 {
|
|||||||
QMAKE_PRE_LINK = $(CHK_DIR_EXISTS) lib || $(MKDIR) lib
|
QMAKE_PRE_LINK = $(CHK_DIR_EXISTS) lib || $(MKDIR) lib
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFINES *= WINDOWS_SYS WIN32_LEAN_AND_MEAN _USE_32BIT_TIME_T
|
|
||||||
|
|
||||||
DEPENDPATH += . $$INC_DIR
|
|
||||||
INCLUDEPATH += . $$INC_DIR
|
|
||||||
|
|
||||||
greaterThan(QT_MAJOR_VERSION, 4) {
|
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||||
# Qt 5
|
# Qt 5
|
||||||
RC_INCLUDEPATH += $$_PRO_FILE_PWD_/../../libretroshare/src
|
RC_INCLUDEPATH += $$_PRO_FILE_PWD_/../../libretroshare/src
|
||||||
@ -309,32 +280,11 @@ openbsd-* {
|
|||||||
LIBS *= -rdynamic
|
LIBS *= -rdynamic
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
############################## Common stuff ######################################
|
|
||||||
|
|
||||||
# On Linux systems that alredy have libssl and libcrypto it is advisable
|
|
||||||
# to rename the patched version of SSL to something like libsslxpgp.a and libcryptoxpg.a
|
|
||||||
|
|
||||||
# ###########################################
|
|
||||||
|
|
||||||
DEPENDPATH += . $$PWD/../../libretroshare/src/
|
|
||||||
INCLUDEPATH += $$PWD/../../libretroshare/src/
|
|
||||||
|
|
||||||
PRE_TARGETDEPS *= $$OUT_PWD/../../libretroshare/src/lib/libretroshare.a
|
|
||||||
LIBS *= $$OUT_PWD/../../libretroshare/src/lib/libretroshare.a
|
|
||||||
|
|
||||||
wikipoos {
|
wikipoos {
|
||||||
PRE_TARGETDEPS *= $$OUT_PWD/../../supportlibs/pegmarkdown/lib/libpegmarkdown.a
|
PRE_TARGETDEPS *= $$OUT_PWD/../../supportlibs/pegmarkdown/lib/libpegmarkdown.a
|
||||||
LIBS *= $$OUT_PWD/../../supportlibs/pegmarkdown/lib/libpegmarkdown.a
|
LIBS *= $$OUT_PWD/../../supportlibs/pegmarkdown/lib/libpegmarkdown.a
|
||||||
}
|
}
|
||||||
|
|
||||||
# webinterface
|
|
||||||
DEPENDPATH += $$PWD/../../libresapi/src
|
|
||||||
INCLUDEPATH += $$PWD/../../libresapi/src
|
|
||||||
PRE_TARGETDEPS *= $$OUT_PWD/../../libresapi/src/lib/libresapi.a
|
|
||||||
LIBS += $$OUT_PWD/../../libresapi/src/lib/libresapi.a
|
|
||||||
|
|
||||||
retrotor {
|
retrotor {
|
||||||
HEADERS += TorControl/AddOnionCommand.h \
|
HEADERS += TorControl/AddOnionCommand.h \
|
||||||
TorControl/AuthenticateCommand.h \
|
TorControl/AuthenticateCommand.h \
|
||||||
@ -439,7 +389,6 @@ HEADERS += rshare.h \
|
|||||||
util/stringutil.h \
|
util/stringutil.h \
|
||||||
util/RsNetUtil.h \
|
util/RsNetUtil.h \
|
||||||
util/DateTime.h \
|
util/DateTime.h \
|
||||||
util/win32.h \
|
|
||||||
util/RetroStyleLabel.h \
|
util/RetroStyleLabel.h \
|
||||||
util/dllexport.h \
|
util/dllexport.h \
|
||||||
util/NonCopyable.h \
|
util/NonCopyable.h \
|
||||||
@ -619,7 +568,8 @@ HEADERS += rshare.h \
|
|||||||
util/imageutil.h \
|
util/imageutil.h \
|
||||||
gui/NetworkDialog/pgpid_item_model.h \
|
gui/NetworkDialog/pgpid_item_model.h \
|
||||||
gui/NetworkDialog/pgpid_item_proxy.h \
|
gui/NetworkDialog/pgpid_item_proxy.h \
|
||||||
gui/common/RsCollection.h
|
gui/common/RsCollection.h \
|
||||||
|
util/retroshareWin32.h
|
||||||
# gui/ForumsDialog.h \
|
# gui/ForumsDialog.h \
|
||||||
# gui/forums/ForumDetails.h \
|
# gui/forums/ForumDetails.h \
|
||||||
# gui/forums/EditForumDetails.h \
|
# gui/forums/EditForumDetails.h \
|
||||||
@ -803,7 +753,6 @@ SOURCES += main.cpp \
|
|||||||
util/stringutil.cpp \
|
util/stringutil.cpp \
|
||||||
util/RsNetUtil.cpp \
|
util/RsNetUtil.cpp \
|
||||||
util/DateTime.cpp \
|
util/DateTime.cpp \
|
||||||
util/win32.cpp \
|
|
||||||
util/RetroStyleLabel.cpp \
|
util/RetroStyleLabel.cpp \
|
||||||
util/WidgetBackgroundImage.cpp \
|
util/WidgetBackgroundImage.cpp \
|
||||||
util/NonCopyable.cpp \
|
util/NonCopyable.cpp \
|
||||||
@ -981,7 +930,8 @@ SOURCES += main.cpp \
|
|||||||
util/imageutil.cpp \
|
util/imageutil.cpp \
|
||||||
gui/NetworkDialog/pgpid_item_model.cpp \
|
gui/NetworkDialog/pgpid_item_model.cpp \
|
||||||
gui/NetworkDialog/pgpid_item_proxy.cpp \
|
gui/NetworkDialog/pgpid_item_proxy.cpp \
|
||||||
gui/common/RsCollection.cpp
|
gui/common/RsCollection.cpp \
|
||||||
|
util/retroshareWin32.cpp
|
||||||
# gui/ForumsDialog.cpp \
|
# gui/ForumsDialog.cpp \
|
||||||
# gui/forums/ForumDetails.cpp \
|
# gui/forums/ForumDetails.cpp \
|
||||||
# gui/forums/EditForumDetails.cpp \
|
# gui/forums/EditForumDetails.cpp \
|
||||||
@ -1419,9 +1369,3 @@ gxsgui {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
libresapihttpserver {
|
|
||||||
HEADERS *= gui/settings/WebuiPage.h
|
|
||||||
SOURCES *= gui/settings/WebuiPage.cpp
|
|
||||||
FORMS *= gui/settings/WebuiPage.ui
|
|
||||||
}
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <util/win32.h>
|
#include "util/retroshareWin32.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include "win32.h"
|
#include "retroshareWin32.h"
|
||||||
|
|
||||||
|
|
||||||
/** Finds the location of the "special" Windows folder using the given CSIDL
|
/** Finds the location of the "special" Windows folder using the given CSIDL
|
@ -1,3 +1,4 @@
|
|||||||
|
#pragma once
|
||||||
/****************************************************************
|
/****************************************************************
|
||||||
* This file is distributed under the following license:
|
* This file is distributed under the following license:
|
||||||
*
|
*
|
||||||
@ -20,10 +21,6 @@
|
|||||||
* Boston, MA 02110-1301, USA.
|
* Boston, MA 02110-1301, USA.
|
||||||
****************************************************************/
|
****************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef _WIN32_H
|
|
||||||
#define _WIN32_H
|
|
||||||
|
|
||||||
#include <QHash>
|
#include <QHash>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
@ -41,6 +38,3 @@ void win32_registry_set_key_value(QString keyLocation, QString keyName, QString
|
|||||||
|
|
||||||
/** Removes the key from the registry if it exists */
|
/** Removes the key from the registry if it exists */
|
||||||
void win32_registry_remove_key(QString keyLocation, QString keyName);
|
void win32_registry_remove_key(QString keyLocation, QString keyName);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -2,22 +2,20 @@
|
|||||||
|
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
TARGET = retroshare-nogui
|
TARGET = retroshare-nogui
|
||||||
CONFIG += bitdht
|
|
||||||
#CONFIG += introserver
|
|
||||||
CONFIG -= qt xml gui
|
CONFIG -= qt xml gui
|
||||||
CONFIG += link_prl
|
|
||||||
|
|
||||||
#CONFIG += debug
|
DEPENDPATH *= $${PWD} $${RS_INCLUDE_DIR}
|
||||||
debug {
|
INCLUDEPATH *= $${PWD} $${RS_INCLUDE_DIR}
|
||||||
QMAKE_CFLAGS -= -O2
|
|
||||||
QMAKE_CFLAGS += -O0
|
|
||||||
QMAKE_CFLAGS += -g
|
|
||||||
|
|
||||||
QMAKE_CXXFLAGS -= -O2
|
libresapihttpserver {
|
||||||
QMAKE_CXXFLAGS += -O0
|
!include("../../libresapi/src/use_libresapi.pri"):error("Including")
|
||||||
QMAKE_CXXFLAGS += -g
|
|
||||||
|
HEADERS += TerminalApiClient.h
|
||||||
|
SOURCES += TerminalApiClient.cpp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
!include("../../libretroshare/src/use_libretroshare.pri"):error("Including")
|
||||||
|
|
||||||
################################# Linux ##########################################
|
################################# Linux ##########################################
|
||||||
linux-* {
|
linux-* {
|
||||||
#CONFIG += version_detail_bash_script
|
#CONFIG += version_detail_bash_script
|
||||||
@ -53,21 +51,19 @@ win32-x-g++ {
|
|||||||
LIBS += -lole32 -lwinmm
|
LIBS += -lole32 -lwinmm
|
||||||
|
|
||||||
RC_FILE = gui/images/retroshare_win.rc
|
RC_FILE = gui/images/retroshare_win.rc
|
||||||
|
|
||||||
DEFINES *= WIN32
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#################################### Windows #####################################
|
#################################### Windows #####################################
|
||||||
|
|
||||||
win32 {
|
win32-g++ {
|
||||||
CONFIG += console
|
CONFIG += console
|
||||||
OBJECTS_DIR = temp/obj
|
OBJECTS_DIR = temp/obj
|
||||||
RCC_DIR = temp/qrc
|
RCC_DIR = temp/qrc
|
||||||
UI_DIR = temp/ui
|
UI_DIR = temp/ui
|
||||||
MOC_DIR = temp/moc
|
MOC_DIR = temp/moc
|
||||||
|
|
||||||
# solve linker warnings because of the order of the libraries
|
## solve linker warnings because of the order of the libraries
|
||||||
QMAKE_LFLAGS += -Wl,--start-group
|
#QMAKE_LFLAGS += -Wl,--start-group
|
||||||
|
|
||||||
CONFIG(debug, debug|release) {
|
CONFIG(debug, debug|release) {
|
||||||
} else {
|
} else {
|
||||||
@ -77,18 +73,10 @@ win32 {
|
|||||||
QMAKE_LFLAGS += -Wl,-nxcompat
|
QMAKE_LFLAGS += -Wl,-nxcompat
|
||||||
}
|
}
|
||||||
|
|
||||||
for(lib, LIB_DIR):LIBS += -L"$$lib"
|
dLib = ws2_32 gdi32 uuid ole32 iphlpapi crypt32 winmm
|
||||||
LIBS += -lssl -lcrypto -lpthread -lminiupnpc -lz
|
LIBS *= $$linkDynamicLibs(dLib)
|
||||||
LIBS += -lcrypto -lws2_32 -lgdi32
|
|
||||||
LIBS += -luuid -lole32 -liphlpapi -lcrypt32
|
|
||||||
LIBS += -lole32 -lwinmm
|
|
||||||
|
|
||||||
RC_FILE = resources/retroshare_win.rc
|
RC_FILE = resources/retroshare_win.rc
|
||||||
|
|
||||||
DEFINES *= WINDOWS_SYS _USE_32BIT_TIME_T
|
|
||||||
|
|
||||||
DEPENDPATH += . $$INC_DIR
|
|
||||||
INCLUDEPATH += . $$INC_DIR
|
|
||||||
}
|
}
|
||||||
|
|
||||||
##################################### MacOS ######################################
|
##################################### MacOS ######################################
|
||||||
@ -156,11 +144,6 @@ haiku-* {
|
|||||||
|
|
||||||
############################## Common stuff ######################################
|
############################## Common stuff ######################################
|
||||||
|
|
||||||
DEPENDPATH += . $$PWD/../../libretroshare/src
|
|
||||||
INCLUDEPATH += . $$PWD/../../libretroshare/src
|
|
||||||
|
|
||||||
PRE_TARGETDEPS *= $$OUT_PWD/../../libretroshare/src/lib/libretroshare.a
|
|
||||||
LIBS *= $$OUT_PWD/../../libretroshare/src/lib/libretroshare.a
|
|
||||||
|
|
||||||
# Input
|
# Input
|
||||||
HEADERS += notifytxt.h
|
HEADERS += notifytxt.h
|
||||||
@ -168,19 +151,9 @@ SOURCES += notifytxt.cc \
|
|||||||
retroshare.cc
|
retroshare.cc
|
||||||
|
|
||||||
introserver {
|
introserver {
|
||||||
|
## Introserver is broken (doesn't compile) should be either fixed or removed
|
||||||
|
|
||||||
HEADERS += introserver.h
|
HEADERS += introserver.h
|
||||||
SOURCES += introserver.cc
|
SOURCES += introserver.cc
|
||||||
DEFINES *= RS_INTRO_SERVER
|
DEFINES *= RS_INTRO_SERVER
|
||||||
}
|
}
|
||||||
|
|
||||||
libresapihttpserver {
|
|
||||||
DEFINES *= ENABLE_WEBUI
|
|
||||||
PRE_TARGETDEPS *= $$OUT_PWD/../../libresapi/src/lib/libresapi.a
|
|
||||||
LIBS += $$OUT_PWD/../../libresapi/src/lib/libresapi.a
|
|
||||||
DEPENDPATH += $$PWD/../../libresapi/src
|
|
||||||
INCLUDEPATH += $$PWD/../../libresapi/src
|
|
||||||
HEADERS += \
|
|
||||||
TerminalApiClient.h
|
|
||||||
SOURCES += \
|
|
||||||
TerminalApiClient.cpp
|
|
||||||
}
|
|
||||||
|
@ -22,7 +22,6 @@ android-* {
|
|||||||
HEADERS += NativeCalls.h androidplatforminteracions.h
|
HEADERS += NativeCalls.h androidplatforminteracions.h
|
||||||
SOURCES += NativeCalls.cpp androidplatforminteracions.cpp
|
SOURCES += NativeCalls.cpp androidplatforminteracions.cpp
|
||||||
|
|
||||||
ANDROID_EXTRA_LIBS *= $$NATIVE_LIBS_TOOLCHAIN_PATH/sysroot/usr/lib/libsqlite3.so
|
|
||||||
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
|
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
|
||||||
|
|
||||||
|
|
||||||
|
508
retroshare.pri
508
retroshare.pri
@ -1,14 +1,15 @@
|
|||||||
|
################################################################################
|
||||||
|
## Documented build options (CONFIG) goes here as all the rest depend on them ##
|
||||||
|
## CONFIG must not be edited in other .pro files, aka if CONFIG need do be #####
|
||||||
|
## programatically modified depending on platform or from CONFIG itself it #####
|
||||||
|
## can be done ONLY inside this file (retroshare.pri) ##########################
|
||||||
|
################################################################################
|
||||||
|
|
||||||
# To disable RetroShare-gui append the following
|
# To disable RetroShare-gui append the following
|
||||||
# assignation to qmake command line "CONFIG+=no_retroshare_gui"
|
# assignation to qmake command line "CONFIG+=no_retroshare_gui"
|
||||||
CONFIG *= retroshare_gui
|
CONFIG *= retroshare_gui
|
||||||
no_retroshare_gui:CONFIG -= retroshare_gui
|
no_retroshare_gui:CONFIG -= retroshare_gui
|
||||||
|
|
||||||
# To build the RetroTor executable, just uncomment the following option.
|
|
||||||
# RetroTor is a version of RS that automatically configures Tor for its own usage
|
|
||||||
# using only hidden nodes. It will not start if Tor is not working.
|
|
||||||
|
|
||||||
# CONFIG *= retrotor
|
|
||||||
|
|
||||||
# To disable RetroShare-nogui append the following
|
# To disable RetroShare-nogui append the following
|
||||||
# assignation to qmake command line "CONFIG+=no_retroshare_nogui"
|
# assignation to qmake command line "CONFIG+=no_retroshare_nogui"
|
||||||
CONFIG *= retroshare_nogui
|
CONFIG *= retroshare_nogui
|
||||||
@ -41,10 +42,10 @@ retroshare_qml_app:CONFIG -= no_retroshare_qml_app
|
|||||||
CONFIG *= no_libresapilocalserver
|
CONFIG *= no_libresapilocalserver
|
||||||
libresapilocalserver:CONFIG -= no_libresapilocalserver
|
libresapilocalserver:CONFIG -= no_libresapilocalserver
|
||||||
|
|
||||||
# To enable Qt dependencies in libresapi append the following
|
# To enable libresapi settings handler in libresapi append the following
|
||||||
# assignation to qmake command line "CONFIG+=qt_dependencies"
|
# assignation to qmake command line "CONFIG+=libresapi_settings"
|
||||||
CONFIG *= no_qt_dependencies
|
CONFIG *= no_libresapi_settings
|
||||||
qt_dependencies:CONFIG -= no_qt_dependencies
|
libresapi_settings:CONFIG -= no_libresapi_settings
|
||||||
|
|
||||||
# To disable libresapi via HTTP (based on libmicrohttpd) append the following
|
# To disable libresapi via HTTP (based on libmicrohttpd) append the following
|
||||||
# assignation to qmake command line "CONFIG+=no_libresapihttpserver"
|
# assignation to qmake command line "CONFIG+=no_libresapihttpserver"
|
||||||
@ -62,6 +63,15 @@ no_sqlcipher:CONFIG -= sqlcipher
|
|||||||
CONFIG *= no_rs_autologin
|
CONFIG *= no_rs_autologin
|
||||||
rs_autologin:CONFIG -= no_rs_autologin
|
rs_autologin:CONFIG -= no_rs_autologin
|
||||||
|
|
||||||
|
# To build RetroShare Tor only version with automatic hidden node setup append
|
||||||
|
# the following assignation to qmake command line "CONFIG+=retrotor"
|
||||||
|
CONFIG *= no_retrotor
|
||||||
|
retrotor {
|
||||||
|
CONFIG -= no_retrotor
|
||||||
|
CONFIG *= rs_onlyhiddennode
|
||||||
|
DEFINES *= RETROTOR
|
||||||
|
}
|
||||||
|
|
||||||
# To have only hidden node generation append the following assignation
|
# To have only hidden node generation append the following assignation
|
||||||
# to qmake command line "CONFIG+=rs_onlyhiddennode"
|
# to qmake command line "CONFIG+=rs_onlyhiddennode"
|
||||||
CONFIG *= no_rs_onlyhiddennode
|
CONFIG *= no_rs_onlyhiddennode
|
||||||
@ -92,6 +102,11 @@ CONFIG *= rs_gxs_trans
|
|||||||
CONFIG *= no_rs_async_chat
|
CONFIG *= no_rs_async_chat
|
||||||
rs_async_chat:CONFIG -= no_rs_async_chat
|
rs_async_chat:CONFIG -= no_rs_async_chat
|
||||||
|
|
||||||
|
# To disable bitdht append the following assignation to qmake command line
|
||||||
|
# "CONFIG+=no_bitdht"
|
||||||
|
CONFIG *= bitdht
|
||||||
|
no_bitdht:CONFIG -= bitdht
|
||||||
|
|
||||||
# To select your MacOsX version append the following assignation to qmake
|
# To select your MacOsX version append the following assignation to qmake
|
||||||
# command line "CONFIG+=rs_macos10.11" where 10.11 depends your version
|
# command line "CONFIG+=rs_macos10.11" where 10.11 depends your version
|
||||||
macx:CONFIG *= rs_macos10.11
|
macx:CONFIG *= rs_macos10.11
|
||||||
@ -100,171 +115,6 @@ rs_macos10.9:CONFIG -= rs_macos10.11
|
|||||||
rs_macos10.10:CONFIG -= rs_macos10.11
|
rs_macos10.10:CONFIG -= rs_macos10.11
|
||||||
rs_macos10.12:CONFIG -= rs_macos10.11
|
rs_macos10.12:CONFIG -= rs_macos10.11
|
||||||
|
|
||||||
|
|
||||||
linux-* {
|
|
||||||
isEmpty(PREFIX) { PREFIX = "/usr" }
|
|
||||||
isEmpty(BIN_DIR) { BIN_DIR = "$${PREFIX}/bin" }
|
|
||||||
isEmpty(INC_DIR) { INC_DIR = "$${PREFIX}/include/retroshare" }
|
|
||||||
isEmpty(LIB_DIR) { LIB_DIR = "$${PREFIX}/lib" }
|
|
||||||
isEmpty(DATA_DIR) { DATA_DIR = "$${PREFIX}/share/retroshare" }
|
|
||||||
isEmpty(PLUGIN_DIR) { PLUGIN_DIR = "$${LIB_DIR}/retroshare/extensions6" }
|
|
||||||
|
|
||||||
rs_autologin {
|
|
||||||
!macx {
|
|
||||||
DEFINES *= HAS_GNOME_KEYRING
|
|
||||||
PKGCONFIG *= gnome-keyring-1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
android-* {
|
|
||||||
isEmpty(NATIVE_LIBS_TOOLCHAIN_PATH) {
|
|
||||||
NATIVE_LIBS_TOOLCHAIN_PATH = $$(NATIVE_LIBS_TOOLCHAIN_PATH)
|
|
||||||
}
|
|
||||||
retroshare_qml_app {
|
|
||||||
CONFIG -= no_retroshare_android_notify_service
|
|
||||||
CONFIG *= retroshare_android_notify_service
|
|
||||||
}
|
|
||||||
CONFIG *= no_libresapihttpserver upnp_libupnp
|
|
||||||
CONFIG -= libresapihttpserver upnp_miniupnpc
|
|
||||||
QT *= androidextras
|
|
||||||
INCLUDEPATH += $$NATIVE_LIBS_TOOLCHAIN_PATH/sysroot/usr/include
|
|
||||||
LIBS *= -L$$NATIVE_LIBS_TOOLCHAIN_PATH/sysroot/usr/lib/
|
|
||||||
}
|
|
||||||
|
|
||||||
win32 {
|
|
||||||
message(***retroshare.pri:Win32)
|
|
||||||
exists($$PWD/../libs) {
|
|
||||||
message(Get pre-compiled libraries.)
|
|
||||||
isEmpty(PREFIX) { PREFIX = "$$PWD/../libs" }
|
|
||||||
isEmpty(BIN_DIR) { BIN_DIR = "$${PREFIX}/bin" }
|
|
||||||
isEmpty(INC_DIR) { INC_DIR = "$${PREFIX}/include" }
|
|
||||||
isEmpty(LIB_DIR) { LIB_DIR = "$${PREFIX}/lib" }
|
|
||||||
}
|
|
||||||
|
|
||||||
# Check for msys2
|
|
||||||
PREFIX_MSYS2 = $$(MINGW_PREFIX)
|
|
||||||
isEmpty(PREFIX_MSYS2) {
|
|
||||||
exists(C:/msys32/mingw32/include) {
|
|
||||||
message(MINGW_PREFIX is empty. Set it in your environment variables.)
|
|
||||||
message(Found it here:C:\msys32\mingw32)
|
|
||||||
PREFIX_MSYS2 = "C:\msys32\mingw32"
|
|
||||||
}
|
|
||||||
exists(C:/msys64/mingw32/include) {
|
|
||||||
message(MINGW_PREFIX is empty. Set it in your environment variables.)
|
|
||||||
message(Found it here:C:\msys64\mingw32)
|
|
||||||
PREFIX_MSYS2 = "C:\msys64\mingw32"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
!isEmpty(PREFIX_MSYS2) {
|
|
||||||
message(msys2 is installed.)
|
|
||||||
BIN_DIR += "$${PREFIX_MSYS2}/bin"
|
|
||||||
INC_DIR += "$${PREFIX_MSYS2}/include"
|
|
||||||
LIB_DIR += "$${PREFIX_MSYS2}/lib"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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_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
|
|
||||||
}
|
|
||||||
|
|
||||||
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"
|
|
||||||
CONFIG += c++11
|
|
||||||
}
|
|
||||||
|
|
||||||
unfinished {
|
|
||||||
CONFIG += gxscircles
|
|
||||||
CONFIG += gxsthewire
|
|
||||||
CONFIG += gxsphotoshare
|
|
||||||
CONFIG += wikipoos
|
|
||||||
}
|
|
||||||
|
|
||||||
wikipoos:DEFINES *= RS_USE_WIKI
|
|
||||||
rs_gxs:DEFINES *= RS_ENABLE_GXS
|
|
||||||
libresapilocalserver:DEFINES *= LIBRESAPI_LOCAL_SERVER
|
|
||||||
qt_dependencies:DEFINES *= LIBRESAPI_QT
|
|
||||||
libresapihttpserver:DEFINES *= ENABLE_WEBUI
|
|
||||||
sqlcipher:DEFINES -= NO_SQLCIPHER
|
|
||||||
no_sqlcipher:DEFINES *= NO_SQLCIPHER
|
|
||||||
rs_autologin {
|
|
||||||
DEFINES *= RS_AUTOLOGIN
|
|
||||||
warning("You have enabled RetroShare auto-login, this is discouraged. The usage of auto-login on some linux distributions may allow someone having access to your session to steal the SSL keys of your node location and therefore compromise your security")
|
|
||||||
}
|
|
||||||
|
|
||||||
retrotor {
|
|
||||||
CONFIG *= rs_onlyhiddennode
|
|
||||||
}
|
|
||||||
|
|
||||||
rs_onlyhiddennode {
|
|
||||||
DEFINES *= RS_ONLYHIDDENNODE
|
|
||||||
warning("QMAKE: You have enabled only hidden node.")
|
|
||||||
}
|
|
||||||
|
|
||||||
no_rs_deprecatedwarning {
|
|
||||||
QMAKE_CXXFLAGS += -Wno-deprecated
|
|
||||||
QMAKE_CXXFLAGS += -Wno-deprecated-declarations
|
|
||||||
DEFINES *= RS_NO_WARN_DEPRECATED
|
|
||||||
warning("QMAKE: You have disabled deprecated warnings.")
|
|
||||||
}
|
|
||||||
|
|
||||||
no_rs_cppwarning {
|
|
||||||
QMAKE_CXXFLAGS += -Wno-cpp
|
|
||||||
DEFINES *= RS_NO_WARN_CPP
|
|
||||||
warning("QMAKE: You have disabled C preprocessor warnings.")
|
|
||||||
}
|
|
||||||
|
|
||||||
rs_gxs_trans {
|
|
||||||
DEFINES *= RS_GXS_TRANS
|
|
||||||
greaterThan(QT_MAJOR_VERSION, 4) {
|
|
||||||
CONFIG += c++11
|
|
||||||
} else {
|
|
||||||
QMAKE_CXXFLAGS += -std=c++0x
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
rs_async_chat {
|
|
||||||
DEFINES *= RS_ASYNC_CHAT
|
|
||||||
}
|
|
||||||
|
|
||||||
rs_chatserver {
|
|
||||||
DEFINES *= RS_CHATSERVER
|
|
||||||
}
|
|
||||||
|
|
||||||
###########################################################################################################################################################
|
###########################################################################################################################################################
|
||||||
#
|
#
|
||||||
# V07_NON_BACKWARD_COMPATIBLE_CHANGE_001:
|
# V07_NON_BACKWARD_COMPATIBLE_CHANGE_001:
|
||||||
@ -305,3 +155,311 @@ rs_v07_changes {
|
|||||||
DEFINES += V07_NON_BACKWARD_COMPATIBLE_CHANGE_002
|
DEFINES += V07_NON_BACKWARD_COMPATIBLE_CHANGE_002
|
||||||
DEFINES += V07_NON_BACKWARD_COMPATIBLE_CHANGE_003
|
DEFINES += V07_NON_BACKWARD_COMPATIBLE_CHANGE_003
|
||||||
}
|
}
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
## RetroShare qmake functions goes here as all the rest may use them ###########
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
## This function is useful to look for the location of a file in a list of paths
|
||||||
|
## like the which command on linux, first paramether is the file name,
|
||||||
|
## second parameter is the name of a variable containing the list of folders
|
||||||
|
## where to look for. First match is returned.
|
||||||
|
defineReplace(findFileInPath) {
|
||||||
|
fileName=$$1
|
||||||
|
pathList=$$2
|
||||||
|
|
||||||
|
for(mDir, $$pathList) {
|
||||||
|
attempt = $$clean_path($$mDir/$$fileName)
|
||||||
|
exists($$attempt) {
|
||||||
|
return($$system_path($$attempt))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return()
|
||||||
|
}
|
||||||
|
|
||||||
|
## This function return linker option to link statically the libraries contained
|
||||||
|
## in the variable given as paramether.
|
||||||
|
## Be carefull static library are very susceptible to order
|
||||||
|
defineReplace(linkStaticLibs) {
|
||||||
|
libsVarName = $$1
|
||||||
|
retSlib =
|
||||||
|
|
||||||
|
for(mLib, $$libsVarName) {
|
||||||
|
attemptPath=$$findFileInPath(lib$${mLib}.a, QMAKE_LIBDIR)
|
||||||
|
isEmpty(attemptPath):error(lib$${mLib}.a not found in [$${QMAKE_LIBDIR}])
|
||||||
|
|
||||||
|
retSlib += -L$$dirname(attemptPath) -l$$mLib
|
||||||
|
}
|
||||||
|
|
||||||
|
return($$retSlib)
|
||||||
|
}
|
||||||
|
|
||||||
|
## This function return pretarget deps for the static the libraries contained in
|
||||||
|
## the variable given as paramether.
|
||||||
|
defineReplace(pretargetStaticLibs) {
|
||||||
|
libsVarName = $$1
|
||||||
|
|
||||||
|
retPreTarget =
|
||||||
|
|
||||||
|
for(mLib, $$libsVarName) {
|
||||||
|
attemptPath=$$findFileInPath(lib$${mLib}.a, QMAKE_LIBDIR)
|
||||||
|
isEmpty(attemptPath):error(lib$${mLib}.a not found in [$${QMAKE_LIBDIR}])
|
||||||
|
|
||||||
|
retPreTarget += $$attemptPath
|
||||||
|
}
|
||||||
|
|
||||||
|
return($$retPreTarget)
|
||||||
|
}
|
||||||
|
|
||||||
|
## This function return linker option to link dynamically the libraries
|
||||||
|
## contained in the variable given as paramether.
|
||||||
|
defineReplace(linkDynamicLibs) {
|
||||||
|
libsVarName = $$1
|
||||||
|
retDlib =
|
||||||
|
|
||||||
|
for(mLib, $$libsVarName) {
|
||||||
|
retDlib += -l$$mLib
|
||||||
|
}
|
||||||
|
|
||||||
|
return($$retDlib)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
## Statements and variables that depends on build options (CONFIG)goes here ####
|
||||||
|
################################################################################
|
||||||
|
##
|
||||||
|
## Defining the following variables may be needed depending on platform and
|
||||||
|
## build options (CONFIG)
|
||||||
|
##
|
||||||
|
## PREFIX String variable containing the directory considered as prefix set
|
||||||
|
## with = operator.
|
||||||
|
## QMAKE_LIBDIR, INCLUDEPATH Lists variables where qmake will look for includes
|
||||||
|
## and libraries. Add values using *= operator.
|
||||||
|
## RS_BIN_DIR, RS_LIB_DIR, RS_INCLUDE_DIR, RS_DATA_DIR, RS_PLUGIN_DIR String
|
||||||
|
## variables of directories where RetroShare components will be installed, on
|
||||||
|
## most platforms they are automatically calculated from PREFIX or in other
|
||||||
|
## ways.
|
||||||
|
## RS_SQL_LIB String viariable containing the name of the SQL library to use
|
||||||
|
## ("sqlcipher sqlite3", sqlite3) it is usually precalculated depending on
|
||||||
|
## CONFIG.
|
||||||
|
## RS_UPNP_LIB String viariable containing the name of the UPNP library to use
|
||||||
|
## (miniupnpc, "upnp ixml threadutil") it usually depend on platform.
|
||||||
|
## RS_THREAD_LIB String viariable containing the name of the multi threading
|
||||||
|
## library to use (pthread, "") it usually depend on platform.
|
||||||
|
|
||||||
|
wikipoos:DEFINES *= RS_USE_WIKI
|
||||||
|
rs_gxs:DEFINES *= RS_ENABLE_GXS
|
||||||
|
libresapilocalserver:DEFINES *= LIBRESAPI_LOCAL_SERVER
|
||||||
|
libresapi_settings:DEFINES *= LIBRESAPI_SETTINGS
|
||||||
|
libresapihttpserver:DEFINES *= ENABLE_WEBUI
|
||||||
|
RS_THREAD_LIB=pthread
|
||||||
|
RS_UPNP_LIB = upnp ixml threadutil
|
||||||
|
|
||||||
|
sqlcipher {
|
||||||
|
DEFINES -= NO_SQLCIPHER
|
||||||
|
RS_SQL_LIB = sqlcipher sqlite3
|
||||||
|
}
|
||||||
|
no_sqlcipher {
|
||||||
|
DEFINES *= NO_SQLCIPHER
|
||||||
|
RS_SQL_LIB = sqlite3
|
||||||
|
}
|
||||||
|
|
||||||
|
rs_autologin {
|
||||||
|
DEFINES *= RS_AUTOLOGIN
|
||||||
|
warning("You have enabled RetroShare auto-login, this is discouraged. The usage of auto-login on some linux distributions may allow someone having access to your session to steal the SSL keys of your node location and therefore compromise your security")
|
||||||
|
}
|
||||||
|
|
||||||
|
rs_onlyhiddennode {
|
||||||
|
DEFINES *= RS_ONLYHIDDENNODE
|
||||||
|
CONFIG -= bitdht
|
||||||
|
CONFIG *= no_bitdht
|
||||||
|
message("QMAKE: You have enabled only hidden node.")
|
||||||
|
}
|
||||||
|
|
||||||
|
no_rs_deprecatedwarning {
|
||||||
|
QMAKE_CXXFLAGS += -Wno-deprecated
|
||||||
|
QMAKE_CXXFLAGS += -Wno-deprecated-declarations
|
||||||
|
DEFINES *= RS_NO_WARN_DEPRECATED
|
||||||
|
message("QMAKE: You have disabled deprecated warnings.")
|
||||||
|
}
|
||||||
|
|
||||||
|
no_rs_cppwarning {
|
||||||
|
QMAKE_CXXFLAGS += -Wno-cpp
|
||||||
|
DEFINES *= RS_NO_WARN_CPP
|
||||||
|
message("QMAKE: You have disabled C preprocessor warnings.")
|
||||||
|
}
|
||||||
|
|
||||||
|
rs_gxs_trans {
|
||||||
|
DEFINES *= RS_GXS_TRANS
|
||||||
|
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||||
|
CONFIG += c++11
|
||||||
|
} else {
|
||||||
|
QMAKE_CXXFLAGS += -std=c++0x
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rs_async_chat {
|
||||||
|
DEFINES *= RS_ASYNC_CHAT
|
||||||
|
}
|
||||||
|
|
||||||
|
rs_chatserver {
|
||||||
|
DEFINES *= RS_CHATSERVER
|
||||||
|
}
|
||||||
|
|
||||||
|
debug {
|
||||||
|
QMAKE_CXXFLAGS -= -O2 -fomit-frame-pointer
|
||||||
|
QMAKE_CFLAGS -= -O2 -fomit-frame-pointer
|
||||||
|
|
||||||
|
QMAKE_CXXFLAGS *= -O0 -g -fno-omit-frame-pointer
|
||||||
|
QMAKE_CFLAGS *= -O0 -g -fno-omit-frame-pointer
|
||||||
|
}
|
||||||
|
|
||||||
|
profiling {
|
||||||
|
QMAKE_CXXFLAGS -= -fomit-frame-pointer
|
||||||
|
QMAKE_CFLAGS -= -fomit-frame-pointer
|
||||||
|
|
||||||
|
QMAKE_CXXFLAGS *= -pg -g -fno-omit-frame-pointer
|
||||||
|
QMAKE_CFLAGS *= -pg -g -fno-omit-frame-pointer
|
||||||
|
|
||||||
|
QMAKE_LFLAGS *= -pg
|
||||||
|
}
|
||||||
|
|
||||||
|
## Retrocompatibility assignations, get rid of this ASAP
|
||||||
|
isEmpty(BIN_DIR) : BIN_DIR = $${RS_BIN_DIR}
|
||||||
|
isEmpty(INC_DIR) : INC_DIR = $${RS_INCLUDE_DIR}
|
||||||
|
isEmpty(LIBDIR) : LIBDIR = $${QMAKE_LIBDIR}
|
||||||
|
isEmpty(DATA_DIR) : DATA_DIR = $${RS_DATA_DIR}
|
||||||
|
isEmpty(PLUGIN_DIR): PLUGIN_DIR= $${RS_PLUGIN_DIR}
|
||||||
|
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
## Last goes platform specific statements common to all RetroShare subprojects #
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
linux-* {
|
||||||
|
isEmpty(PREFIX) : PREFIX = "/usr"
|
||||||
|
isEmpty(RS_BIN_DIR) : RS_BIN_DIR = "$${PREFIX}/bin"
|
||||||
|
isEmpty(RS_INCLUDE_DIR): RS_INCLUDE_DIR = "$${PREFIX}/include"
|
||||||
|
isEmpty(RS_LIB_DIR) : RS_LIB_DIR = "$${PREFIX}/lib"
|
||||||
|
isEmpty(RS_DATA_DIR) : RS_DATA_DIR = "$${PREFIX}/share/retroshare"
|
||||||
|
isEmpty(RS_PLUGIN_DIR) : RS_PLUGIN_DIR = "$${RS_LIB_DIR}/retroshare/extensions6"
|
||||||
|
|
||||||
|
INCLUDEPATH *= "$$RS_INCLUDE_DIR"
|
||||||
|
QMAKE_LIBDIR *= "$$RS_LIB_DIR"
|
||||||
|
|
||||||
|
rs_autologin {
|
||||||
|
DEFINES *= HAS_GNOME_KEYRING
|
||||||
|
PKGCONFIG *= gnome-keyring-1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
android-* {
|
||||||
|
isEmpty(NATIVE_LIBS_TOOLCHAIN_PATH) {
|
||||||
|
NATIVE_LIBS_TOOLCHAIN_PATH = $$(NATIVE_LIBS_TOOLCHAIN_PATH)
|
||||||
|
}
|
||||||
|
retroshare_qml_app {
|
||||||
|
CONFIG -= no_retroshare_android_notify_service
|
||||||
|
CONFIG *= retroshare_android_notify_service
|
||||||
|
}
|
||||||
|
CONFIG *= no_libresapihttpserver
|
||||||
|
CONFIG -= libresapihttpserver
|
||||||
|
QT *= androidextras
|
||||||
|
INCLUDEPATH *= $$NATIVE_LIBS_TOOLCHAIN_PATH/sysroot/usr/include
|
||||||
|
QMAKE_LIBDIR *= "$$NATIVE_LIBS_TOOLCHAIN_PATH/sysroot/usr/lib/"
|
||||||
|
|
||||||
|
# The android libc, bionic, provides built-in support for pthreads,
|
||||||
|
# additional linking (-lpthreads) break linking.
|
||||||
|
# See https://stackoverflow.com/a/31277163
|
||||||
|
RS_THREAD_LIB =
|
||||||
|
}
|
||||||
|
|
||||||
|
win32-g++ {
|
||||||
|
PREFIX_MSYS2 = $$(MINGW_PREFIX)
|
||||||
|
isEmpty(PREFIX_MSYS2) {
|
||||||
|
message("MINGW_PREFIX is not set, attempting MSYS2 autodiscovery.")
|
||||||
|
|
||||||
|
TEMPTATIVE_MSYS2=$$system_path(C:\\msys32\\mingw32)
|
||||||
|
exists($$clean_path($${TEMPTATIVE_MSYS2}/include)) {
|
||||||
|
PREFIX_MSYS2=$${TEMPTATIVE_MSYS2}
|
||||||
|
}
|
||||||
|
|
||||||
|
TEMPTATIVE_MSYS2=$$system_path(C:\\msys64\\mingw32)
|
||||||
|
exists($$clean_path($${TEMPTATIVE_MSYS2}/include)) {
|
||||||
|
PREFIX_MSYS2=$${TEMPTATIVE_MSYS2}
|
||||||
|
}
|
||||||
|
|
||||||
|
isEmpty(PREFIX_MSYS2) {
|
||||||
|
error(Cannot find MSYS2 please set MINGW_PREFIX)
|
||||||
|
} else {
|
||||||
|
message(Found MSYS2: $${PREFIX_MSYS2})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
isEmpty(PREFIX) {
|
||||||
|
PREFIX = $$system_path($${PREFIX_MSYS2})
|
||||||
|
}
|
||||||
|
|
||||||
|
INCLUDEPATH *= $$system_path($${PREFIX}/include)
|
||||||
|
INCLUDEPATH *= $$system_path($${PREFIX_MSYS2}/include)
|
||||||
|
|
||||||
|
QMAKE_LIBDIR *= $$system_path($${PREFIX}/lib)
|
||||||
|
QMAKE_LIBDIR *= $$system_path($${PREFIX_MSYS2}/lib)
|
||||||
|
|
||||||
|
RS_BIN_DIR = $$system_path($${PREFIX}/bin)
|
||||||
|
RS_INCLUDE_DIR = $$system_path($${PREFIX}/include)
|
||||||
|
RS_LIB_DIR = $$system_path($${PREFIX}/lib)
|
||||||
|
|
||||||
|
RS_UPNP_LIB = miniupnpc
|
||||||
|
|
||||||
|
DEFINES *= NOGDI WIN32 WIN32_LEAN_AND_MEAN WINDOWS_SYS _USE_32BIT_TIME_T
|
||||||
|
|
||||||
|
# This defines the platform to be WinXP or later and is needed for
|
||||||
|
# getaddrinfo (_WIN32_WINNT_WINXP)
|
||||||
|
DEFINES *= WINVER=0x0501
|
||||||
|
|
||||||
|
message(***retroshare.pri:Win32 PREFIX $$PREFIX INCLUDEPATH $$INCLUDEPATH QMAKE_LIBDIR $$QMAKE_LIBDIR DEFINES $$DEFINES)
|
||||||
|
}
|
||||||
|
|
||||||
|
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_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
|
||||||
|
}
|
||||||
|
|
||||||
|
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"
|
||||||
|
CONFIG += c++11
|
||||||
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
!include("../../retroshare.pri"): error("Could not include file ../../retroshare.pri")
|
!include("../../retroshare.pri"): error("Could not include file ../../retroshare.pri")
|
||||||
|
|
||||||
QT += network xml script
|
QT += network xml
|
||||||
CONFIG += bitdht
|
CONFIG += bitdht
|
||||||
|
|
||||||
CONFIG += gxs debug
|
CONFIG += gxs debug
|
||||||
|
Loading…
Reference in New Issue
Block a user