-
Notifications
You must be signed in to change notification settings - Fork 2
/
portabase.pro
360 lines (351 loc) · 15.6 KB
/
portabase.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
TEMPLATE = app
CONFIG += qt warn_on
#DEFINES += TRACE_ENABLED # enables TRACE macro for crash debugging
QT += xml
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport
DESTDIR = build
OBJECTS_DIR = build
MOC_DIR = build
RCC_DIR = build
TRANSLATIONS = resources/translations/portabase_cs.ts \
resources/translations/portabase_de.ts \
resources/translations/portabase_en.ts \
resources/translations/portabase_es.ts \
resources/translations/portabase_fr.ts \
resources/translations/portabase_it.ts \
resources/translations/portabase_ja.ts \
resources/translations/portabase_pl.ts \
resources/translations/portabase_sk.ts \
resources/translations/portabase_zh_CN.ts \
resources/translations/portabase_zh_TW.ts
# Files common between all versions
HEADERS = src/calc/calcdateeditor.h \
src/calc/calceditor.h \
src/calc/calcnode.h \
src/calc/calcnodeeditor.h \
src/calc/calctimeeditor.h \
src/calc/calcwidget.h \
src/calculator.h \
src/color_picker/qtcolorpicker.h \
src/columneditor.h \
src/columninfo.h \
src/commandline.h \
src/condition.h \
src/conditioneditor.h \
src/csverror.h \
src/csvutils.h \
src/database.h \
src/datamodel.h \
src/datatypes.h \
src/datedialog.h \
src/datewidget.h \
src/dbeditor.h \
src/dynamicedit.h \
src/encryption/blowfish.h \
src/encryption/bytestream.h \
src/encryption/crypto.h \
src/encryption/randomkit/randomkit.h \
src/encryption/randomkit/rk_isaac.h \
src/encryption/randomkit/rk_mt.h \
src/enumeditor.h \
src/enummanager.h \
src/eventfilter.h \
src/factory.h \
src/filter.h \
src/filtereditor.h \
src/formatting.h \
src/image/imageeditor.h \
src/image/imageselector.h \
src/image/imageutils.h \
src/image/imageviewer.h \
src/image/imagewidget.h \
src/image/slideshowdialog.h \
src/importdialog.h \
src/importutils.h \
src/menuactions.h \
src/metakitfuncs.h \
src/mobiledb.h \
src/notebutton.h \
src/noteeditor.h \
src/numberwidget.h \
src/oldconfig.h \
src/passdialog.h \
src/pbdialog.h \
src/pbinputdialog.h \
src/pbmaemo5style.h \
src/pdbfile.h \
src/portabase.h \
src/preferences.h \
src/propertiesdialog.h \
src/qqutil/qqdialog.h \
src/qqutil/qqfactory.h \
src/qqutil/qqfiledialog.h \
src/qqutil/qqlineedit.h \
src/qqutil/qqmainwindow.h \
src/qqutil/qqmenuhelper.h \
src/qqutil/qqspinbox.h \
src/qqutil/qqtoolbar.h \
src/qqutil/qqtoolbarstretch.h \
src/qqutil/qqtreeview.h \
src/roweditor.h \
src/rowviewer.h \
src/sorteditor.h \
src/timewidget.h \
src/view.h \
src/viewdisplay.h \
src/vieweditor.h \
src/vsfmanager.h \
src/xmlexport.h \
src/xmlimport.h
SOURCES = src/calc/calcdateeditor.cpp \
src/calc/calceditor.cpp \
src/calc/calcnode.cpp \
src/calc/calcnodeeditor.cpp \
src/calc/calctimeeditor.cpp \
src/calc/calcwidget.cpp \
src/calculator.cpp \
src/color_picker/qtcolorpicker.cpp \
src/columneditor.cpp \
src/columninfo.cpp \
src/commandline.cpp \
src/condition.cpp \
src/conditioneditor.cpp \
src/csverror.cpp \
src/csvutils.cpp \
src/database.cpp \
src/datamodel.cpp \
src/datedialog.cpp \
src/datewidget.cpp \
src/dbeditor.cpp \
src/dynamicedit.cpp \
src/encryption/blowfish.cpp \
src/encryption/bytestream.cpp \
src/encryption/crypto.cpp \
src/encryption/randomkit/rk_isaac.c \
src/encryption/randomkit/rk_mt.c \
src/enumeditor.cpp \
src/enummanager.cpp \
src/eventfilter.cpp \
src/factory.cpp \
src/filter.cpp \
src/filtereditor.cpp \
src/formatting.cpp \
src/image/imageeditor.cpp \
src/image/imageselector.cpp \
src/image/imageutils.cpp \
src/image/imageviewer.cpp \
src/image/imagewidget.cpp \
src/image/slideshowdialog.cpp \
src/importdialog.cpp \
src/importutils.cpp \
src/main.cpp \
src/menuactions.cpp \
src/metakitfuncs.cpp \
src/mobiledb.cpp \
src/notebutton.cpp \
src/noteeditor.cpp \
src/numberwidget.cpp \
src/oldconfig.cpp \
src/passdialog.cpp \
src/pbdialog.cpp \
src/pbinputdialog.cpp \
src/pbmaemo5style.cpp \
src/pdbfile.cpp \
src/portabase.cpp \
src/preferences.cpp \
src/propertiesdialog.cpp \
src/qqutil/qqdialog.cpp \
src/qqutil/qqfactory.cpp \
src/qqutil/qqfiledialog.cpp \
src/qqutil/qqlineedit.cpp \
src/qqutil/qqmainwindow.cpp \
src/qqutil/qqmenuhelper.cpp \
src/qqutil/qqspinbox.cpp \
src/qqutil/qqtoolbar.cpp \
src/qqutil/qqtoolbarstretch.cpp \
src/qqutil/qqtreeview.cpp \
src/roweditor.cpp \
src/rowviewer.cpp \
src/sorteditor.cpp \
src/timewidget.cpp \
src/view.cpp \
src/viewdisplay.cpp \
src/vieweditor.cpp \
src/vsfmanager.cpp \
src/xmlexport.cpp \
src/xmlimport.cpp
# Stuff for all Linux/UNIX versions
unix {
LIBS += -lm -lmk4
VERSION = $$system(cat packaging/version_number)
COPYRIGHT_YEARS = $$system(cat packaging/copyright_years)
}
# Stuff for Android
android-clang {
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/packaging/android/apk_template
ANDROID_TARGET_SDK_VERSION = 33
CONFIG += release
DEFINES += MOBILE ANDROID
LIBS += -L$$PWD/packaging/android/apk_template/libs/$$QT_ARCH
# Avoid overwriting intermediate files written in parallel for different ABIs
OBJECTS_DIR = build/$$QT_ARCH
MOC_DIR = build/$$QT_ARCH
RCC_DIR = build/$$QT_ARCH
DISTFILES += \
packaging/android/apk_template/AndroidManifest.xml \
packaging/android/apk_template/gradle/wrapper/gradle-wrapper.jar \
packaging/android/apk_template/gradlew \
packaging/android/apk_template/res/drawable-ldpi/icon.png \
packaging/android/apk_template/res/drawable-mdpi/icon.png \
packaging/android/apk_template/res/drawable-tvdpi/icon.png \
packaging/android/apk_template/res/drawable-hdpi/icon.png \
packaging/android/apk_template/res/drawable-xhdpi/icon.png \
packaging/android/apk_template/res/drawable-xxhdpi/icon.png \
packaging/android/apk_template/res/drawable-xxxhdpi/icon.png \
packaging/android/apk_template/res/values/libs.xml \
packaging/android/apk_template/build.gradle \
packaging/android/apk_template/gradle/wrapper/gradle-wrapper.properties \
packaging/android/apk_template/gradlew.bat
HEADERS += src/qqutil/actionbar.h \
src/qqutil/qqandroidstyle.h
INCLUDEPATH += metakit/include
QT += androidextras svg
RESOURCES = resources/android.qrc
SOURCES += src/qqutil/actionbar.cpp \
src/qqutil/qqandroidstyle.cpp
TARGET = PortaBase
}
# Stuff for macOS
macx {
CONFIG += c++11 release x86_64
QMAKE_CXXFLAGS += -stdlib=libc++ -std=c++11
QT += macextras
INCLUDEPATH += /usr/local/include
LIBS += -L/usr/local/lib -framework Foundation
TARGET = PortaBase
HEADERS += src/qqutil/qqmactoolbardelegate.h \
src/qqutil/qqmactoolbarutils.h
OBJECTIVE_SOURCES += src/qqutil/qqmactoolbardelegate.mm \
src/qqutil/qqmactoolbarutils.mm
RESOURCES = resources/mac.qrc
ICON = packaging/mac/PortaBase.icns
DOCUMENT_ICON.files = packaging/mac/PortaBaseFile.icns
DOCUMENT_ICON.path = Contents/Resources
CS_LPROJ.files = packaging/mac/cs.lproj/InfoPlist.strings \
packaging/mac/cs.lproj/locversion.plist
CS_LPROJ.path = Contents/Resources/cs.lproj
DE_LPROJ.files = packaging/mac/de.lproj/InfoPlist.strings \
packaging/mac/de.lproj/locversion.plist
DE_LPROJ.path = Contents/Resources/de.lproj
EN_LPROJ.files = packaging/mac/en.lproj/InfoPlist.strings \
packaging/mac/en.lproj/locversion.plist
EN_LPROJ.path = Contents/Resources/en.lproj
ES_LPROJ.files = packaging/mac/es.lproj/InfoPlist.strings \
packaging/mac/es.lproj/locversion.plist
ES_LPROJ.path = Contents/Resources/es.lproj
FR_LPROJ.files = packaging/mac/fr.lproj/InfoPlist.strings \
packaging/mac/fr.lproj/locversion.plist
FR_LPROJ.path = Contents/Resources/fr.lproj
IT_LPROJ.files = packaging/mac/it.lproj/InfoPlist.strings \
packaging/mac/it.lproj/locversion.plist
IT_LPROJ.path = Contents/Resources/it.lproj
JA_LPROJ.files = packaging/mac/ja.lproj/InfoPlist.strings \
packaging/mac/ja.lproj/locversion.plist
JA_LPROJ.path = Contents/Resources/ja.lproj
PL_LPROJ.files = packaging/mac/pl.lproj/InfoPlist.strings \
packaging/mac/pl.lproj/locversion.plist
PL_LPROJ.path = Contents/Resources/pl.lproj
SK_LPROJ.files = packaging/mac/sk.lproj/InfoPlist.strings \
packaging/mac/sk.lproj/locversion.plist
SK_LPROJ.path = Contents/Resources/sk.lproj
ZH_HANS_LPROJ.files = packaging/mac/zh-Hans.lproj/InfoPlist.strings \
packaging/mac/zh-Hans.lproj/locversion.plist
ZH_HANS_LPROJ.path = Contents/Resources/zh-Hans.lproj
ZH_HANT_LPROJ.files = packaging/mac/zh-Hant.lproj/InfoPlist.strings \
packaging/mac/zh-Hant.lproj/locversion.plist
ZH_HANT_LPROJ.path = Contents/Resources/zh-Hant.lproj
QMAKE_BUNDLE_DATA += DOCUMENT_ICON \
CS_LPROJ \
DE_LPROJ \
EN_LPROJ \
ES_LPROJ \
FR_LPROJ \
IT_LPROJ \
JA_LPROJ \
PL_LPROJ \
SK_LPROJ \
ZH_HANS_LPROJ \
ZH_HANT_LPROJ
QMAKE_INFO_PLIST = packaging/mac/Info.plist
}
# Stuff for Maemo
maemo5|contains(QT_CONFIG, hildon) {
CONFIG += debug qdbus
DEFINES += MOBILE
LIBS += -L../../src/metakit/builds
isEmpty(PREFIX) {
PREFIX = /usr/local
}
DATADIR = $$PREFIX/share
DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\"
TARGET = portabase
INSTALLS += target desktop service icon16 icon22 icon32 icon48 icon64 mime
desktop.path = $$DATADIR/applications/hildon
desktop.files = packaging/maemo/portabase.desktop
service.path = $$DATADIR/dbus-1/services
service.files = packaging/maemo/net.sourceforge.portabase.service
icon16.path = $$DATADIR/icons/hicolor/16x16/apps
icon16.files = resources/icons/linux/16x16/portabase.png
icon22.path = $$DATADIR/icons/hicolor/22x22/apps
icon22.files = resources/icons/linux/22x22/portabase.png
icon32.path = $$DATADIR/icons/hicolor/32x32/apps
icon32.files = resources/icons/linux/32x32/portabase.png
icon48.path = $$DATADIR/icons/hicolor/48x48/apps
icon48.files = resources/icons/linux/48x48/portabase.png
icon64.path = $$DATADIR/icons/hicolor/64x64/apps
icon64.files = resources/icons/linux/64x64/portabase.png
mime.path = $$DATADIR/mime/packages
mime.files = packaging/maemo/portabase-mime.xml
}
contains(QT_CONFIG, hildon):!maemo5 {
target.path = $$PREFIX/bin
RESOURCES = resources/diablo.qrc
}
maemo5 {
QT += dbus maemo5 network webkit
target.path = /opt/maemo
RESOURCES = resources/fremantle.qrc
HEADERS += src/image/imagereply.h \
src/pbnetworkaccessmanager.h
SOURCES += src/image/imagereply.cpp \
src/pbnetworkaccessmanager.cpp
}
# Stuff for other Linux/UNIX platforms
unix:!android-clang:!macx:!maemo5:!contains(QT_CONFIG, hildon) {
#QMAKE_CXXFLAGS += -O0 # for valgrind
CONFIG += debug
LIBS += -Lmetakit/builds
RESOURCES = resources/linux.qrc
}
# Stuff for Windows
win32 {
CONFIG += release
TARGET = PortaBase
RESOURCES = resources/windows.qrc
LIBS += metakit/builds/libmk4.a
RC_FILE = portabase.rc
INCLUDEPATH += metakit/include
VERSION = $$system(type packaging\\version_number)
COPYRIGHT_YEARS = $$system(type packaging\\copyright_years)
}
# Stuff for static builds
static {
QTPLUGIN += qtaccessiblewidgets qjpeg
DEFINES += STATIC_QT
QMAKE_CXXFLAGS += -fvisibility=hidden
}
# Provide the version number and copyright year range
VERSION_STRING = '\\"$${VERSION}\\"'
COPYRIGHT_YEARS_STRING = '\\"$${COPYRIGHT_YEARS}\\"'
DEFINES += VERSION_NUMBER=\"$${VERSION_STRING}\"
DEFINES += COPYRIGHT_YEARS=\"$${COPYRIGHT_YEARS_STRING}\"