-
Notifications
You must be signed in to change notification settings - Fork 12
/
stackedpages.pro
81 lines (67 loc) · 1.92 KB
/
stackedpages.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
78
79
80
81
TEMPLATE = app
TARGET = stackedpages
QT += qml quick core
CONFIG += c++11 console
HEADERS += \
applicationui.hpp \
uiconstants.hpp
SOURCES += main.cpp \
applicationui.cpp
lupdate_only {
SOURCES += main.qml \
common/*.qml \
pages/*.qml
}
OTHER_FILES += images/black/*.png \
images/black/x18/*.png \
images/black/x36/*.png \
images/black/x48/*.png \
images/white/*.png \
images/white/x18/*.png \
images/white/x36/*.png \
images/white/x48/*.png \
translations/*.* \
images/LICENSE \
LICENSE \
*.md
RESOURCES += \
translations.qrc \
qml.qrc \
images.qrc
# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH =
# Default rules for deployment.
include(deployment.pri)
lupdate_only { # that way those files will be skipped by C++ compiler
SOURCES = *.qml \
pages/*.qml \
common/*.qml
}
#TRANSLATIONS += $$PWD/translations/cn.ts $$PWD/translations/en.ts
# T R A N S L A T I O N S
# if languages are added:
# 1. rebuild project to generate *.qm
# 2. add existing .qm files to translations.qrc
# if changes to translatable strings:
# 1. Run Tools-External-Linguist-Update
# 2. Run Linguist and do translations
# 3. Build and run on iOS and Android to verify translations
# 4. Optional: if translations not done: Run Tools-External-Linguist-Release
# Supported languages
LANGUAGES = en zh_CN
# used to create .ts files
defineReplace(prependAll) {
for(a,$$1):result += $$2$${a}$$3
return($$result)
}
# Available translations
tsroot = $$join(TARGET,,,.ts)
tstarget = $$join(TARGET,,,_)
TRANSLATIONS = $$PWD/translations/$$tsroot
TRANSLATIONS += $$prependAll(LANGUAGES, $$PWD/translations/$$tstarget, .ts)
# run LRELEASE to generate the qm files
qtPrepareTool(LRELEASE, lrelease)
for(tsfile, TRANSLATIONS) {
command = $$LRELEASE $$tsfile
system($$command)|error("Failed to run: $$command")
}