forked from goldendict/goldendict
-
Notifications
You must be signed in to change notification settings - Fork 0
/
goldendict.pro
368 lines (354 loc) · 8.61 KB
/
goldendict.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
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
# #####################################################################
# Automatically generated by qmake (2.01a) ?? ????. 2 18:38:07 2008
# #####################################################################
TEMPLATE = app
TARGET = goldendict
VERSION = 1.0.1+git
# Generate version file. We do this here and in a build rule described later.
# The build rule is required since qmake isn't run each time the project is
# rebuilt; and doing it here is required too since any other way the RCC
# compiler would complain if version.txt wouldn't exist (fresh checkouts).
exists( .git ) {
versionCommand = git describe --tags --always --dirty
} else {
exists( .hg ) {
versionCommand = hg -q id
}
}
!isEmpty( versionCommand ) {
system($$versionCommand > version.txt): hasVersion=1
}
isEmpty( hasVersion ) {
message(Failed to precisely describe the version via revision control -- using the default version string)
system(echo $$VERSION > version.txt)
}
# DEPENDPATH += . generators
INCLUDEPATH += .
QT += webkit
QT += xml
QT += network
QT += phonon
CONFIG += exceptions \
rtti \
stl
OBJECTS_DIR = build
UI_DIR = build
MOC_DIR = build
RCC_DIR = build
LIBS += \
-lz \
-lbz2
win32 {
LIBS += -liconv \
-lwsock32 \
-lwinmm \
-lpsapi \
-lole32 \
-loleaut32 \
-ladvapi32
LIBS += -lvorbisfile \
-lvorbis \
-logg \
-lhunspell-1.3.2
RC_FILE = goldendict.rc
INCLUDEPATH += winlibs/include
LIBS += -Lwinlibs/lib
# Enable console in Debug mode on Windows, with useful logging messages
Debug:CONFIG += console
Release:DEFINES += NO_CONSOLE
}
unix:!mac {
# This is to keep symbols for backtraces
QMAKE_CXXFLAGS += -rdynamic
QMAKE_LFLAGS += -rdynamic
CONFIG += link_pkgconfig
PKGCONFIG += vorbisfile \
vorbis \
ogg \
hunspell
LIBS += -lX11 \
-lXtst
PREFIX = $$(PREFIX)
isEmpty( PREFIX ):PREFIX = /usr/local
DEFINES += PROGRAM_DATA_DIR=\\\"$$PREFIX/share/apps/goldendict/\\\"
target.path = $$PREFIX/bin/
locale.path = $$PREFIX/share/apps/goldendict/locale/
locale.files = locale/*.qm
INSTALLS += target \
locale
icons.path = $$PREFIX/share/pixmaps
icons.files = redist/icons/*.*
INSTALLS += icons
icons2.path = $$PREFIX/share/app-install/icons
icons2.files = redist/icons/*.*
INSTALLS += icons2
desktops.path = $$PREFIX/share/applications
desktops.files = redist/*.desktop
INSTALLS += desktops
desktops2.path = $$PREFIX/share/app-install/desktop
desktops2.files = redist/*.desktop
INSTALLS += desktops2
}
mac {
TARGET = GoldenDict
# Uncomment this line to make a universal binary.
# You will need to use Xcode 3 and Qt Carbon SDK
# if you want the support for PowerPC and/or Mac OS X 10.4
# CONFIG += x86 x86_64 ppc
LIBS = -lz \
-lbz2 \
-liconv \
-lvorbisfile \
-lvorbis \
-logg \
-lhunspell-1.2
INCLUDEPATH = maclibs/include
LIBS += -Lmaclibs/lib -framework AppKit
OBJECTIVE_SOURCES += lionsupport.mm
ICON = icons/macicon.icns
QMAKE_POST_LINK = mkdir -p GoldenDict.app/Contents/Frameworks & \
cp -nR maclibs/lib/ GoldenDict.app/Contents/Frameworks/ & \
mkdir -p GoldenDict.app/Contents/MacOS/locale & \
cp -R locale/*.qm GoldenDict.app/Contents/MacOS/locale/
}
DEFINES += PROGRAM_VERSION=\\\"$$VERSION\\\"
# Input
HEADERS += folding.hh \
inc_case_folding.hh \
inc_diacritic_folding.hh \
mainwindow.hh \
sptr.hh \
dictionary.hh \
ex.hh \
config.hh \
sources.hh \
utf8.hh \
file.hh \
bgl_babylon.hh \
bgl.hh \
initializing.hh \
article_netmgr.hh \
dictzip.h \
btreeidx.hh \
stardict.hh \
chunkedstorage.hh \
xdxf2html.hh \
iconv.hh \
lsa.hh \
htmlescape.hh \
dsl.hh \
dsl_details.hh \
filetype.hh \
fsencoding.hh \
groups.hh \
groups_widgets.hh \
instances.hh \
article_maker.hh \
scanpopup.hh \
articleview.hh \
externalviewer.hh \
wordfinder.hh \
groupcombobox.hh \
keyboardstate.hh \
mouseover.hh \
preferences.hh \
mutex.hh \
mediawiki.hh \
sounddir.hh \
hunspell.hh \
dictdfiles.hh \
audiolink.hh \
wstring.hh \
wstring_qt.hh \
processwrapper.hh \
hotkeywrapper.hh \
searchpanewidget.hh \
hotkeyedit.hh \
langcoder.hh \
editdictionaries.hh \
loaddictionaries.hh \
transliteration.hh \
romaji.hh \
russiantranslit.hh \
german.hh \
website.hh \
orderandprops.hh \
language.hh \
dictionarybar.hh \
broken_xrecord.hh \
history.hh \
atomic_rename.hh \
articlewebview.hh \
zipfile.hh \
indexedzip.hh \
termination.hh \
greektranslit.hh \
webmultimediadownload.hh \
forvo.hh \
country.hh \
about.hh \
programs.hh \
parsecmdline.hh \
dictspanewidget.hh \
maintabwidget.hh \
dprintf.hh \
mainstatusbar.hh \
gdappstyle.hh \
ufile.hh \
xdxf.hh \
sdict.hh \
decompress.hh \
aard.hh \
mruqmenu.hh
FORMS += groups.ui \
dictgroupwidget.ui \
mainwindow.ui \
sources.ui \
initializing.ui \
groupselectorwidget.ui \
scanpopup.ui \
articleview.ui \
preferences.ui \
about.ui \
editdictionaries.ui \
orderandprops.ui
SOURCES += folding.cc \
main.cc \
dictionary.cc \
config.cc \
sources.cc \
mainwindow.cc \
utf8.cc \
file.cc \
bgl_babylon.cc \
bgl.cc \
initializing.cc \
article_netmgr.cc \
dictzip.c \
btreeidx.cc \
stardict.cc \
chunkedstorage.cc \
xdxf2html.cc \
iconv.cc \
lsa.cc \
htmlescape.cc \
dsl.cc \
dsl_details.cc \
filetype.cc \
fsencoding.cc \
groups.cc \
groups_widgets.cc \
instances.cc \
article_maker.cc \
scanpopup.cc \
articleview.cc \
externalviewer.cc \
wordfinder.cc \
groupcombobox.cc \
keyboardstate.cc \
mouseover.cc \
preferences.cc \
mutex.cc \
mediawiki.cc \
sounddir.cc \
hunspell.cc \
dictdfiles.cc \
audiolink.cc \
wstring.cc \
wstring_qt.cc \
processwrapper.cc \
hotkeywrapper.cc \
hotkeyedit.cc \
langcoder.cc \
editdictionaries.cc \
loaddictionaries.cc \
transliteration.cc \
romaji.cc \
russiantranslit.cc \
german.cc \
website.cc \
orderandprops.cc \
language.cc \
dictionarybar.cc \
broken_xrecord.cc \
history.cc \
atomic_rename.cc \
articlewebview.cc \
zipfile.cc \
indexedzip.cc \
termination.cc \
greektranslit.cc \
webmultimediadownload.cc \
forvo.cc \
country.cc \
about.cc \
programs.cc \
parsecmdline.cc \
maintabwidget.cc \
mainstatusbar.cc \
gdappstyle.cc \
ufile.cc \
xdxf.cc \
sdict.cc \
decompress.cc \
aard.cc \
mruqmenu.cc
win32 {
SOURCES += mouseover_win32/ThTypes.c \
wordbyauto.cc \
guids.c \
x64.cc
HEADERS += mouseover_win32/ThTypes.h \
wordbyauto.hh \
uiauto.hh \
x64.hh
}
RESOURCES += resources.qrc \
flags.qrc
TRANSLATIONS += locale/ru_RU.ts \
locale/zh_CN.ts \
locale/cs_CZ.ts \
locale/de_DE.ts \
locale/el_GR.ts \
locale/bg_BG.ts \
locale/ar_SA.ts \
locale/lt_LT.ts \
locale/uk_UA.ts \
locale/vi_VN.ts \
locale/it_IT.ts \
locale/pl_PL.ts \
locale/ja_JP.ts \
locale/zh_TW.ts \
locale/sq_AL.ts \
locale/pt_BR.ts \
locale/es_AR.ts \
locale/es_BO.ts \
locale/es_ES.ts \
locale/sk_SK.ts \
locale/tr_TR.ts \
locale/qu_WI.ts \
locale/tg_TJ.ts
# Build version file
!isEmpty( hasVersion ) {
QMAKE_EXTRA_TARGETS += revtarget
PRE_TARGETDEPS += version.txt
revtarget.target = version.txt
revtarget.commands = $$versionCommand > $$revtarget.target
revtarget.depends = $$SOURCES $$HEADERS $$FORMS
}
# This makes qmake generate translations
win32:# Windows doesn't seem to have *-qt4 symlinks
isEmpty(QMAKE_LRELEASE):QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
isEmpty(QMAKE_LRELEASE):QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease-qt4
updateqm.input = TRANSLATIONS
updateqm.output = ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}.qm
updateqm.commands = $$QMAKE_LRELEASE \
${QMAKE_FILE_IN} \
-qm \
${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}.qm
updateqm.CONFIG += no_link
QMAKE_EXTRA_COMPILERS += updateqm
TS_OUT = $$TRANSLATIONS
TS_OUT ~= s/.ts/.qm/g
PRE_TARGETDEPS += $$TS_OUT
include( qtsingleapplication/src/qtsingleapplication.pri )