forked from kiwix/kiwix-desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kiwix-desktop.pro
208 lines (182 loc) · 6.15 KB
/
kiwix-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
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
#-------------------------------------------------
#
# Project created by QtCreator 2018-04-11T15:26:46
#
#-------------------------------------------------
QT += core gui network
QT += webenginewidgets
QT += printsupport
# Avoid stripping incompatible files, due to false identification as executables, on WSL
DETECT_WSL = $$system(test -f /proc/sys/fs/binfmt_misc/WSLInterop && echo true || echo false)
equals(DETECT_WSL , "true"): CONFIG += nostrip
CONFIG += link_pkgconfig
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = kiwix-desktop
TEMPLATE = app
QMAKE_CXXFLAGS += -std=c++17
QMAKE_LFLAGS += -std=c++17
!win32 {
QMAKE_CXXFLAGS += -Werror
}
# Also change resources/org.kiwix.desktop.appdata.xml
DEFINES += VERSION="2.3.1"
# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += \
src/choiceitem.cpp \
src/contentmanagerdelegate.cpp \
src/contentmanagerheader.cpp \
src/contentmanagermodel.cpp \
src/contenttypefilter.cpp \
src/descriptionnode.cpp \
src/findinpagebar.cpp \
src/flowlayout.cpp \
src/kiwixchoicebox.cpp \
src/kiwixconfirmbox.cpp \
src/kiwixlineedit.cpp \
src/kiwixlistwidget.cpp \
src/kiwixloader.cpp \
src/rownode.cpp \
src/suggestionlistworker.cpp \
src/thumbnaildownloader.cpp \
src/translation.cpp \
src/main.cpp \
src/mainwindow.cpp \
src/kiwixapp.cpp \
src/kprofile.cpp \
src/blobbuffer.cpp \
src/library.cpp \
src/settingsmanager.cpp \
src/settingsview.cpp \
src/topwidget.cpp \
src/urlschemehandler.cpp \
src/webview.cpp \
src/searchbar.cpp \
src/mainmenu.cpp \
src/webpage.cpp \
src/about.cpp \
src/contentmanager.cpp \
src/contentmanagerview.cpp \
src/tabbar.cpp \
src/contentmanagerside.cpp \
src/readinglistbar.cpp \
src/klistwidgetitem.cpp \
src/opdsrequestmanager.cpp \
src/localkiwixserver.cpp \
src/fullscreenwindow.cpp \
src/fullscreennotification.cpp \
src/zimview.cpp \
HEADERS += \
src/choiceitem.h \
src/contentmanagerdelegate.h \
src/contentmanagerheader.h \
src/contentmanagermodel.h \
src/contentmanagerview.h \
src/contenttypefilter.h \
src/descriptionnode.h \
src/findinpagebar.h \
src/flowlayout.h \
src/kiwixchoicebox.h \
src/kiwixconfirmbox.h \
src/kiwixlineedit.h \
src/kiwixlistwidget.h \
src/kiwixloader.h \
src/node.h \
src/rownode.h \
src/suggestionlistworker.h \
src/thumbnaildownloader.h \
src/translation.h \
src/mainwindow.h \
src/kiwixapp.h \
src/kprofile.h \
src/blobbuffer.h \
src/library.h \
src/settingsmanager.h \
src/settingsview.h \
src/topwidget.h \
src/kconstants.h \
src/urlschemehandler.h \
src/webview.h \
src/searchbar.h \
src/mainmenu.h \
src/webpage.h \
src/about.h \
src/contentmanager.h \
src/tabbar.h \
src/contentmanagerside.h \
src/readinglistbar.h \
src/klistwidgetitem.h \
src/opdsrequestmanager.h \
src/localkiwixserver.h \
src/fullscreenwindow.h \
src/fullscreennotification.h \
src/menuproxystyle.h \
src/zimview.h \
src/portutils.h \
FORMS += \
src/choiceitem.ui \
src/contentmanagerview.ui \
src/findinpagebar.ui \
ui/kiwixchoicebox.ui \
ui/kiwixconfirmbox.ui \
ui/mainwindow.ui \
ui/about.ui \
src/contentmanagerside.ui \
src/readinglistbar.ui \
ui/localkiwixserver.ui \
ui/settings.ui
include(subprojects/QtSingleApplication/src/qtsingleapplication.pri)
CODECFORSRC = UTF-8
isEmpty(PREFIX) {
PREFIX = /usr/local
}
target.path = $$PREFIX/bin
INSTALLS += target
static {
PKGCONFIG_OPTION = "--static"
}
unix {
desktop_file.path = $$PREFIX/share/applications/
desktop_file.files = resources/org.kiwix.desktop.desktop
INSTALLS += desktop_file
metainfo_file.path = $$PREFIX/share/metainfo/
metainfo_file.files = resources/org.kiwix.desktop.appdata.xml
INSTALLS += metainfo_file
app_icon24.path = $$PREFIX/share/icons/hicolor/24x24/apps
app_icon24.files = resources/icons/kiwix/24/kiwix-desktop.png
app_icon32.path = $$PREFIX/share/icons/hicolor/32x32/apps
app_icon32.files = resources/icons/kiwix/32/kiwix-desktop.png
app_icon48.path = $$PREFIX/share/icons/hicolor/48x48/apps
app_icon48.files = resources/icons/kiwix/48/kiwix-desktop.png
app_icon128.path = $$PREFIX/share/icons/hicolor/128x128/apps
app_icon128.files = resources/icons/kiwix/128/kiwix-desktop.png
app_icon256.path = $$PREFIX/share/icons/hicolor/256x256/apps
app_icon256.files = resources/icons/kiwix/256/kiwix-desktop.png
app_svg.path = $$PREFIX/share/icons/hicolor/scalable/apps
app_svg.files = resources/icons/kiwix/scalable/kiwix-desktop.svg
INSTALLS += app_icon24 app_icon32 app_icon48 app_icon128 app_icon256 app_svg
mime_icon48.path = $$PREFIX/share/icons/hicolor/48x48/mimetypes
mime_icon48.files = resources/icons/48/kiwix/org.kiwix.desktop.x-zim.png
INSTALLS += mime_icon48
mime_file.path = $$PREFIX/share/mime/packages/
mime_file.files = resources/org.kiwix.desktop-mime.xml
INSTALLS += mime_file
}
PKGCONFIG_CFLAGS = $$system(pkg-config --cflags $$PKGCONFIG_OPTION \"kiwix >= 13.0.0 kiwix < 14.0.0 libzim >= 9.0.0 libzim < 10.0.0\")
QMAKE_CXXFLAGS += $$PKGCONFIG_CFLAGS
QMAKE_CFLAGS += $$PKGCONFIG_CFLAGS
LIBS += $$system(pkg-config --libs $$PKGCONFIG_OPTION \"kiwix >= 13.0.0 kiwix < 14.0.0 libzim >= 9.0.0 libzim < 10.0.0\")
RESOURCES += \
resources/kiwix.qrc \
resources/translations.qrc \
resources/contentmanager.qrc \
resources/settingsmanager.qrc \
resources/style.qrc
RC_ICONS = resources/icons/kiwix/app_icon.ico