blob: f8321182e3e88631ac0d25037db0203a4c0e9061 (
plain)
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
|
# ccache
unix:!mac:!noccache {
CCACHE = $$system(which ccache)
!isEmpty(CCACHE) {
message("using ccache")
QMAKE_CXX = ccache g++
QMAKE_CC = ccache gcc
}
}
MYBUILDDIR = $$OUT_PWD/build/
OBJECTS_DIR = $$MYBUILDDIR/o
UI_DIR = $$MYBUILDDIR/ui
MOC_DIR = $$MYBUILDDIR/moc
RCC_DIR = $$MYBUILDDIR/rcc
# check version of Qt installation
VER = $$find(QT_VERSION, ^4\.[3-9]+.*)
isEmpty(VER) {
!isEmpty(QT_VERSION) error("Qt found:" $$[QT_VERSION])
error("Qt >= 4.3 required!")
}
message("Qt version used:" $$VER)
RBBASE_DIR = $$_PRO_FILE_PWD_
RBBASE_DIR = $$replace(RBBASE_DIR,/rbutil/rbutilqt,)
message("Rockbox Base dir: "$$RBBASE_DIR)
# check for system speex. Add a custom rule for pre-building librbspeex if not
# found. Newer versions of speex are split up into libspeex and libspeexdsp,
# and some distributions package them separately. Check for both and fall back
# to librbspeex if not found.
LIBSPEEX = $$system(pkg-config --silence-errors --libs speex speexdsp)
!static:!isEmpty(LIBSPEEX) {
LIBS += $$LIBSPEEX
}
# custom rules for rockbox-specific libs
!mac {
RBLIBPOSTFIX = .a
}
mac {
RBLIBPOSTFIX = -universal
}
rbspeex.commands = @$(MAKE) TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/tools/rbspeex librbspeex$$RBLIBPOSTFIX CC=\"$$QMAKE_CC\"
libucl.commands = @$(MAKE) TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/tools/ucl/src libucl$$RBLIBPOSTFIX CC=\"$$QMAKE_CC\"
libmkamsboot.commands = @$(MAKE) TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/rbutil/mkamsboot libmkamsboot$$RBLIBPOSTFIX CC=\"$$QMAKE_CC\"
libmktccboot.commands = @$(MAKE) TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/rbutil/mktccboot libmktccboot$$RBLIBPOSTFIX CC=\"$$QMAKE_CC\"
QMAKE_EXTRA_TARGETS += rbspeex libucl libmkamsboot libmktccboot
PRE_TARGETDEPS += rbspeex libucl libmkamsboot libmktccboot
# rule for creating ctags file
tags.commands = ctags -R --c++-kinds=+p --fields=+iaS --extra=+q $(SOURCES)
tags.depends = $(SOURCES)
QMAKE_EXTRA_TARGETS += tags
# add a custom rule for making the translations
lrelease.commands = $$[QT_INSTALL_BINS]/lrelease -silent $$_PRO_FILE_
QMAKE_EXTRA_TARGETS += lrelease
!dbg {
PRE_TARGETDEPS += lrelease
}
SOURCES += rbutilqt.cpp \
main.cpp \
installwindow.cpp \
base/httpget.cpp \
configure.cpp \
zip/zip.cpp \
zip/unzip.cpp \
base/zipinstaller.cpp \
progressloggergui.cpp \
installtalkwindow.cpp \
base/talkfile.cpp \
base/talkgenerator.cpp \
base/autodetection.cpp \
../ipodpatcher/ipodpatcher.c \
../sansapatcher/sansapatcher.c \
../chinachippatcher/chinachip.c \
browsedirtree.cpp \
themesinstallwindow.cpp \
base/uninstall.cpp \
uninstallwindow.cpp \
base/utils.cpp \
preview.cpp \
base/encoders.cpp \
encttscfggui.cpp \
base/encttssettings.cpp \
base/ttsbase.cpp \
base/ttsexes.cpp \
base/ttssapi.cpp \
base/ttsfestival.cpp \
../../tools/wavtrim.c \
../../tools/voicefont.c \
base/voicefile.cpp \
createvoicewindow.cpp \
base/rbsettings.cpp \
base/serverinfo.cpp \
base/systeminfo.cpp \
base/rbunzip.cpp \
base/rbzip.cpp \
base/system.cpp \
sysinfo.cpp \
systrace.cpp \
base/bootloaderinstallbase.cpp \
base/bootloaderinstallmi4.cpp \
base/bootloaderinstallhex.cpp \
base/bootloaderinstallipod.cpp \
base/bootloaderinstallsansa.cpp \
base/bootloaderinstallfile.cpp \
base/bootloaderinstallchinachip.cpp \
base/bootloaderinstallams.cpp \
base/bootloaderinstalltcc.cpp \
../../tools/mkboot.c \
../../tools/iriver.c \
HEADERS += rbutilqt.h \
installwindow.h \
base/httpget.h \
configure.h \
zip/zip.h \
zip/unzip.h \
zip/zipentry_p.h \
zip/unzip_p.h \
zip/zip_p.h \
version.h \
base/zipinstaller.h \
installtalkwindow.h \
base/talkfile.h \
base/talkgenerator.h \
base/autodetection.h \
base/progressloggerinterface.h \
progressloggergui.h \
../ipodpatcher/ipodpatcher.h \
../ipodpatcher/ipodio.h \
../ipodpatcher/parttypes.h \
../sansapatcher/sansapatcher.h \
../sansapatcher/sansaio.h \
../chinachippatcher/chinachip.h \
irivertools/h100sums.h \
irivertools/h120sums.h \
irivertools/h300sums.h \
browsedirtree.h \
themesinstallwindow.h \
base/uninstall.h \
uninstallwindow.h \
base/utils.h \
preview.h \
base/encoders.h \
encttscfggui.h \
base/encttssettings.h \
base/ttsbase.h \
base/ttsexes.h \
base/ttsfestival.h \
base/ttssapi.h \
../../tools/wavtrim.h \
../../tools/voicefont.h \
base/voicefile.h \
createvoicewindow.h \
base/rbsettings.h \
base/serverinfo.h \
base/systeminfo.h \
base/rbunzip.h \
base/rbzip.h \
sysinfo.h \
base/system.h \
systrace.h \
base/bootloaderinstallbase.h \
base/bootloaderinstallmi4.h \
base/bootloaderinstallhex.h \
base/bootloaderinstallipod.h \
base/bootloaderinstallsansa.h \
base/bootloaderinstallfile.h \
base/bootloaderinstallchinachip.h \
base/bootloaderinstallams.h \
base/bootloaderinstalltcc.h \
../../tools/mkboot.h \
../../tools/iriver.h \
# Needed by QT on Win
INCLUDEPATH = $$_PRO_FILE_PWD_ $$_PRO_FILE_PWD_/irivertools $$_PRO_FILE_PWD_/zip $$_PRO_FILE_PWD_/zlib $$_PRO_FILE_PWD_/base
INCLUDEPATH += $$RBBASE_DIR/rbutil/ipodpatcher $$RBBASE_DIR/rbutil/sansapatcher $$RBBASE_DIR/tools/rbspeex $$RBBASE_DIR/tools
DEPENDPATH = $$INCLUDEPATH
LIBS += -L$$OUT_PWD -L$$MYBUILDDIR -lrbspeex -lmkamsboot -lmktccboot -lucl
TEMPLATE = app
dbg {
CONFIG += debug thread qt warn_on
DEFINES -= QT_NO_DEBUG_OUTPUT
message("debug")
}
!dbg {
CONFIG += release thread qt
DEFINES -= QT_NO_DEBUG_OUTPUT
DEFINES += NODEBUG
message("release")
}
TARGET = rbutilqt
FORMS += rbutilqtfrm.ui \
aboutbox.ui \
installwindowfrm.ui \
progressloggerfrm.ui \
configurefrm.ui \
browsedirtreefrm.ui \
installtalkfrm.ui \
themesinstallfrm.ui \
uninstallfrm.ui \
previewfrm.ui \
createvoicefrm.ui \
sysinfofrm.ui \
systracefrm.ui
RESOURCES += $$_PRO_FILE_PWD_/rbutilqt.qrc
win32 {
RESOURCES += $$_PRO_FILE_PWD_/rbutilqt-win.qrc
}
!dbg {
RESOURCES += $$_PRO_FILE_PWD_/rbutilqt-lang.qrc
}
TRANSLATIONS += lang/rbutil_cs.ts \
lang/rbutil_de.ts \
lang/rbutil_fi.ts \
lang/rbutil_fr.ts \
lang/rbutil_gr.ts \
lang/rbutil_he.ts \
lang/rbutil_it.ts \
lang/rbutil_ja.ts \
lang/rbutil_nl.ts \
lang/rbutil_pl.ts \
lang/rbutil_pt.ts \
lang/rbutil_pt_BR.ts \
lang/rbutil_ru.ts \
lang/rbutil_tr.ts \
lang/rbutil_zh_CN.ts \
lang/rbutil_zh_TW.ts \
QT += network
DEFINES += RBUTIL _LARGEFILE64_SOURCE
win32 {
SOURCES += ../ipodpatcher/ipodio-win32.c
SOURCES += ../ipodpatcher/ipodio-win32-scsi.c
SOURCES += ../sansapatcher/sansaio-win32.c
RC_FILE = rbutilqt.rc
LIBS += -lsetupapi -lnetapi32
}
unix {
SOURCES += ../ipodpatcher/ipodio-posix.c
SOURCES += ../sansapatcher/sansaio-posix.c
}
unix:!static:!libusb1 {
LIBS += -lusb
}
unix:!static:libusb1 {
DEFINES += LIBUSB1
LIBS += -lusb-1.0
}
unix:static {
# force statically linking of libusb. Libraries that are appended
# later will get linked dynamically again.
LIBS += -Wl,-Bstatic -lusb -Wl,-Bdynamic
}
macx {
SOURCES += base/ttscarbon.cpp
HEADERS += base/ttscarbon.h
QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.4u.sdk
QMAKE_LFLAGS_PPC=-mmacosx-version-min=10.4 -arch ppc
QMAKE_LFLAGS_X86=-mmacosx-version-min=10.4 -arch i386
CONFIG+=x86 ppc
LIBS += -L/usr/local/lib -framework IOKit -framework CoreFoundation -framework Carbon -lz
INCLUDEPATH += /usr/local/include
QMAKE_INFO_PLIST = Info.plist
RC_FILE = icons/rbutilqt.icns
# rule for creating a dmg file
dmg.commands = hdiutil create -ov -srcfolder rbutilqt.app/ rbutil.dmg
QMAKE_EXTRA_TARGETS += dmg
}
static {
QTPLUGIN += qtaccessiblewidgets
LIBS += -L$$(QT_BUILD_TREE)/plugins/accessible -lqtaccessiblewidgets
LIBS += -L.
DEFINES += STATIC
message("using static plugin")
}
unix {
target.path = /usr/local/bin
INSTALLS += target
}
|