-
Notifications
You must be signed in to change notification settings - Fork 11
/
Orayta.pro
295 lines (234 loc) · 7.37 KB
/
Orayta.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
# -------------------------------------------------
# Project created by QtCreator 2009-03-15T13:50:06
# Author: Moshe Wagner. <[email protected]>
# -------------------------------------------------
QT += core gui network widgets
TARGET = orayta
TEMPLATE = app
INCLUDEPATH += $$PWD
CONFIG += qt mobility
#for mobile testing only
#DEFINES += MOBILE
#CONFIG += MOBILE
#DEFINES+= mobile
#CONFIG+= mobile
#Small hack for Quazip on windows
win32{
DEFINES += QUAZIP_STATIC
}
android {
INSTALL_PATH = "/assets/Orayta/"
INSTALL_BOOKS_PATH = $${INSTALL_PATH}
DEFINES += QTSCROLLER_NO_WEBKIT
#this is a mobile app
DEFINES += MOBILE
DEFINES += android
CONFIG += MOBILE
CONFIG += android
CONFIG += mobile
CONFIG += Kookita
# Make sure to clone https://github.com/KDAB/android_openssl to the dir above the source dir
include(../android_openssl/openssl.pri)
}
else: win32{
INSTALL_PATH = quote(!:\\progarm files\\orayta\\) #TODO: set the root dynamicly or ask yoch to fix this.
INSTALL_BOOKS_PATH = quote(!:\\progarm files\\orayta\\books)
QT += webkitwidgets printsupport
# install fonts
#fonts.path = $${INSTALL_PATH}"fonts/"
fonts.path = $${INSTALL_PATH}
fonts.files = fonts/.
}
else:unix{
CONFIG += linux
#CONFIG += poppler
INSTALL_PATH = /usr/share/Orayta/
INSTALL_BOOKS_PATH = $${INSTALL_PATH}"Books/"
#Zlib
LIBS += -lz
QT += webkitwidgets printsupport
QMAKE_CFLAGS_RELEASE+=$(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
QMAKE_CFLAGS_DEBUG+=$(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
QMAKE_CXXFLAGS_RELEASE+=$(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
QMAKE_CXXFLAGS_DEBUG+=$(shell dpkg-buildflags --get CFLAGS)
QMAKE_CXXFLAGS_DEBUG+=$(shell dpkg-buildflags --get CPPFLAGS)
}
poppler {
DEFINES += POPPLER
# The following are the correct include and library paths for poppler on my system (Ubuntu 10.10).
# Modify these to refer to the directories on your system
# that contain the poppler-qt4.h header file and [lib]poppler-qt4 library.
INCLUDEPATH += /usr/include/poppler/qt4
LIBS += -lpoppler-qt4
#Fribidi
LIBS += -lfribidi
SOURCES += Desktop/pdfwidget.cpp
HEADERS += Desktop/pdfwidget.h
}
SOURCES += \
main.cpp \
OraytaBase/booklist.cpp \
OraytaBase/bookfind.cpp \
OraytaBase/htmlgen.cpp \
OraytaBase/functions.cpp \
OraytaBase/filedownloader.cpp \
OraytaBase/book.cpp \
OraytaBase/bookiter.cpp \
OraytaBase/search.cpp \
OraytaBase/guematria.cpp \
OraytaBase/quazip/quazip.cpp \
OraytaBase/quazip/zip.c \
OraytaBase/quazip/unzip.c \
OraytaBase/quazip/quazipnewinfo.cpp \
OraytaBase/quazip/quazipfile.cpp \
OraytaBase/quazip/JlCompress.cpp \
OraytaBase/quazip/quacrc32.cpp \
OraytaBase/quazip/quaadler32.cpp \
OraytaBase/quazip/qioapi.cpp \
OraytaBase/minibmark.cpp \
OraytaBase/bmarklist.cpp \
HEADERS += \
OraytaBase/htmlgen.h \
OraytaBase/functions.h \
OraytaBase/filedownloader.h \
OraytaBase/book.h \
OraytaBase/bookiter.h \
OraytaBase/booklist.h \
OraytaBase/bookfind.h \
OraytaBase/guematria.h \
OraytaBase/search.h \
OraytaBase/quazip/quazip.h \
OraytaBase/quazip/zip.h \
OraytaBase/quazip/unzip.h \
OraytaBase/quazip/quazipnewinfo.h \
OraytaBase/quazip/quazipfileinfo.h \
OraytaBase/quazip/quazipfile.h \
OraytaBase/quazip/quazip_global.h \
OraytaBase/quazip/JlCompress.h \
OraytaBase/quazip/ioapi.h \
OraytaBase/quazip/crypt.h \
OraytaBase/quazip/quacrc32.h \
OraytaBase/quazip/quachecksum32.h \
OraytaBase/quazip/quaadler32.h \
OraytaBase/minibmark.h \
OraytaBase/bmarklist.h
FORMS += \
OraytaBase/bookfind.ui
!mobile{
message("Compiling for desktop")
HEADERS += \
Desktop/desktopapp.h \
Desktop/mywebview.h \
Desktop/mytreetab.h \
Desktop/bookdisplayer.h \
Desktop/addcomment.h \
Desktop/about.h \
Desktop/errorreport.h \
Desktop/settings.h \
Desktop/importbook.h
SOURCES += \
Desktop/desktopapp.cpp \
Desktop/mywebview.cpp \
Desktop/mytreetab.cpp \
Desktop/bookdisplayer.cpp \
Desktop/addcomment.cpp \
Desktop/about.cpp \
Desktop/errorreport.cpp \
Desktop/settings.cpp \
Desktop/importbook.cpp \
Desktop/desktopapp_bookmark.cpp
FORMS += \
Desktop/addcomment.ui \
Desktop/about.ui \
Desktop/errorreport.ui \
Desktop/settings.ui \
Desktop/importbook.ui \
Desktop/desktopapp.ui
}
#Android stuff:
mobile {
message("Compiling for mobile")
DEFINES += QTSCROLLER_NO_WEBKIT
DEFINES += MOBILE
RESOURCES += Mobile/mobile.qrc
SOURCES += \
Mobile/mobileapp.cpp \
Mobile/textdisplayer.cpp \
Mobile/mobileapp_download.cpp\
Mobile/swipegesturerecognizer.cpp \
Mobile/mobileapp_bookmark.cpp
HEADERS += \
Mobile/mobileapp.h \
Mobile/textdisplayer.h \
Mobile/swipegesturerecognizer.h
FORMS += \
Mobile/mobileapp.ui \
# OTHER_FILES += \
# android-orayta/src/org/qtproject/qt5/android/bindings/QtActivity.java \
# android-orayta/src/org/qtproject/qt5/android/bindings/QtApplication.java \
# android-orayta/src/org/qtproject/qt5/android/bindings/Crypter.java \
# android-orayta/version.xml \
# android-orayta/AndroidManifest.xml
}
Kookita{
DEFINES += KOOKITA
QT += androidextras gui-private
SOURCES += Mobile/jnifunc.cpp
HEADERS += Mobile/jnifunc.h
OTHER_FILES += \
android-orayta/src/org/qtproject/qt5/crypt/Crypter.java \
android-orayta/src/org/qtproject/qt5/crypt/IZofenProvider.java \
android-orayta/src/org/qtproject/qt5/crypt/ZofenProvider.java
android-orayta/src/org/qtproject/qt5/crypt/TestingZofenProvider.java
}
RESOURCES += Orayta.qrc
win32:RC_FILE = orayta.rc
TRANSLATIONS = Hebrew.ts \
French.ts
# Install binary
target.path = /usr/bin
# Install books
books.path = $${INSTALL_BOOKS_PATH}
books.files = Books/.
#android: books.files += android/assets/.
# Install icon
icon.path = $${INSTALL_PATH}
icon.files = Icons/Orayta.png
#Install wait image
icon.files += Images/Wait.gif
#Install user css sample
css.path = $${INSTALL_PATH}
css.files = css/.
linux {
# Desktop shortcut
desktop.path = $${XDG_APPS_INSTALL_DIR}
desktop.files = Orayta.desktop
# Install shortcut
menu.path = /usr/share/applications
menu.files = Orayta.desktop
}
# Install translation
trans.path = $${INSTALL_PATH}
trans.files = Hebrew.qm
# copy licence info
licence.path = $${INSTALL_PATH}
licence.files = licence/.
INSTALLS += target
INSTALLS += books
message("Books target set to:" $${INSTALL_BOOKS_PATH})
INSTALLS += icon
INSTALLS += trans
#fonts are now in the qrc file, no need for them in assets.
INSTALLS += fonts
INSTALLS += licence
INSTALLS += css
linux: INSTALLS += menu desktop
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android-orayta
DISTFILES += \
android-orayta/AndroidManifest.xml \
android-orayta/res/values/libs.xml \
android-orayta/build.gradle \
android-orayta/gradle/wrapper/gradle-wrapper.jar \
android-orayta/gradlew \
android-orayta/gradle/wrapper/gradle-wrapper.properties \
android-orayta/gradlew.bat