mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-17 05:22:31 -04:00
Merge pull request #1235 from G10h4ck/build_improvements
Build improvements
This commit is contained in:
commit
82eb42ad8a
26 changed files with 533 additions and 495 deletions
|
@ -107,10 +107,13 @@
|
|||
#include "gui/common/RsCollection.h"
|
||||
#include "settings/rsettingswin.h"
|
||||
#include "settings/rsharesettings.h"
|
||||
#include "settings/WebuiPage.h"
|
||||
#include "common/StatusDefs.h"
|
||||
#include "gui/notifyqt.h"
|
||||
|
||||
#ifdef ENABLE_WEBUI
|
||||
# include "settings/WebuiPage.h"
|
||||
#endif
|
||||
|
||||
#include <iomanip>
|
||||
#include <unistd.h>
|
||||
|
||||
|
|
|
@ -41,12 +41,15 @@
|
|||
#include "PostedPage.h"
|
||||
#include "PluginsPage.h"
|
||||
#include "ServicePermissionsPage.h"
|
||||
#include "WebuiPage.h"
|
||||
#include "rsharesettings.h"
|
||||
#include "gui/notifyqt.h"
|
||||
#include "gui/common/FloatingHelpBrowser.h"
|
||||
#include "gui/common/RSElidedItemDelegate.h"
|
||||
|
||||
#ifdef ENABLE_WEBUI
|
||||
# include "WebuiPage.h"
|
||||
#endif
|
||||
|
||||
#define IMAGE_GENERAL ":/images/kcmsystem24.png"
|
||||
|
||||
#define ITEM_SPACING 2
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include <retroshare/rspeers.h>
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
#include <util/win32.h>
|
||||
#include <util/retroshareWin32.h>
|
||||
#endif
|
||||
|
||||
/* Retroshare's Settings */
|
||||
|
|
|
@ -41,16 +41,19 @@
|
|||
#include "gui/FileTransfer/TransfersDialog.h"
|
||||
#include "gui/settings/RsharePeerSettings.h"
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
#include "gui/settings/WebuiPage.h"
|
||||
#include "idle/idle.h"
|
||||
#include "lang/languagesupport.h"
|
||||
#include "util/RsGxsUpdateBroadcast.h"
|
||||
#include "util/rsdir.h"
|
||||
#include "util/rstime.h"
|
||||
|
||||
#ifdef ENABLE_WEBUI
|
||||
# include "gui/settings/WebuiPage.h"
|
||||
#endif
|
||||
|
||||
#ifdef RETROTOR
|
||||
#include "TorControl/TorManager.h"
|
||||
#include "TorControl/TorControlWindow.h"
|
||||
# include "TorControl/TorManager.h"
|
||||
# include "TorControl/TorControlWindow.h"
|
||||
#endif
|
||||
|
||||
#include "retroshare/rsidentity.h"
|
||||
|
|
|
@ -2,28 +2,24 @@
|
|||
|
||||
TEMPLATE = app
|
||||
QT += network xml
|
||||
CONFIG += qt gui uic qrc resources idle bitdht
|
||||
CONFIG += link_prl
|
||||
CONFIG += qt gui uic qrc resources idle
|
||||
CONFIG += console
|
||||
TARGET = retroshare
|
||||
DEFINES += TARGET=\\\"$${TARGET}\\\"
|
||||
|
||||
# Plz never commit the .pro with these flags enabled.
|
||||
# Use this flag when developping new features only.
|
||||
#
|
||||
#CONFIG += unfinished
|
||||
#CONFIG += debug
|
||||
#DEFINES *= SIGFPE_DEBUG
|
||||
DEPENDPATH *= $${PWD} $${RS_INCLUDE_DIR} retroshare-gui
|
||||
INCLUDEPATH *= $${PWD} $${RS_INCLUDE_DIR} retroshare-gui
|
||||
|
||||
profiling {
|
||||
QMAKE_CXXFLAGS -= -fomit-frame-pointer
|
||||
QMAKE_CXXFLAGS *= -pg -g -fno-omit-frame-pointer
|
||||
QMAKE_LFLAGS *= -pg
|
||||
libresapihttpserver {
|
||||
!include("../../libresapi/src/use_libresapi.pri"):error("Including")
|
||||
HEADERS *= gui/settings/WebuiPage.h
|
||||
SOURCES *= gui/settings/WebuiPage.cpp
|
||||
FORMS *= gui/settings/WebuiPage.ui
|
||||
}
|
||||
|
||||
retrotor {
|
||||
DEFINES *= RETROTOR
|
||||
!include("../../libretroshare/src/use_libretroshare.pri"):error("Including")
|
||||
|
||||
retrotor {
|
||||
FORMS += TorControl/TorControlWindow.ui
|
||||
SOURCES += TorControl/TorControlWindow.cpp
|
||||
HEADERS += TorControl/TorControlWindow.h
|
||||
|
@ -59,22 +55,6 @@ RCC_DIR = temp/qrc
|
|||
UI_DIR = temp/ui
|
||||
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 ##########################################
|
||||
# Put lib dir in QMAKE_LFLAGS so it appears before -L/usr/lib
|
||||
linux-* {
|
||||
|
@ -133,7 +113,7 @@ version_detail_bash_script {
|
|||
PRE_TARGETDEPS = write_version_detail
|
||||
write_version_detail.commands = $$PWD/version_detail.sh
|
||||
}
|
||||
win32 {
|
||||
win32-* {
|
||||
QMAKE_EXTRA_TARGETS += write_version_detail
|
||||
PRE_TARGETDEPS = write_version_detail
|
||||
write_version_detail.commands = $$PWD/version_detail.bat
|
||||
|
@ -165,7 +145,7 @@ win32-x-g++ {
|
|||
|
||||
#################################### Windows #####################################
|
||||
|
||||
win32 {
|
||||
win32-g++ {
|
||||
CONFIG(debug, debug|release) {
|
||||
# show console output
|
||||
CONFIG += console
|
||||
|
@ -185,8 +165,9 @@ win32 {
|
|||
QMAKE_LFLAGS += -Wl,-nxcompat
|
||||
}
|
||||
|
||||
# solve linker warnings because of the order of the libraries
|
||||
QMAKE_LFLAGS += -Wl,--start-group
|
||||
# Fix linking error (ld.exe: Error: export ordinal too large) due to too
|
||||
# many exported symbols.
|
||||
QMAKE_LFLAGS+=-Wl,--exclude-libs,ALL
|
||||
|
||||
# Switch off optimization for release version
|
||||
QMAKE_CXXFLAGS_RELEASE -= -O2
|
||||
|
@ -199,15 +180,10 @@ win32 {
|
|||
#QMAKE_CFLAGS_DEBUG += -O2
|
||||
|
||||
OBJECTS_DIR = temp/obj
|
||||
#LIBS += -L"D/Qt/2009.03/qt/plugins/imageformats"
|
||||
#QTPLUGIN += qjpeg
|
||||
|
||||
for(lib, LIB_DIR):LIBS += -L"$$lib"
|
||||
for(bin, BIN_DIR):LIBS += -L"$$bin"
|
||||
dLib = ws2_32 gdi32 uuid ole32 iphlpapi crypt32 winmm
|
||||
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
|
||||
|
||||
# export symbols for the plugins
|
||||
|
@ -220,11 +196,6 @@ win32 {
|
|||
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) {
|
||||
# Qt 5
|
||||
RC_INCLUDEPATH += $$_PRO_FILE_PWD_/../../libretroshare/src
|
||||
|
@ -309,32 +280,11 @@ openbsd-* {
|
|||
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 {
|
||||
PRE_TARGETDEPS *= $$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 {
|
||||
HEADERS += TorControl/AddOnionCommand.h \
|
||||
TorControl/AuthenticateCommand.h \
|
||||
|
@ -439,7 +389,6 @@ HEADERS += rshare.h \
|
|||
util/stringutil.h \
|
||||
util/RsNetUtil.h \
|
||||
util/DateTime.h \
|
||||
util/win32.h \
|
||||
util/RetroStyleLabel.h \
|
||||
util/dllexport.h \
|
||||
util/NonCopyable.h \
|
||||
|
@ -619,7 +568,8 @@ HEADERS += rshare.h \
|
|||
util/imageutil.h \
|
||||
gui/NetworkDialog/pgpid_item_model.h \
|
||||
gui/NetworkDialog/pgpid_item_proxy.h \
|
||||
gui/common/RsCollection.h
|
||||
gui/common/RsCollection.h \
|
||||
util/retroshareWin32.h
|
||||
# gui/ForumsDialog.h \
|
||||
# gui/forums/ForumDetails.h \
|
||||
# gui/forums/EditForumDetails.h \
|
||||
|
@ -803,7 +753,6 @@ SOURCES += main.cpp \
|
|||
util/stringutil.cpp \
|
||||
util/RsNetUtil.cpp \
|
||||
util/DateTime.cpp \
|
||||
util/win32.cpp \
|
||||
util/RetroStyleLabel.cpp \
|
||||
util/WidgetBackgroundImage.cpp \
|
||||
util/NonCopyable.cpp \
|
||||
|
@ -981,7 +930,8 @@ SOURCES += main.cpp \
|
|||
util/imageutil.cpp \
|
||||
gui/NetworkDialog/pgpid_item_model.cpp \
|
||||
gui/NetworkDialog/pgpid_item_proxy.cpp \
|
||||
gui/common/RsCollection.cpp
|
||||
gui/common/RsCollection.cpp \
|
||||
util/retroshareWin32.cpp
|
||||
# gui/ForumsDialog.cpp \
|
||||
# gui/forums/ForumDetails.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)
|
||||
#include <windows.h>
|
||||
#include <util/win32.h>
|
||||
#include "util/retroshareWin32.h"
|
||||
#endif
|
||||
|
||||
#include <QApplication>
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#endif
|
||||
|
||||
#include <QDir>
|
||||
#include "win32.h"
|
||||
#include "retroshareWin32.h"
|
||||
|
||||
|
||||
/** Finds the location of the "special" Windows folder using the given CSIDL
|
|
@ -1,7 +1,8 @@
|
|||
#pragma once
|
||||
/****************************************************************
|
||||
* This file is distributed under the following license:
|
||||
*
|
||||
* Copyright (c) 2006-2007, crypton
|
||||
* This file is distributed under the following license:
|
||||
*
|
||||
* Copyright (c) 2006-2007, crypton
|
||||
* Copyright (c) 2006, Matt Edman, Justin Hipple
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -20,10 +21,6 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
****************************************************************/
|
||||
|
||||
|
||||
#ifndef _WIN32_H
|
||||
#define _WIN32_H
|
||||
|
||||
#include <QHash>
|
||||
#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 */
|
||||
void win32_registry_remove_key(QString keyLocation, QString keyName);
|
||||
|
||||
#endif
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue