forked from Yubico/yubioath-flutter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
yubioath-desktop.pro
77 lines (63 loc) · 1.77 KB
/
yubioath-desktop.pro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
TEMPLATE = app
QT += qml quick widgets quickcontrols2
CONFIG += c++11
SOURCES += main.cpp
HEADERS += screenshot.h
# This is the internal verson number, Windows requires 4 digits.
win32|win64 {
VERSION = 5.0.4.0
QMAKE_TARGET_COMPANY = Yubico
QMAKE_TARGET_PRODUCT = Yubico Authenticator
QMAKE_TARGET_DESCRIPTION = Yubico Authenticator
QMAKE_TARGET_COPYRIGHT = Copyright (c) 2020 Yubico AB
} else {
VERSION = 5.0.4
}
# This is the version shown on the About page
DEFINES += APP_VERSION=\\\"5.0.4\\\"
message(Version of this build: $$VERSION)
win32|win64 {
PYTHON_CMD = python
} else {
PYTHON_CMD = python3
}
buildqrc.commands = $$PYTHON_CMD build_qrc.py ${QMAKE_FILE_IN}
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
system($$PYTHON_CMD build_qrc.py resources.json)
# 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
}
macx {
pip.commands = python3 -m venv pymodules && source pymodules/bin/activate && pip3 install -r requirements.txt && deactivate
}
!macx {
pip.commands = pip3 install -r requirements.txt --target pymodules
}
# Default rules for deployment.
include(deployment.pri)
# Icon file
RC_ICONS = resources/icons/com.yubico.yubioath.ico
# Mac specific configuration
macx {
ICON = resources/icons/com.yubico.yubioath.icns
QMAKE_INFO_PLIST = resources/mac/Info.plist.in
}
# For generating a XML file with all strings.
lupdate_only {
SOURCES = qml/*.qml \
qml/slot/*.qml
}
DISTFILES += \
py/* \
py/qr/* \
qml/* \