-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtaot.pro
300 lines (259 loc) · 8.33 KB
/
taot.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
######################################################################
#
# TAO Translator
# Copyright (C) 2013-2018 Oleksii Serdiuk <contacts[at]oleksii[dot]name>
#
# $Id: $Format:%h %ai %an$ $
#
# This file is part of TAO Translator.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
######################################################################
TEMPLATE = app
lessThan(QT_MAJOR_VERSION, 5) {
QT += declarative network script
} else {
QT += quick network
}
blackberry:CONFIG += cascades
QMAKE_TARGET_COMPANY = Oleksii Serdiuk
QMAKE_TARGET_PRODUCT = TAO Translator
QMAKE_TARGET_DESCRIPTION = Online translator with some advanced features
QMAKE_TARGET_COPYRIGHT = Copyright © 2013-2018 Oleksii Serdiuk <contacts[at]oleksii[dot]name>
lessThan(QT_MAJOR_VERSION, 5):!blackberry {
include(qmlapplicationviewer/qmlapplicationviewer.pri)
}
analytics {
symbian|contains(MEEGO_EDITION,harmattan) {
CONFIG += mobility
MOBILITY += systeminfo
}
sailfish {
QT += dbus systeminfo
DBUS_INTERFACES += 3rdparty/ssu/org.nemo.ssu.xml
}
include(3rdparty/qtinappanalytics/qtinappanalytics.pri)
DEFINES += WITH_ANALYTICS
}
sailfish {
DEFINES += Q_OS_SAILFISH
}
HEADERS += \
src/translationinterface.h \
src/languagelistmodel.h \
src/translationservice.h \
src/translationservicesmodel.h \
src/l10nmodel.h \
src/updater.h \
src/services/apikeys.h \
src/services/jsontranslationservice.h \
src/services/googletranslate.h \
src/services/microsofttranslator.h \
src/services/yandextranslationservice.h \
src/services/yandextranslate.h \
src/services/yandexdictionaries.h
# The .cpp file which was generated for your project. Feel free to hack it.
SOURCES += \
src/main.cpp \
src/translationinterface.cpp \
src/languagelistmodel.cpp \
src/translationservice.cpp \
src/translationservicesmodel.cpp \
src/l10nmodel.cpp \
src/updater.cpp \
src/services/jsontranslationservice.cpp \
src/services/googletranslate.cpp \
src/services/microsofttranslator.cpp \
src/services/yandextranslationservice.cpp \
src/services/yandextranslate.cpp \
src/services/yandexdictionaries.cpp
blackberry {
HEADERS += \
src/bb10/dictionarymodel.h \
src/bb10/reversetranslationsmodel.h \
src/bb10/languagechangelistener.h \
src/bb10/clipboard.h \
src/bb10/repeater.h
SOURCES += \
src/bb10/dictionarymodel.cpp \
src/bb10/reversetranslationsmodel.cpp \
src/bb10/languagechangelistener.cpp \
src/bb10/clipboard.cpp \
src/bb10/repeater.cpp
LIBS += -lbbplatform -lbbsystem
} else {
HEADERS += \
src/dictionarymodel.h \
src/reversetranslationsmodel.h
SOURCES += \
src/dictionarymodel.cpp \
src/reversetranslationsmodel.cpp
!sailfish {
HEADERS += \
src/clipboard.h
SOURCES += \
src/clipboard.cpp
}
}
symbian {
HEADERS += \
src/symbian/symbianapplication.h
SOURCES += \
src/symbian/symbianapplication.cpp
}
INCLUDEPATH += \
src
RESOURCES += \
data/data.qrc \
l10n/l10n.qrc
TRANSLATIONS += \
l10n/taot_ar.ts \
l10n/taot_bg.ts \
l10n/taot_ca.ts \
l10n/taot_cs_CZ.ts \
l10n/taot_da.ts \
l10n/taot_de.ts \
l10n/taot_el.ts \
l10n/taot_en.ts \
l10n/taot_es.ts \
l10n/taot_fi.ts \
l10n/taot_fr_FR.ts \
l10n/taot_hu.ts \
l10n/taot_it.ts \
l10n/taot_nl_BE.ts \
l10n/taot_nl_NL.ts \
l10n/taot_pl.ts \
l10n/taot_pt.ts \
l10n/taot_ru.ts \
l10n/taot_sv.ts \
l10n/taot_tr.ts \
l10n/taot_uk.ts \
l10n/taot_zh_CN.ts
translate_hack {
SOURCES += \
qml/*.js \
qml/bb10/*.qml \
qml/harmattan/*.qml \
qml/sailfish/*.qml \
qml/symbian/*.qml
}
OTHER_FILES += \
bar-descriptor.xml \
data/*.pem \
data/langs/*.json \
qml/*.js \
qml/bb10/*.qml \
qml/harmattan/*.js \
qml/harmattan/*.qml \
qml/harmattan/icons/* \
qml/sailfish/*.js \
qml/sailfish/*.qml \
qml/sailfish/icons/* \
qml/symbian/*.qml \
qml/symbian/icons/* \
qtc_packaging/debian_harmattan/*
# Extracting version from bar-descriptor.xml file.
BARFILE = $$cat(bar-descriptor.xml)
VERSION = $$find(BARFILE, <versionNumber>.*</versionNumber>)
VERSION = $$replace(VERSION, "<versionNumber>", "")
VERSION = $$replace(VERSION, "</versionNumber>", "")
BUILD = $$find(BARFILE, <buildId>.*</buildId>)
BUILD = $$replace(BUILD, "<buildId>", "")
BUILD = $$replace(BUILD, "</buildId>", "")
isEmpty(BUILD): BUILD = 1
symbian {
DEFINES += VERSION=$$VERSION
} else {
DEFINES += VERSION=\"$$VERSION\"
}
DEFINES += BUILD=$$BUILD
symbian {
CONFIG += qt-components
DEPLOYMENT.display_name = TAO Translator
ICON = taot.svg
TARGET.UID3 = 0xA001635A
TARGET.CAPABILITY += NetworkServices ReadUserData
TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
ui.sources = qml/*.js qml/symbian/* qml/symbian/icons
ui.path = qml
DEPLOYMENT += ui
vendor = \
"%{\"$$QMAKE_TARGET_COMPANY\"}" \
":\"$$QMAKE_TARGET_COMPANY\""
default_deployment.pkg_prerules += vendor
# Next lines replace automatic addition of Qt Components dependency to .sis file
# with the manual one. For some reason, minimal required version is set to 1.0
# instead of 1.1 so we want to replace it with the correct dependency.
CONFIG += qt-components_build
qt-components = \
"; Default dependency to Qt Quick Components for Symbian library" \
"(0x200346DE), 1, 1, 0, {\"Qt Quick components for Symbian\"}"
default_deployment.pkg_prerules += qt-components
!isEmpty(QMLJSDEBUGGER_PATH) {
include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri)
} else {
DEFINES -= QMLJSDEBUGGER
}
}
contains(MEEGO_EDITION,harmattan) {
CONFIG += qt-components qdeclarative-boostable
DEFINES += HARMATTAN_BOOSTER
target.path = /opt/$${TARGET}/bin
ui.files = qml/*.js qml/harmattan/*
ui.path = /opt/$${TARGET}/qml
icon.files = $${TARGET}80.png
icon.path = /usr/share/icons/hicolor/80x80/apps
desktopfile.files = qtc_packaging/$${TARGET}_harmattan.desktop
desktopfile.path = /usr/share/applications
INSTALLS += target ui icon desktopfile
}
# Sailfish
sailfish {
TARGET = harbour-taot
target.path = /usr/bin
libs.files = rpm/lib/$${QT_ARCH}/*
libs.path = /usr/share/$${TARGET}/lib
ui.files = qml/*.js qml/sailfish/*
ui.path = /usr/share/$${TARGET}/qml
icon.files = $${TARGET}.png
icon.path = /usr/share/icons/hicolor/256x256/apps
icon128.files = rpm/icons/128/$${TARGET}.png
icon128.path = /usr/share/icons/hicolor/128x128/apps
icon108.files = rpm/icons/108/$${TARGET}.png
icon108.path = /usr/share/icons/hicolor/108x108/apps
icon86.files = rpm/icons/86/$${TARGET}.png
icon86.path = /usr/share/icons/hicolor/86x86/apps
desktopfile.files = rpm/$${TARGET}.desktop
desktopfile.path = /usr/share/applications
INSTALLS += target libs ui icon icon128 icon108 icon86 desktopfile
CONFIG += link_pkgconfig
PKGCONFIG += sailfishapp
INCLUDEPATH += /usr/include/sailfishapp
QMAKE_RPATHDIR += $$libs.path
OTHER_FILES += $$files(rpm/*)
}
# We need to generate translations before building.
# Either way, resource files won't compile.
translations.name = Translations
translations.input = TRANSLATIONS
translations.output = $$_PRO_FILE_PWD_/l10n/${QMAKE_FILE_BASE}.qm
freebsd-* {
translations.commands = $$[QT_INSTALL_BINS]/lrelease-qt$${QT_MAJOR_VERSION} ${QMAKE_FILE_IN}
} else {
translations.commands = $$[QT_INSTALL_BINS]/lrelease ${QMAKE_FILE_IN}
}
translations.CONFIG = no_link
QMAKE_EXTRA_COMPILERS += translations
PRE_TARGETDEPS += compiler_translations_make_all