2017-01-27 15:55:38 +03:00
|
|
|
TEMPLATE = app
|
2019-09-09 15:12:58 +03:00
|
|
|
QT += qml quick widgets quickcontrols2
|
2017-01-27 15:55:38 +03:00
|
|
|
CONFIG += c++11
|
2019-09-09 15:12:58 +03:00
|
|
|
SOURCES += main.cpp
|
|
|
|
HEADERS += screenshot.h
|
2017-11-27 17:52:24 +03:00
|
|
|
|
2018-11-05 11:11:21 +03:00
|
|
|
# This is the internal verson number, Windows requires 4 digits.
|
2017-11-27 17:52:24 +03:00
|
|
|
win32|win64 {
|
2020-02-24 12:06:18 +03:00
|
|
|
VERSION = 5.0.3.0
|
2019-11-29 00:11:32 +03:00
|
|
|
QMAKE_TARGET_COMPANY = Yubico
|
|
|
|
QMAKE_TARGET_PRODUCT = Yubico Authenticator
|
|
|
|
QMAKE_TARGET_DESCRIPTION = Yubico Authenticator
|
2020-01-20 11:34:39 +03:00
|
|
|
QMAKE_TARGET_COPYRIGHT = Copyright (c) 2020 Yubico AB
|
2018-11-05 11:11:21 +03:00
|
|
|
} else {
|
2020-02-24 12:06:18 +03:00
|
|
|
VERSION = 5.0.3
|
2017-11-27 17:52:24 +03:00
|
|
|
}
|
2018-11-05 11:11:21 +03:00
|
|
|
# This is the version shown on the About page
|
2020-02-24 12:06:18 +03:00
|
|
|
DEFINES += APP_VERSION=\\\"5.0.3-BETA\\\"
|
2017-11-22 18:02:34 +03:00
|
|
|
|
2017-11-22 23:04:08 +03:00
|
|
|
message(Version of this build: $$VERSION)
|
2017-11-22 18:02:34 +03:00
|
|
|
|
2020-01-08 14:40:08 +03:00
|
|
|
win32|win64 {
|
2020-01-08 14:56:25 +03:00
|
|
|
PYTHON_CMD = python
|
2020-01-08 14:40:08 +03:00
|
|
|
} else {
|
2020-01-08 14:56:25 +03:00
|
|
|
PYTHON_CMD = python3
|
2020-01-08 14:40:08 +03:00
|
|
|
}
|
|
|
|
|
2020-01-08 14:56:25 +03:00
|
|
|
buildqrc.commands = $$PYTHON_CMD build_qrc.py ${QMAKE_FILE_IN}
|
2017-01-27 15:55:38 +03:00
|
|
|
buildqrc.input = QRC_JSON
|
|
|
|
buildqrc.output = ${QMAKE_FILE_IN_BASE}.qrc
|
|
|
|
buildqrc.variable_out = RESOURCES
|
|
|
|
|
|
|
|
QMAKE_STRIPFLAGS_LIB += --strip-unneeded
|
|
|
|
|
|
|
|
QMAKE_EXTRA_COMPILERS += buildqrc
|
|
|
|
QRC_JSON = resources.json
|
|
|
|
|
|
|
|
# Generate first time
|
2020-01-08 14:56:25 +03:00
|
|
|
system($$PYTHON_CMD build_qrc.py resources.json)
|
2017-01-27 15:55:38 +03:00
|
|
|
|
|
|
|
# Install python dependencies with pip on mac and win
|
|
|
|
win32|macx {
|
|
|
|
pip.target = pymodules
|
|
|
|
QMAKE_EXTRA_TARGETS += pip
|
|
|
|
PRE_TARGETDEPS += pymodules
|
|
|
|
QMAKE_CLEAN += -r pymodules
|
|
|
|
}
|
2017-03-06 11:32:52 +03:00
|
|
|
macx {
|
2017-06-29 12:34:40 +03:00
|
|
|
pip.commands = python3 -m venv pymodules && source pymodules/bin/activate && pip3 install -r requirements.txt && deactivate
|
2017-03-06 11:32:52 +03:00
|
|
|
}
|
2018-02-16 17:36:08 +03:00
|
|
|
!macx {
|
|
|
|
pip.commands = pip3 install -r requirements.txt --target pymodules
|
2017-03-06 11:32:52 +03:00
|
|
|
}
|
2017-01-27 15:55:38 +03:00
|
|
|
|
|
|
|
# Default rules for deployment.
|
|
|
|
include(deployment.pri)
|
|
|
|
|
|
|
|
# Icon file
|
2020-01-17 10:46:53 +03:00
|
|
|
RC_ICONS = resources/icons/com.yubico.yubioath.ico
|
2017-01-27 15:55:38 +03:00
|
|
|
|
|
|
|
# Mac specific configuration
|
|
|
|
macx {
|
2020-01-17 10:46:53 +03:00
|
|
|
ICON = resources/icons/com.yubico.yubioath.icns
|
2017-01-27 15:55:38 +03:00
|
|
|
QMAKE_INFO_PLIST = resources/mac/Info.plist.in
|
|
|
|
}
|
|
|
|
|
|
|
|
# For generating a XML file with all strings.
|
|
|
|
lupdate_only {
|
|
|
|
SOURCES = qml/*.qml \
|
|
|
|
qml/slot/*.qml
|
|
|
|
}
|
|
|
|
|
2017-02-14 15:12:24 +03:00
|
|
|
|
2017-01-27 15:55:38 +03:00
|
|
|
DISTFILES += \
|
2017-02-14 15:12:24 +03:00
|
|
|
py/* \
|
|
|
|
py/qr/* \
|
2019-09-09 15:12:58 +03:00
|
|
|
qml/* \
|