2019-09-23 16:41:55 +02:00
|
|
|
# qml components require at least QT 5.9.7
|
2019-07-01 14:40:20 +02:00
|
|
|
lessThan (QT_MAJOR_VERSION, 5) | lessThan (QT_MINOR_VERSION, 9) {
|
2019-09-23 16:41:55 +02:00
|
|
|
error("Can't build with Qt $${QT_VERSION}. Use at least Qt 5.9.7")
|
2018-05-22 14:31:34 +02:00
|
|
|
}
|
|
|
|
|
2014-07-07 19:08:30 +02:00
|
|
|
TEMPLATE = app
|
|
|
|
|
2019-04-28 03:35:21 +02:00
|
|
|
QT += svg qml gui-private quick widgets
|
2014-07-07 19:08:30 +02:00
|
|
|
|
2016-09-19 15:45:34 +02:00
|
|
|
WALLET_ROOT=$$PWD/monero
|
2016-05-17 15:03:59 +02:00
|
|
|
|
2018-03-31 15:46:56 +02:00
|
|
|
CONFIG += c++11 link_pkgconfig
|
2019-04-10 22:10:32 +02:00
|
|
|
packagesExist(libusb-1.0) {
|
|
|
|
PKGCONFIG += libusb-1.0
|
|
|
|
}
|
2018-10-14 01:04:19 +02:00
|
|
|
packagesExist(hidapi-libusb) {
|
|
|
|
PKGCONFIG += hidapi-libusb
|
2018-03-31 15:46:56 +02:00
|
|
|
}
|
2019-11-04 14:21:27 +01:00
|
|
|
|
|
|
|
GCC_VERSION = $$system("g++ -dumpversion")
|
|
|
|
GCC_VERSION = $$split(GCC_VERSION, .)
|
|
|
|
GCC_VERSION_MAJOR = $$member(GCC_VERSION, 0)
|
|
|
|
GCC_VERSION_MINOR = $$member(GCC_VERSION, 1)
|
|
|
|
greaterThan(GCC_VERSION_MAJOR, 9) | if(equals(GCC_VERSION_MAJOR, 9) : greaterThan(GCC_VERSION_MINOR, 0)) {
|
|
|
|
GCC_9_1_OR_GREATER = TRUE
|
|
|
|
}
|
|
|
|
|
|
|
|
!win32 | !isEmpty(GCC_9_1_OR_GREATER) {
|
2018-09-04 12:16:26 +02:00
|
|
|
QMAKE_CXXFLAGS += -fPIC -fstack-protector -fstack-protector-strong
|
|
|
|
QMAKE_LFLAGS += -fstack-protector -fstack-protector-strong
|
2019-11-04 14:21:27 +01:00
|
|
|
}
|
2019-06-01 06:50:56 +02:00
|
|
|
|
2019-11-04 14:21:27 +01:00
|
|
|
!win32 {
|
2019-06-01 06:50:56 +02:00
|
|
|
packagesExist(protobuf) {
|
|
|
|
PKGCONFIG += protobuf
|
|
|
|
}
|
2018-09-04 12:16:26 +02:00
|
|
|
}
|
2016-02-23 16:59:26 +01:00
|
|
|
|
2016-07-22 14:50:51 +02:00
|
|
|
# cleaning "auto-generated" bitmonero directory on "make distclean"
|
|
|
|
QMAKE_DISTCLEAN += -r $$WALLET_ROOT
|
2016-07-21 11:47:53 +02:00
|
|
|
|
2017-01-12 20:53:27 +01:00
|
|
|
INCLUDEPATH += $$WALLET_ROOT/include \
|
2016-10-02 20:40:40 +02:00
|
|
|
$$PWD/src/libwalletqt \
|
2016-11-20 13:36:14 +01:00
|
|
|
$$PWD/src/QR-Code-generator \
|
2017-01-01 05:55:49 +01:00
|
|
|
$$PWD/src \
|
2020-03-08 16:30:34 +01:00
|
|
|
$$WALLET_ROOT/src \
|
|
|
|
$$WALLET_ROOT/external/easylogging++ \
|
|
|
|
$$WALLET_ROOT/contrib/epee/include
|
2016-05-17 15:03:59 +02:00
|
|
|
|
2016-01-25 19:36:33 +01:00
|
|
|
HEADERS += \
|
2019-11-28 13:05:07 +01:00
|
|
|
src/main/filter.h \
|
|
|
|
src/main/clipboardAdapter.h \
|
|
|
|
src/main/oscursor.h \
|
2016-06-03 16:30:19 +02:00
|
|
|
src/libwalletqt/WalletManager.h \
|
2016-06-08 12:53:24 +02:00
|
|
|
src/libwalletqt/Wallet.h \
|
2020-04-11 12:43:21 +02:00
|
|
|
src/libwalletqt/PassphraseHelper.h \
|
2016-06-08 12:53:24 +02:00
|
|
|
src/libwalletqt/PendingTransaction.h \
|
|
|
|
src/libwalletqt/TransactionHistory.h \
|
2016-06-10 15:41:13 +02:00
|
|
|
src/libwalletqt/TransactionInfo.h \
|
2016-11-20 13:36:14 +01:00
|
|
|
src/libwalletqt/QRCodeImageProvider.h \
|
2016-12-03 12:06:57 +01:00
|
|
|
src/libwalletqt/Transfer.h \
|
2018-03-05 17:19:45 +01:00
|
|
|
src/NetworkType.h \
|
2019-11-28 13:05:07 +01:00
|
|
|
src/main/oshelper.h \
|
|
|
|
src/TranslationManager.h \
|
2016-10-07 22:05:51 +02:00
|
|
|
src/model/TransactionHistoryModel.h \
|
2016-11-20 13:36:14 +01:00
|
|
|
src/model/TransactionHistorySortFilterModel.h \
|
|
|
|
src/QR-Code-generator/BitBuffer.hpp \
|
|
|
|
src/QR-Code-generator/QrCode.hpp \
|
2016-11-25 21:08:39 +01:00
|
|
|
src/QR-Code-generator/QrSegment.hpp \
|
2016-12-10 02:01:04 +01:00
|
|
|
src/model/AddressBookModel.h \
|
2016-12-16 00:47:53 +01:00
|
|
|
src/libwalletqt/AddressBook.h \
|
2017-07-04 05:34:09 +02:00
|
|
|
src/model/SubaddressModel.h \
|
|
|
|
src/libwalletqt/Subaddress.h \
|
2019-01-14 13:25:59 +01:00
|
|
|
src/model/SubaddressAccountModel.h \
|
|
|
|
src/libwalletqt/SubaddressAccount.h \
|
2017-01-12 20:53:27 +01:00
|
|
|
src/zxcvbn-c/zxcvbn.h \
|
2017-01-31 05:36:08 +01:00
|
|
|
src/libwalletqt/UnsignedTransaction.h \
|
2019-11-28 13:05:07 +01:00
|
|
|
src/main/Logger.h \
|
|
|
|
src/main/MainApp.h \
|
2020-04-04 15:22:25 +02:00
|
|
|
src/qt/downloader.h \
|
2019-06-20 22:28:59 +02:00
|
|
|
src/qt/FutureScheduler.h \
|
2019-03-22 21:02:08 +01:00
|
|
|
src/qt/ipc.h \
|
2019-05-02 00:41:09 +02:00
|
|
|
src/qt/KeysFiles.h \
|
2020-03-31 18:29:28 +02:00
|
|
|
src/qt/network.h \
|
2019-05-01 04:05:16 +02:00
|
|
|
src/qt/utils.h \
|
2019-07-03 01:27:25 +02:00
|
|
|
src/qt/macoshelper.h \
|
2019-07-16 18:47:12 +02:00
|
|
|
src/qt/MoneroSettings.h \
|
2019-07-03 05:13:51 +02:00
|
|
|
src/qt/TailsOS.h
|
2016-01-25 19:36:33 +01:00
|
|
|
|
2019-11-28 13:05:07 +01:00
|
|
|
SOURCES += src/main/main.cpp \
|
|
|
|
src/main/filter.cpp \
|
|
|
|
src/main/clipboardAdapter.cpp \
|
|
|
|
src/main/oscursor.cpp \
|
2016-06-03 16:30:19 +02:00
|
|
|
src/libwalletqt/WalletManager.cpp \
|
2020-04-11 12:43:21 +02:00
|
|
|
src/libwalletqt/WalletListenerImpl.cpp \
|
2016-06-08 12:53:24 +02:00
|
|
|
src/libwalletqt/Wallet.cpp \
|
2020-04-11 12:43:21 +02:00
|
|
|
src/libwalletqt/PassphraseHelper.cpp \
|
2016-06-08 12:53:24 +02:00
|
|
|
src/libwalletqt/PendingTransaction.cpp \
|
|
|
|
src/libwalletqt/TransactionHistory.cpp \
|
2016-06-10 15:41:13 +02:00
|
|
|
src/libwalletqt/TransactionInfo.cpp \
|
2016-11-20 13:36:14 +01:00
|
|
|
src/libwalletqt/QRCodeImageProvider.cpp \
|
2019-11-28 13:05:07 +01:00
|
|
|
src/main/oshelper.cpp \
|
2020-04-06 18:57:32 +02:00
|
|
|
src/openpgp/openpgp.cpp \
|
2019-11-28 13:05:07 +01:00
|
|
|
src/TranslationManager.cpp \
|
2016-10-07 22:05:51 +02:00
|
|
|
src/model/TransactionHistoryModel.cpp \
|
2016-11-20 13:36:14 +01:00
|
|
|
src/model/TransactionHistorySortFilterModel.cpp \
|
|
|
|
src/QR-Code-generator/BitBuffer.cpp \
|
|
|
|
src/QR-Code-generator/QrCode.cpp \
|
2016-11-25 21:08:39 +01:00
|
|
|
src/QR-Code-generator/QrSegment.cpp \
|
2016-12-10 02:01:04 +01:00
|
|
|
src/model/AddressBookModel.cpp \
|
2016-12-16 00:47:53 +01:00
|
|
|
src/libwalletqt/AddressBook.cpp \
|
2017-07-04 05:34:09 +02:00
|
|
|
src/model/SubaddressModel.cpp \
|
|
|
|
src/libwalletqt/Subaddress.cpp \
|
2019-01-14 13:25:59 +01:00
|
|
|
src/model/SubaddressAccountModel.cpp \
|
|
|
|
src/libwalletqt/SubaddressAccount.cpp \
|
2017-01-12 20:53:27 +01:00
|
|
|
src/zxcvbn-c/zxcvbn.c \
|
2017-01-31 05:36:08 +01:00
|
|
|
src/libwalletqt/UnsignedTransaction.cpp \
|
2019-11-28 13:05:07 +01:00
|
|
|
src/main/Logger.cpp \
|
|
|
|
src/main/MainApp.cpp \
|
2020-04-04 15:22:25 +02:00
|
|
|
src/qt/downloader.cpp \
|
2019-06-20 22:28:59 +02:00
|
|
|
src/qt/FutureScheduler.cpp \
|
2019-03-22 21:02:08 +01:00
|
|
|
src/qt/ipc.cpp \
|
2019-05-02 00:41:09 +02:00
|
|
|
src/qt/KeysFiles.cpp \
|
2020-03-31 18:29:28 +02:00
|
|
|
src/qt/network.cpp \
|
2020-04-06 18:57:32 +02:00
|
|
|
src/qt/updater.cpp \
|
2019-05-01 04:05:16 +02:00
|
|
|
src/qt/utils.cpp \
|
2019-07-03 05:13:51 +02:00
|
|
|
src/qt/MoneroSettings.cpp \
|
|
|
|
src/qt/TailsOS.cpp
|
2014-07-07 19:08:30 +02:00
|
|
|
|
2017-12-24 02:29:08 +01:00
|
|
|
CONFIG(DISABLE_PASS_STRENGTH_METER) {
|
|
|
|
HEADERS -= src/zxcvbn-c/zxcvbn.h
|
|
|
|
SOURCES -= src/zxcvbn-c/zxcvbn.c
|
|
|
|
DEFINES += "DISABLE_PASS_STRENGTH_METER"
|
|
|
|
}
|
|
|
|
|
2017-01-29 19:47:00 +01:00
|
|
|
!ios {
|
|
|
|
HEADERS += src/daemon/DaemonManager.h
|
|
|
|
SOURCES += src/daemon/DaemonManager.cpp
|
|
|
|
}
|
|
|
|
|
2016-01-29 20:01:52 +01:00
|
|
|
lupdate_only {
|
|
|
|
SOURCES = *.qml \
|
|
|
|
components/*.qml \
|
2019-04-11 03:17:29 +02:00
|
|
|
components/effects/*.qml \
|
2016-01-29 20:01:52 +01:00
|
|
|
pages/*.qml \
|
2018-10-01 16:21:19 +02:00
|
|
|
pages/settings/*.qml \
|
2018-12-08 16:55:29 +01:00
|
|
|
pages/merchant/*.qml \
|
2016-09-05 21:07:53 +02:00
|
|
|
wizard/*.qml \
|
|
|
|
wizard/*js
|
2016-01-29 20:01:52 +01:00
|
|
|
}
|
|
|
|
|
2018-12-17 22:10:21 +01:00
|
|
|
# Linker flags required by Trezor
|
|
|
|
TREZOR_LINKER = $$cat($$WALLET_ROOT/lib/trezor_link_flags.txt)
|
2017-01-29 19:47:00 +01:00
|
|
|
|
|
|
|
ios:armv7 {
|
|
|
|
message("target is armv7")
|
|
|
|
LIBS += \
|
2017-04-03 18:51:55 +02:00
|
|
|
-L$$PWD/../ofxiOSBoost/build/libs/boost/lib/armv7 \
|
2017-01-29 19:47:00 +01:00
|
|
|
}
|
|
|
|
ios:arm64 {
|
|
|
|
message("target is arm64")
|
|
|
|
LIBS += \
|
2017-04-03 18:51:55 +02:00
|
|
|
-L$$PWD/../ofxiOSBoost/build/libs/boost/lib/arm64 \
|
2017-01-29 19:47:00 +01:00
|
|
|
}
|
2019-09-28 14:14:07 +02:00
|
|
|
|
|
|
|
LIBS_COMMON = \
|
2020-04-06 18:57:32 +02:00
|
|
|
-lgcrypt \
|
|
|
|
-lgpg-error \
|
2019-09-28 14:14:07 +02:00
|
|
|
-lwallet_merged \
|
|
|
|
-llmdb \
|
|
|
|
-lepee \
|
|
|
|
-lunbound \
|
|
|
|
-lsodium \
|
|
|
|
-leasylogging \
|
|
|
|
-lrandomx
|
|
|
|
|
2017-08-07 14:52:34 +02:00
|
|
|
!ios:!android {
|
2019-09-28 14:14:07 +02:00
|
|
|
LIBS += -L$$WALLET_ROOT/lib \
|
|
|
|
$$LIBS_COMMON
|
2017-01-29 19:47:00 +01:00
|
|
|
}
|
|
|
|
|
2017-08-07 14:52:34 +02:00
|
|
|
android {
|
|
|
|
message("Host is Android")
|
|
|
|
LIBS += -L$$WALLET_ROOT/lib \
|
2019-09-28 14:14:07 +02:00
|
|
|
$$LIBS_COMMON
|
2017-08-07 14:52:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-09 12:46:12 +01:00
|
|
|
QMAKE_CXXFLAGS += -Werror -Wformat -Wformat-security
|
|
|
|
QMAKE_CFLAGS += -Werror -Wformat -Wformat-security
|
|
|
|
QMAKE_CXXFLAGS_RELEASE += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2
|
|
|
|
QMAKE_CFLAGS_RELEASE += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2
|
2017-04-03 18:51:55 +02:00
|
|
|
|
2017-01-29 19:47:00 +01:00
|
|
|
ios {
|
|
|
|
message("Host is IOS")
|
|
|
|
|
|
|
|
QMAKE_LFLAGS += -v
|
|
|
|
QMAKE_IOS_DEVICE_ARCHS = arm64
|
|
|
|
CONFIG += arm64
|
|
|
|
LIBS += -L$$WALLET_ROOT/lib-ios \
|
2019-09-28 14:14:07 +02:00
|
|
|
$$LIBS_COMMON
|
2016-07-04 17:17:26 +02:00
|
|
|
|
2017-01-29 19:47:00 +01:00
|
|
|
LIBS+= \
|
2017-04-03 18:51:55 +02:00
|
|
|
-L$$PWD/../OpenSSL-for-iPhone/lib \
|
|
|
|
-L$$PWD/../ofxiOSBoost/build/libs/boost/lib/arm64 \
|
2017-01-29 19:47:00 +01:00
|
|
|
-lboost_serialization \
|
|
|
|
-lboost_thread \
|
|
|
|
-lboost_system \
|
|
|
|
-lboost_date_time \
|
|
|
|
-lboost_filesystem \
|
|
|
|
-lboost_regex \
|
|
|
|
-lboost_chrono \
|
|
|
|
-lboost_program_options \
|
|
|
|
-lssl \
|
|
|
|
-lcrypto \
|
|
|
|
-ldl
|
|
|
|
}
|
|
|
|
|
2017-01-31 05:36:08 +01:00
|
|
|
CONFIG(WITH_SCANNER) {
|
|
|
|
if( greaterThan(QT_MINOR_VERSION, 5) ) {
|
|
|
|
message("using camera scanner")
|
2017-03-27 19:39:47 +02:00
|
|
|
QT += multimedia
|
2017-01-31 05:36:08 +01:00
|
|
|
DEFINES += "WITH_SCANNER"
|
2017-03-27 19:39:47 +02:00
|
|
|
INCLUDEPATH += $$PWD/src/QR-Code-scanner
|
|
|
|
HEADERS += \
|
|
|
|
src/QR-Code-scanner/QrScanThread.h \
|
|
|
|
src/QR-Code-scanner/QrCodeScanner.h
|
|
|
|
SOURCES += \
|
|
|
|
src/QR-Code-scanner/QrScanThread.cpp \
|
|
|
|
src/QR-Code-scanner/QrCodeScanner.cpp
|
2017-01-31 05:36:08 +01:00
|
|
|
android {
|
|
|
|
INCLUDEPATH += $$PWD/../ZBar/include
|
|
|
|
LIBS += -lzbarjni -liconv
|
|
|
|
} else {
|
|
|
|
LIBS += -lzbar
|
2020-04-16 03:13:07 +02:00
|
|
|
macx {
|
|
|
|
ZBAR_DIR = $$system(brew --prefix zbar, lines, EXIT_CODE)
|
|
|
|
equals(EXIT_CODE, 0) {
|
|
|
|
INCLUDEPATH += $$ZBAR_DIR/include
|
|
|
|
} else {
|
|
|
|
INCLUDEPATH += /usr/local/include
|
|
|
|
}
|
|
|
|
}
|
2017-01-31 05:36:08 +01:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
message("Skipping camera scanner because of Incompatible Qt Version !")
|
|
|
|
}
|
|
|
|
}
|
2016-10-21 23:28:49 +02:00
|
|
|
|
2017-01-29 19:47:00 +01:00
|
|
|
|
2016-10-21 23:28:49 +02:00
|
|
|
# currently we only support x86 build as qt.io only provides prebuilt qt for x86 mingw
|
|
|
|
|
2016-07-04 17:17:26 +02:00
|
|
|
win32 {
|
2016-11-09 08:55:31 +01:00
|
|
|
|
2017-03-04 12:17:51 +01:00
|
|
|
# QMAKE_HOST.arch is unreliable, will allways report 32bit if mingw32 shell is run.
|
|
|
|
# Obtaining arch through uname should be reliable. This also fixes building the project in Qt creator without changes.
|
|
|
|
MSYS_HOST_ARCH = $$system(uname -a | grep -o "x86_64")
|
|
|
|
|
2017-03-08 14:05:02 +01:00
|
|
|
# WIN64 Host settings
|
2017-03-04 12:17:51 +01:00
|
|
|
contains(MSYS_HOST_ARCH, x86_64) {
|
2016-10-21 23:28:49 +02:00
|
|
|
message("Host is 64bit")
|
2017-03-08 14:05:02 +01:00
|
|
|
MSYS_ROOT_PATH=c:/msys64
|
2016-12-13 21:57:14 +01:00
|
|
|
|
|
|
|
# WIN32 Host settings
|
2016-10-21 23:28:49 +02:00
|
|
|
} else {
|
|
|
|
message("Host is 32bit")
|
2017-03-08 14:05:02 +01:00
|
|
|
MSYS_ROOT_PATH=c:/msys32
|
|
|
|
}
|
2016-10-21 23:28:49 +02:00
|
|
|
|
2017-03-08 14:05:02 +01:00
|
|
|
# WIN64 Target settings
|
|
|
|
contains(QMAKE_HOST.arch, x86_64) {
|
2017-03-08 14:21:35 +01:00
|
|
|
MSYS_MINGW_PATH=/mingw64
|
2016-12-04 20:03:24 +01:00
|
|
|
|
2017-03-08 14:05:02 +01:00
|
|
|
# WIN32 Target settings
|
|
|
|
} else {
|
2017-03-08 14:21:35 +01:00
|
|
|
MSYS_MINGW_PATH=/mingw32
|
2016-10-21 23:28:49 +02:00
|
|
|
}
|
2017-03-08 14:05:02 +01:00
|
|
|
|
|
|
|
MSYS_PATH=$$MSYS_ROOT_PATH$$MSYS_MINGW_PATH
|
|
|
|
|
|
|
|
# boost root path
|
|
|
|
BOOST_PATH=$$MSYS_PATH/boost
|
|
|
|
BOOST_MINGW_PATH=$$MSYS_MINGW_PATH/boost
|
2016-10-21 23:28:49 +02:00
|
|
|
|
|
|
|
LIBS+=-L$$MSYS_PATH/lib
|
2017-03-04 04:23:20 +01:00
|
|
|
LIBS+=-L$$MSYS_MINGW_PATH/lib
|
2016-12-04 20:03:24 +01:00
|
|
|
LIBS+=-L$$BOOST_PATH/lib
|
2017-03-04 04:23:20 +01:00
|
|
|
LIBS+=-L$$BOOST_MINGW_PATH/lib
|
2016-12-13 21:57:14 +01:00
|
|
|
|
2019-05-22 12:54:05 +02:00
|
|
|
QMAKE_LFLAGS += -static-libgcc -static-libstdc++
|
|
|
|
|
2016-07-04 17:17:26 +02:00
|
|
|
LIBS+= \
|
2019-05-22 13:19:09 +02:00
|
|
|
-Wl,-Bdynamic \
|
|
|
|
-lwinscard \
|
|
|
|
-lwsock32 \
|
|
|
|
-lIphlpapi \
|
|
|
|
-lcrypt32 \
|
|
|
|
-lhidapi \
|
|
|
|
-lgdi32 $$TREZOR_LINKER \
|
2016-07-04 17:17:26 +02:00
|
|
|
-Wl,-Bstatic \
|
2018-03-29 20:53:54 +02:00
|
|
|
-lboost_serialization-mt \
|
|
|
|
-lboost_thread-mt \
|
|
|
|
-lboost_system-mt \
|
|
|
|
-lboost_date_time-mt \
|
|
|
|
-lboost_filesystem-mt \
|
|
|
|
-lboost_regex-mt \
|
|
|
|
-lboost_chrono-mt \
|
|
|
|
-lboost_program_options-mt \
|
|
|
|
-lboost_locale-mt \
|
2018-02-25 14:20:28 +01:00
|
|
|
-licuio \
|
|
|
|
-licuin \
|
|
|
|
-licuuc \
|
|
|
|
-licudt \
|
|
|
|
-licutu \
|
|
|
|
-liconv \
|
2019-08-20 16:17:46 +02:00
|
|
|
-lstdc++ \
|
2019-05-22 12:54:05 +02:00
|
|
|
-lpthread \
|
2019-05-22 13:19:09 +02:00
|
|
|
-lsetupapi \
|
2016-07-04 17:17:26 +02:00
|
|
|
-lssl \
|
2018-10-10 02:24:33 +02:00
|
|
|
-lsodium \
|
2019-06-01 06:50:56 +02:00
|
|
|
-lcrypto \
|
2019-12-30 13:29:17 +01:00
|
|
|
-lws2_32 \
|
|
|
|
-lole32
|
2016-12-13 21:57:14 +01:00
|
|
|
|
|
|
|
!contains(QMAKE_TARGET.arch, x86_64) {
|
|
|
|
message("Target is 32bit")
|
|
|
|
## Windows x86 (32bit) specific build here
|
|
|
|
## there's 2Mb stack in libwallet allocated internally, so we set stack=4Mb
|
|
|
|
## this fixes app crash for x86 Windows build
|
|
|
|
QMAKE_LFLAGS += -Wl,--stack,4194304
|
|
|
|
} else {
|
|
|
|
message("Target is 64bit")
|
|
|
|
}
|
2016-10-19 14:44:03 +02:00
|
|
|
|
2018-03-03 23:56:52 +01:00
|
|
|
QMAKE_LFLAGS += -Wl,--dynamicbase -Wl,--nxcompat
|
2016-07-04 17:17:26 +02:00
|
|
|
}
|
|
|
|
|
2016-07-14 15:05:40 +02:00
|
|
|
linux {
|
2016-12-22 10:10:03 +01:00
|
|
|
CONFIG(static) {
|
|
|
|
message("using static libraries")
|
2017-02-07 20:10:17 +01:00
|
|
|
LIBS+= -Wl,-Bstatic
|
|
|
|
QMAKE_LFLAGS += -static-libgcc -static-libstdc++
|
2019-04-16 02:52:28 +02:00
|
|
|
QMAKE_LIBDIR += /usr/local/ssl/lib
|
2017-03-27 21:42:01 +02:00
|
|
|
# contains(QT_ARCH, x86_64) {
|
2018-11-02 02:31:08 +01:00
|
|
|
LIBS+= -lunbound \
|
|
|
|
-lusb-1.0 \
|
|
|
|
-lhidapi-hidraw \
|
|
|
|
-ludev
|
2017-03-27 21:42:01 +02:00
|
|
|
# }
|
2017-02-24 03:23:06 +01:00
|
|
|
} else {
|
2017-02-24 03:23:55 +01:00
|
|
|
# On some distro's we need to add dynload
|
2017-02-24 03:23:06 +01:00
|
|
|
LIBS+= -ldl
|
2016-12-22 10:10:03 +01:00
|
|
|
}
|
2017-02-07 20:10:17 +01:00
|
|
|
|
2016-07-04 17:17:26 +02:00
|
|
|
LIBS+= \
|
2016-05-27 10:00:26 +02:00
|
|
|
-lboost_serialization \
|
|
|
|
-lboost_thread \
|
|
|
|
-lboost_system \
|
|
|
|
-lboost_date_time \
|
|
|
|
-lboost_filesystem \
|
2016-07-04 17:17:26 +02:00
|
|
|
-lboost_regex \
|
|
|
|
-lboost_chrono \
|
2016-07-13 09:30:12 +02:00
|
|
|
-lboost_program_options \
|
|
|
|
-lssl \
|
2018-03-27 02:03:59 +02:00
|
|
|
-llmdb \
|
2018-10-10 02:24:33 +02:00
|
|
|
-lsodium \
|
2018-10-16 22:27:52 +02:00
|
|
|
-lhidapi-libusb \
|
2019-08-10 22:09:30 +02:00
|
|
|
-lcrypto $$TREZOR_LINKER
|
2017-02-24 17:29:35 +01:00
|
|
|
|
|
|
|
if(!android) {
|
|
|
|
LIBS+= \
|
|
|
|
-Wl,-Bdynamic \
|
2019-08-10 22:09:30 +02:00
|
|
|
-lGL \
|
|
|
|
-lX11
|
2017-02-24 17:29:35 +01:00
|
|
|
}
|
2016-09-22 20:39:43 +02:00
|
|
|
# currently monero has an issue with "static" build and linunwind-dev,
|
|
|
|
# so we link libunwind-dev only for non-Ubuntu distros
|
|
|
|
CONFIG(libunwind_off) {
|
|
|
|
message(Building without libunwind)
|
|
|
|
} else {
|
|
|
|
message(Building with libunwind)
|
|
|
|
LIBS += -Wl,-Bdynamic -lunwind
|
|
|
|
}
|
2018-03-03 23:56:52 +01:00
|
|
|
|
|
|
|
QMAKE_LFLAGS += -pie -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack
|
2016-07-04 17:17:26 +02:00
|
|
|
}
|
2016-05-27 10:00:26 +02:00
|
|
|
|
2016-07-14 15:05:40 +02:00
|
|
|
macx {
|
2016-12-22 10:10:03 +01:00
|
|
|
# mixing static and shared libs are not supported on mac
|
|
|
|
# CONFIG(static) {
|
|
|
|
# message("using static libraries")
|
|
|
|
# LIBS+= -Wl,-Bstatic
|
|
|
|
# }
|
2019-11-25 15:30:28 +01:00
|
|
|
|
2020-03-08 16:30:34 +01:00
|
|
|
OPENSSL_DIR = $$system(brew --prefix openssl, lines, EXIT_CODE)
|
|
|
|
!equals(EXIT_CODE, 0) {
|
|
|
|
OPENSSL_DIR = /usr/local/ssl
|
|
|
|
}
|
|
|
|
OPENSSL_LIBRARY_DIR = $$OPENSSL_DIR/lib
|
|
|
|
INCLUDEPATH += $$OPENSSL_DIR/include
|
|
|
|
|
|
|
|
BOOST_DIR = $$system(brew --prefix boost, lines, EXIT_CODE)
|
2019-11-25 15:30:28 +01:00
|
|
|
equals(EXIT_CODE, 0) {
|
2020-03-08 16:30:34 +01:00
|
|
|
INCLUDEPATH += $$BOOST_DIR/include
|
2019-11-25 15:30:28 +01:00
|
|
|
} else {
|
2020-03-08 16:30:34 +01:00
|
|
|
INCLUDEPATH += /usr/local/include
|
2019-11-25 15:30:28 +01:00
|
|
|
}
|
|
|
|
|
2020-04-06 18:57:32 +02:00
|
|
|
GCRYPT_DIR = $$system(brew --prefix libgcrypt, lines, EXIT_CODE)
|
|
|
|
equals(EXIT_CODE, 0) {
|
|
|
|
INCLUDEPATH += $$GCRYPT_DIR/include
|
|
|
|
} else {
|
|
|
|
INCLUDEPATH += /usr/local/include
|
|
|
|
}
|
|
|
|
|
|
|
|
GPGP_ERROR_DIR = $$system(brew --prefix libgpg-error, lines, EXIT_CODE)
|
|
|
|
equals(EXIT_CODE, 0) {
|
|
|
|
INCLUDEPATH += $$GPGP_ERROR_DIR/include
|
|
|
|
} else {
|
|
|
|
INCLUDEPATH += /usr/local/include
|
|
|
|
}
|
|
|
|
|
2020-06-10 14:26:52 +02:00
|
|
|
SODIUM_DIR = $$system(brew --prefix libsodium, lines, EXIT_CODE)
|
|
|
|
equals(EXIT_CODE, 0) {
|
|
|
|
INCLUDEPATH += $$SODIUM_DIR/include
|
|
|
|
} else {
|
|
|
|
INCLUDEPATH += /usr/local/include
|
|
|
|
}
|
|
|
|
|
2019-07-01 11:44:33 +02:00
|
|
|
QT += macextras
|
|
|
|
OBJECTIVE_SOURCES += src/qt/macoshelper.mm
|
2020-01-12 15:40:51 +01:00
|
|
|
LIBS+= -Wl,-dead_strip
|
|
|
|
LIBS+= -Wl,-dead_strip_dylibs
|
|
|
|
LIBS+= -Wl,-bind_at_load
|
2016-07-14 15:05:40 +02:00
|
|
|
LIBS+= \
|
2016-11-09 08:55:31 +01:00
|
|
|
-L/usr/local/lib \
|
2020-03-08 16:30:34 +01:00
|
|
|
-L$$OPENSSL_LIBRARY_DIR \
|
2016-11-09 08:55:31 +01:00
|
|
|
-L/usr/local/opt/boost/lib \
|
|
|
|
-lboost_serialization \
|
2016-07-21 15:29:37 +02:00
|
|
|
-lboost_thread-mt \
|
2016-07-14 15:05:40 +02:00
|
|
|
-lboost_system \
|
|
|
|
-lboost_date_time \
|
|
|
|
-lboost_filesystem \
|
|
|
|
-lboost_regex \
|
|
|
|
-lboost_chrono \
|
|
|
|
-lboost_program_options \
|
2019-04-28 03:11:15 +02:00
|
|
|
-framework CoreFoundation \
|
2019-07-01 11:44:33 +02:00
|
|
|
-framework AppKit \
|
2019-04-28 03:11:15 +02:00
|
|
|
-lhidapi \
|
2016-07-14 15:05:40 +02:00
|
|
|
-lssl \
|
2018-10-10 02:24:33 +02:00
|
|
|
-lsodium \
|
2016-07-14 15:05:40 +02:00
|
|
|
-lcrypto \
|
2018-12-17 22:10:21 +01:00
|
|
|
-ldl $$TREZOR_LINKER
|
2016-07-25 15:24:07 +02:00
|
|
|
|
2018-03-07 03:42:45 +01:00
|
|
|
QMAKE_LFLAGS += -pie
|
2016-07-14 15:05:40 +02:00
|
|
|
}
|
|
|
|
|
2016-05-27 10:00:26 +02:00
|
|
|
|
2016-07-27 21:32:33 +02:00
|
|
|
# translation stuff
|
2018-04-23 13:51:11 +02:00
|
|
|
TRANSLATIONS = $$files($$PWD/translations/monero-core_*.ts)
|
2016-07-22 14:50:51 +02:00
|
|
|
|
2016-07-27 21:32:33 +02:00
|
|
|
CONFIG(release, debug|release) {
|
2016-08-03 14:59:42 +02:00
|
|
|
DESTDIR = release/bin
|
2019-06-01 07:58:56 +02:00
|
|
|
LANGUPD_OPTIONS = -locations none -no-ui-lines -no-obsolete
|
2016-07-27 21:32:33 +02:00
|
|
|
LANGREL_OPTIONS = -compress -nounfinished -removeidentical
|
|
|
|
|
|
|
|
} else {
|
2016-08-03 14:59:42 +02:00
|
|
|
DESTDIR = debug/bin
|
2016-07-27 21:32:33 +02:00
|
|
|
LANGUPD_OPTIONS =
|
2017-02-13 18:28:04 +01:00
|
|
|
# LANGREL_OPTIONS = -markuntranslated "MISS_TR "
|
2016-07-27 21:32:33 +02:00
|
|
|
}
|
2016-07-25 15:24:07 +02:00
|
|
|
|
2018-04-23 13:51:11 +02:00
|
|
|
TRANSLATION_TARGET_DIR = $$OUT_PWD/translations
|
2016-08-03 14:59:42 +02:00
|
|
|
|
2017-01-29 19:47:00 +01:00
|
|
|
!ios {
|
|
|
|
isEmpty(QMAKE_LUPDATE) {
|
|
|
|
win32:LANGUPD = $$[QT_INSTALL_BINS]\lupdate.exe
|
|
|
|
else:LANGUPD = $$[QT_INSTALL_BINS]/lupdate
|
|
|
|
}
|
2016-01-29 20:01:52 +01:00
|
|
|
|
2017-01-29 19:47:00 +01:00
|
|
|
isEmpty(QMAKE_LRELEASE) {
|
|
|
|
win32:LANGREL = $$[QT_INSTALL_BINS]\lrelease.exe
|
|
|
|
else:LANGREL = $$[QT_INSTALL_BINS]/lrelease
|
|
|
|
}
|
|
|
|
|
|
|
|
langupd.command = \
|
|
|
|
$$LANGUPD $$LANGUPD_OPTIONS $$shell_path($$_PRO_FILE) -ts $$_PRO_FILE_PWD/$$TRANSLATIONS
|
2016-01-25 19:36:33 +01:00
|
|
|
|
|
|
|
|
2016-07-27 21:32:33 +02:00
|
|
|
|
2017-01-29 19:47:00 +01:00
|
|
|
langrel.depends = langupd
|
|
|
|
langrel.input = TRANSLATIONS
|
|
|
|
langrel.output = $$TRANSLATION_TARGET_DIR/${QMAKE_FILE_BASE}.qm
|
|
|
|
langrel.commands = \
|
|
|
|
$$LANGREL $$LANGREL_OPTIONS ${QMAKE_FILE_IN} -qm $$TRANSLATION_TARGET_DIR/${QMAKE_FILE_BASE}.qm
|
|
|
|
langrel.CONFIG += no_link
|
|
|
|
|
|
|
|
QMAKE_EXTRA_TARGETS += langupd deploy deploy_win
|
|
|
|
QMAKE_EXTRA_COMPILERS += langrel
|
2016-08-16 22:21:46 +02:00
|
|
|
|
2018-04-23 13:51:11 +02:00
|
|
|
# Compile an initial version of translation files when running qmake
|
|
|
|
# the first time and generate the resource file for translations.
|
|
|
|
!exists($$TRANSLATION_TARGET_DIR) {
|
|
|
|
mkpath($$TRANSLATION_TARGET_DIR)
|
|
|
|
}
|
|
|
|
qrc_entry = "<RCC>"
|
|
|
|
qrc_entry += ' <qresource prefix="/">'
|
|
|
|
write_file($$TRANSLATION_TARGET_DIR/translations.qrc, qrc_entry)
|
|
|
|
for(tsfile, TRANSLATIONS) {
|
|
|
|
qmfile = $$TRANSLATION_TARGET_DIR/$$basename(tsfile)
|
|
|
|
qmfile ~= s/.ts$/.qm/
|
|
|
|
system($$LANGREL $$LANGREL_OPTIONS $$tsfile -qm $$qmfile)
|
|
|
|
qrc_entry = " <file>$$basename(qmfile)</file>"
|
|
|
|
write_file($$TRANSLATION_TARGET_DIR/translations.qrc, qrc_entry, append)
|
|
|
|
}
|
|
|
|
qrc_entry = " </qresource>"
|
|
|
|
qrc_entry += "</RCC>"
|
|
|
|
write_file($$TRANSLATION_TARGET_DIR/translations.qrc, qrc_entry, append)
|
|
|
|
RESOURCES += $$TRANSLATION_TARGET_DIR/translations.qrc
|
|
|
|
}
|
2016-08-16 22:21:46 +02:00
|
|
|
|
2016-08-17 14:14:43 +02:00
|
|
|
|
2016-11-16 00:33:19 +01:00
|
|
|
# Update: no issues with the "slow link process" anymore,
|
|
|
|
# for development, just build debug version of libwallet_merged lib
|
|
|
|
# by invoking 'get_libwallet_api.sh Debug'
|
|
|
|
# so we update translations everytime even for debug build
|
|
|
|
|
|
|
|
PRE_TARGETDEPS += langupd compiler_langrel_make_all
|
|
|
|
|
2014-07-07 19:08:30 +02:00
|
|
|
RESOURCES += qml.qrc
|
2017-04-03 18:51:55 +02:00
|
|
|
CONFIG += qtquickcompiler
|
2014-07-07 19:08:30 +02:00
|
|
|
|
|
|
|
# Additional import path used to resolve QML modules in Qt Creator's code model
|
2019-02-01 17:57:30 +01:00
|
|
|
QML_IMPORT_PATH = fonts
|
2014-07-07 19:08:30 +02:00
|
|
|
|
|
|
|
# Default rules for deployment.
|
|
|
|
include(deployment.pri)
|
2016-07-27 21:32:33 +02:00
|
|
|
macx {
|
2016-07-27 22:17:21 +02:00
|
|
|
deploy.commands += macdeployqt $$sprintf("%1/%2/%3.app", $$OUT_PWD, $$DESTDIR, $$TARGET) -qmldir=$$PWD
|
2016-07-27 21:32:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
win32 {
|
2020-08-23 15:28:12 +02:00
|
|
|
deploy.commands += windeployqt $$sprintf("%1/%2/%3.exe", $$OUT_PWD, $$DESTDIR, $$TARGET) -no-translations -qmldir=$$PWD
|
2016-12-13 21:57:14 +01:00
|
|
|
# Win64 msys2 deploy settings
|
|
|
|
contains(QMAKE_HOST.arch, x86_64) {
|
|
|
|
deploy.commands += $$escape_expand(\n\t) $$PWD/windeploy_helper.sh $$DESTDIR
|
|
|
|
}
|
2016-07-27 21:32:33 +02:00
|
|
|
}
|
|
|
|
|
2017-01-01 05:55:49 +01:00
|
|
|
linux:!android {
|
2016-12-20 16:44:01 +01:00
|
|
|
deploy.commands += $$escape_expand(\n\t) $$PWD/linuxdeploy_helper.sh $$DESTDIR $$TARGET
|
|
|
|
}
|
|
|
|
|
2017-01-01 05:55:49 +01:00
|
|
|
android{
|
|
|
|
deploy.commands += make install INSTALL_ROOT=$$DESTDIR && androiddeployqt --input android-libmonero-wallet-gui.so-deployment-settings.json --output $$DESTDIR --deployment bundled --android-platform android-21 --jdk /usr/lib/jvm/java-8-openjdk-amd64 -qmldir=$$PWD
|
|
|
|
}
|
2014-07-07 19:08:30 +02:00
|
|
|
|
2016-02-06 17:19:54 +01:00
|
|
|
|
2016-02-06 13:58:55 +01:00
|
|
|
OTHER_FILES += \
|
2016-02-06 13:49:31 +01:00
|
|
|
.gitignore \
|
2016-07-15 10:03:18 +02:00
|
|
|
$$TRANSLATIONS
|
2016-02-06 13:58:55 +01:00
|
|
|
|
2016-02-23 16:59:26 +01:00
|
|
|
DISTFILES += \
|
2017-01-12 20:53:27 +01:00
|
|
|
notes.txt \
|
2019-01-14 01:02:44 +01:00
|
|
|
monero/src/wallet/CMakeLists.txt
|
2016-08-17 14:14:43 +02:00
|
|
|
|
2019-11-12 01:17:41 +01:00
|
|
|
VERSION = $$cat('version.js', lines)
|
|
|
|
VERSION = $$find(VERSION, 'GUI_VERSION')
|
2020-07-10 15:37:04 +02:00
|
|
|
VERSION_LONG = $$replace(VERSION, '.*\"(.*)\"', '\1')
|
2019-11-12 01:17:41 +01:00
|
|
|
VERSION = $$replace(VERSION, '.*(\d+\.\d+\.\d+\.\d+).*', '\1')
|
2016-08-04 13:16:38 +02:00
|
|
|
|
2016-08-04 13:52:33 +02:00
|
|
|
# windows application icon
|
2018-04-26 20:04:55 +02:00
|
|
|
RC_ICONS = images/appicon.ico
|
2016-08-04 13:52:33 +02:00
|
|
|
|
2018-05-02 17:27:22 +02:00
|
|
|
# mac Info.plist & application icon
|
|
|
|
QMAKE_INFO_PLIST = $$PWD/share/Info.plist
|
2020-02-13 03:19:18 +01:00
|
|
|
macx {
|
|
|
|
QMAKE_POST_LINK += sed -i "''" -e "s/@VERSION@/$$VERSION/g" -e "s/@VERSION_LONG@/$$VERSION_LONG/g" "$$sprintf("%1/%2/%3.app", $$OUT_PWD, $$DESTDIR, $$TARGET)/Contents/Info.plist";
|
|
|
|
}
|
2016-08-04 13:52:33 +02:00
|
|
|
ICON = $$PWD/images/appicon.icns
|