2009-09-04 21:31:17 +00:00
|
|
|
|
|
|
|
# ccache
|
2009-10-04 16:41:24 +00:00
|
|
|
unix:!mac:!noccache {
|
2007-08-07 18:05:48 +00:00
|
|
|
CCACHE = $$system(which ccache)
|
|
|
|
!isEmpty(CCACHE) {
|
|
|
|
message("using ccache")
|
|
|
|
QMAKE_CXX = ccache g++
|
|
|
|
QMAKE_CC = ccache gcc
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-10-16 20:44:06 +00:00
|
|
|
MYBUILDDIR = $$OUT_PWD/build/
|
|
|
|
OBJECTS_DIR = $$MYBUILDDIR/o
|
|
|
|
UI_DIR = $$MYBUILDDIR/ui
|
|
|
|
MOC_DIR = $$MYBUILDDIR/moc
|
|
|
|
RCC_DIR = $$MYBUILDDIR/rcc
|
|
|
|
|
2007-08-07 18:05:48 +00:00
|
|
|
|
2008-08-31 12:32:27 +00:00
|
|
|
# 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)
|
|
|
|
|
2009-09-04 21:31:17 +00:00
|
|
|
RBBASE_DIR = $$_PRO_FILE_PWD_
|
|
|
|
RBBASE_DIR = $$replace(RBBASE_DIR,/rbutil/rbutilqt,)
|
|
|
|
|
|
|
|
message("Rockbox Base dir: "$$RBBASE_DIR)
|
|
|
|
|
2009-12-06 10:19:43 +00:00
|
|
|
# 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)
|
2009-10-13 20:55:56 +00:00
|
|
|
!static:!isEmpty(LIBSPEEX) {
|
2009-10-08 21:26:39 +00:00
|
|
|
LIBS += $$LIBSPEEX
|
|
|
|
}
|
2009-10-16 20:44:06 +00:00
|
|
|
# custom rules for rockbox-specific libs
|
2008-07-09 21:41:41 +00:00
|
|
|
!mac {
|
2009-11-28 22:39:05 +00:00
|
|
|
RBLIBPOSTFIX = .a
|
2008-07-09 21:41:41 +00:00
|
|
|
}
|
|
|
|
mac {
|
2009-11-28 22:39:05 +00:00
|
|
|
RBLIBPOSTFIX = -universal
|
2008-07-09 21:41:41 +00:00
|
|
|
}
|
2009-11-28 22:39:05 +00:00
|
|
|
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\"
|
2009-10-29 21:31:50 +00:00
|
|
|
QMAKE_EXTRA_TARGETS += rbspeex libucl libmkamsboot libmktccboot
|
|
|
|
PRE_TARGETDEPS += rbspeex libucl libmkamsboot libmktccboot
|
2007-12-15 15:36:40 +00:00
|
|
|
|
2008-06-15 20:53:51 +00:00
|
|
|
# rule for creating ctags file
|
2008-09-28 17:02:36 +00:00
|
|
|
tags.commands = ctags -R --c++-kinds=+p --fields=+iaS --extra=+q $(SOURCES)
|
2008-06-15 20:53:51 +00:00
|
|
|
tags.depends = $(SOURCES)
|
|
|
|
QMAKE_EXTRA_TARGETS += tags
|
|
|
|
|
2008-02-21 19:55:42 +00:00
|
|
|
# add a custom rule for making the translations
|
2009-09-04 21:31:17 +00:00
|
|
|
lrelease.commands = $$[QT_INSTALL_BINS]/lrelease -silent $$_PRO_FILE_
|
2008-01-19 18:33:33 +00:00
|
|
|
QMAKE_EXTRA_TARGETS += lrelease
|
2008-06-24 21:44:53 +00:00
|
|
|
!dbg {
|
|
|
|
PRE_TARGETDEPS += lrelease
|
|
|
|
}
|
2008-01-19 18:33:33 +00:00
|
|
|
|
2007-07-29 17:35:31 +00:00
|
|
|
SOURCES += rbutilqt.cpp \
|
2009-08-15 13:04:21 +00:00
|
|
|
main.cpp \
|
2007-07-29 17:35:31 +00:00
|
|
|
install.cpp \
|
2008-10-12 19:21:58 +00:00
|
|
|
base/httpget.cpp \
|
2007-07-29 17:35:31 +00:00
|
|
|
configure.cpp \
|
|
|
|
zip/zip.cpp \
|
|
|
|
zip/unzip.cpp \
|
2009-05-02 18:50:31 +00:00
|
|
|
base/zipinstaller.cpp \
|
2007-07-29 18:07:31 +00:00
|
|
|
progressloggergui.cpp \
|
2007-08-05 16:17:35 +00:00
|
|
|
installtalkwindow.cpp \
|
2009-06-26 20:40:51 +00:00
|
|
|
base/talkfile.cpp \
|
|
|
|
base/talkgenerator.cpp \
|
2008-10-12 19:21:58 +00:00
|
|
|
base/autodetection.cpp \
|
2007-07-29 17:35:31 +00:00
|
|
|
../ipodpatcher/ipodpatcher.c \
|
|
|
|
../sansapatcher/sansapatcher.c \
|
2009-08-16 20:39:00 +00:00
|
|
|
../chinachippatcher/chinachip.c \
|
2007-08-10 22:17:43 +00:00
|
|
|
browsedirtree.cpp \
|
2009-03-31 19:50:43 +00:00
|
|
|
themesinstallwindow.cpp \
|
2008-10-24 21:23:18 +00:00
|
|
|
base/uninstall.cpp \
|
2007-08-15 14:16:20 +00:00
|
|
|
uninstallwindow.cpp \
|
2008-10-12 19:21:58 +00:00
|
|
|
base/utils.cpp \
|
2007-12-14 19:26:54 +00:00
|
|
|
preview.cpp \
|
2009-04-29 21:32:53 +00:00
|
|
|
base/encoders.cpp \
|
2009-04-29 21:27:01 +00:00
|
|
|
encttscfggui.cpp \
|
2009-04-29 21:32:53 +00:00
|
|
|
base/encttssettings.cpp \
|
2009-10-13 19:54:27 +00:00
|
|
|
base/ttsbase.cpp \
|
|
|
|
base/ttsexes.cpp \
|
|
|
|
base/ttssapi.cpp \
|
|
|
|
base/ttsfestival.cpp \
|
2008-01-11 23:59:12 +00:00
|
|
|
../../tools/wavtrim.c \
|
|
|
|
../../tools/voicefont.c \
|
2009-06-26 20:40:51 +00:00
|
|
|
base/voicefile.cpp \
|
2008-01-25 00:12:25 +00:00
|
|
|
createvoicewindow.cpp \
|
2009-04-29 21:36:05 +00:00
|
|
|
base/rbsettings.cpp \
|
2008-10-12 19:21:58 +00:00
|
|
|
base/rbunzip.cpp \
|
|
|
|
base/rbzip.cpp \
|
2009-08-10 19:46:51 +00:00
|
|
|
base/system.cpp \
|
2008-06-27 21:53:22 +00:00
|
|
|
sysinfo.cpp \
|
2009-08-15 17:02:25 +00:00
|
|
|
systrace.cpp \
|
2008-10-12 19:21:58 +00:00
|
|
|
base/bootloaderinstallbase.cpp \
|
|
|
|
base/bootloaderinstallmi4.cpp \
|
|
|
|
base/bootloaderinstallhex.cpp \
|
|
|
|
base/bootloaderinstallipod.cpp \
|
|
|
|
base/bootloaderinstallsansa.cpp \
|
|
|
|
base/bootloaderinstallfile.cpp \
|
2009-08-16 20:39:00 +00:00
|
|
|
base/bootloaderinstallchinachip.cpp \
|
2009-08-15 13:04:21 +00:00
|
|
|
base/bootloaderinstallams.cpp \
|
2009-10-29 21:31:50 +00:00
|
|
|
base/bootloaderinstalltcc.cpp \
|
2008-09-28 17:02:36 +00:00
|
|
|
../../tools/mkboot.c \
|
2009-10-29 21:31:50 +00:00
|
|
|
../../tools/iriver.c \
|
2008-09-28 17:02:36 +00:00
|
|
|
|
2007-07-29 17:35:31 +00:00
|
|
|
HEADERS += rbutilqt.h \
|
|
|
|
install.h \
|
2008-10-12 19:21:58 +00:00
|
|
|
base/httpget.h \
|
2007-07-29 17:35:31 +00:00
|
|
|
configure.h \
|
|
|
|
zip/zip.h \
|
|
|
|
zip/unzip.h \
|
|
|
|
zip/zipentry_p.h \
|
|
|
|
zip/unzip_p.h \
|
|
|
|
zip/zip_p.h \
|
|
|
|
version.h \
|
2009-05-02 18:50:31 +00:00
|
|
|
base/zipinstaller.h \
|
2007-08-05 16:17:35 +00:00
|
|
|
installtalkwindow.h \
|
2009-06-26 20:40:51 +00:00
|
|
|
base/talkfile.h \
|
|
|
|
base/talkgenerator.h \
|
2008-10-12 19:21:58 +00:00
|
|
|
base/autodetection.h \
|
2009-06-27 15:21:42 +00:00
|
|
|
base/progressloggerinterface.h \
|
2007-07-29 18:07:31 +00:00
|
|
|
progressloggergui.h \
|
2007-07-29 17:35:31 +00:00
|
|
|
../ipodpatcher/ipodpatcher.h \
|
|
|
|
../ipodpatcher/ipodio.h \
|
|
|
|
../ipodpatcher/parttypes.h \
|
|
|
|
../sansapatcher/sansapatcher.h \
|
|
|
|
../sansapatcher/sansaio.h \
|
2009-08-16 20:39:00 +00:00
|
|
|
../chinachippatcher/chinachip.h \
|
2007-07-29 17:35:31 +00:00
|
|
|
irivertools/h100sums.h \
|
|
|
|
irivertools/h120sums.h \
|
2007-08-03 16:20:48 +00:00
|
|
|
irivertools/h300sums.h \
|
2007-08-10 22:17:43 +00:00
|
|
|
browsedirtree.h \
|
2009-03-31 19:50:43 +00:00
|
|
|
themesinstallwindow.h \
|
2008-10-24 21:23:18 +00:00
|
|
|
base/uninstall.h \
|
2007-08-15 14:16:20 +00:00
|
|
|
uninstallwindow.h \
|
2008-10-12 19:21:58 +00:00
|
|
|
base/utils.h \
|
2007-12-14 19:26:54 +00:00
|
|
|
preview.h \
|
2009-04-29 21:32:53 +00:00
|
|
|
base/encoders.h \
|
2009-04-29 21:27:01 +00:00
|
|
|
encttscfggui.h \
|
2009-04-29 21:32:53 +00:00
|
|
|
base/encttssettings.h \
|
2009-10-13 19:54:27 +00:00
|
|
|
base/ttsbase.h \
|
|
|
|
base/ttsexes.h \
|
|
|
|
base/ttsfestival.h \
|
|
|
|
base/ttssapi.h \
|
2008-01-11 23:59:12 +00:00
|
|
|
../../tools/wavtrim.h \
|
|
|
|
../../tools/voicefont.h \
|
2009-06-26 20:40:51 +00:00
|
|
|
base/voicefile.h \
|
2008-01-25 00:12:25 +00:00
|
|
|
createvoicewindow.h \
|
2009-04-29 21:36:05 +00:00
|
|
|
base/rbsettings.h \
|
2008-10-12 19:21:58 +00:00
|
|
|
base/rbunzip.h \
|
|
|
|
base/rbzip.h \
|
2008-06-27 21:53:22 +00:00
|
|
|
sysinfo.h \
|
2009-08-10 19:46:51 +00:00
|
|
|
base/system.h \
|
2009-08-15 17:02:25 +00:00
|
|
|
systrace.h \
|
2008-10-12 19:21:58 +00:00
|
|
|
base/bootloaderinstallbase.h \
|
|
|
|
base/bootloaderinstallmi4.h \
|
|
|
|
base/bootloaderinstallhex.h \
|
|
|
|
base/bootloaderinstallipod.h \
|
|
|
|
base/bootloaderinstallsansa.h \
|
|
|
|
base/bootloaderinstallfile.h \
|
2009-08-16 20:39:00 +00:00
|
|
|
base/bootloaderinstallchinachip.h \
|
2009-08-15 13:04:21 +00:00
|
|
|
base/bootloaderinstallams.h \
|
2009-10-29 21:31:50 +00:00
|
|
|
base/bootloaderinstalltcc.h \
|
2008-09-28 17:02:36 +00:00
|
|
|
../../tools/mkboot.h \
|
2009-10-29 21:31:50 +00:00
|
|
|
../../tools/iriver.h \
|
2009-08-15 13:04:21 +00:00
|
|
|
|
2007-08-07 18:05:48 +00:00
|
|
|
# Needed by QT on Win
|
2009-09-04 21:31:17 +00:00
|
|
|
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
|
2008-09-28 17:02:36 +00:00
|
|
|
|
2009-09-23 19:57:37 +00:00
|
|
|
DEPENDPATH = $$INCLUDEPATH
|
|
|
|
|
2009-10-29 21:31:50 +00:00
|
|
|
LIBS += -L$$OUT_PWD -L$$MYBUILDDIR -lrbspeex -lmkamsboot -lmktccboot -lucl
|
2007-12-14 19:26:54 +00:00
|
|
|
|
2007-07-29 17:35:31 +00:00
|
|
|
TEMPLATE = app
|
2007-09-02 22:11:46 +00:00
|
|
|
dbg {
|
|
|
|
CONFIG += debug thread qt warn_on
|
|
|
|
DEFINES -= QT_NO_DEBUG_OUTPUT
|
|
|
|
message("debug")
|
2007-09-02 18:59:38 +00:00
|
|
|
}
|
2007-09-02 22:11:46 +00:00
|
|
|
!dbg {
|
|
|
|
CONFIG += release thread qt
|
2009-08-15 17:02:25 +00:00
|
|
|
DEFINES -= QT_NO_DEBUG_OUTPUT
|
|
|
|
DEFINES += NODEBUG
|
2007-09-02 22:11:46 +00:00
|
|
|
message("release")
|
2007-09-02 18:59:38 +00:00
|
|
|
}
|
|
|
|
|
2007-07-29 17:35:31 +00:00
|
|
|
TARGET = rbutilqt
|
|
|
|
|
|
|
|
FORMS += rbutilqtfrm.ui \
|
|
|
|
aboutbox.ui \
|
|
|
|
installfrm.ui \
|
2008-03-28 17:30:37 +00:00
|
|
|
progressloggerfrm.ui \
|
2007-07-29 17:35:31 +00:00
|
|
|
configurefrm.ui \
|
2007-08-07 16:48:45 +00:00
|
|
|
browsedirtreefrm.ui \
|
2007-08-10 22:17:43 +00:00
|
|
|
installtalkfrm.ui \
|
2009-03-31 19:50:43 +00:00
|
|
|
themesinstallfrm.ui \
|
2007-08-15 14:16:20 +00:00
|
|
|
uninstallfrm.ui \
|
2007-12-14 19:26:54 +00:00
|
|
|
previewfrm.ui \
|
2008-06-21 10:28:10 +00:00
|
|
|
createvoicefrm.ui \
|
2009-08-15 17:02:25 +00:00
|
|
|
sysinfofrm.ui \
|
|
|
|
systracefrm.ui
|
2007-08-03 16:20:48 +00:00
|
|
|
|
2009-09-04 21:31:17 +00:00
|
|
|
RESOURCES += $$_PRO_FILE_PWD_/rbutilqt.qrc
|
2007-12-17 21:35:25 +00:00
|
|
|
win32 {
|
2009-09-04 21:31:17 +00:00
|
|
|
RESOURCES += $$_PRO_FILE_PWD_/rbutilqt-win.qrc
|
2007-12-17 21:35:25 +00:00
|
|
|
}
|
2008-06-24 21:44:53 +00:00
|
|
|
!dbg {
|
2009-09-04 21:31:17 +00:00
|
|
|
RESOURCES += $$_PRO_FILE_PWD_/rbutilqt-lang.qrc
|
2008-06-24 21:44:53 +00:00
|
|
|
}
|
2007-07-29 17:35:31 +00:00
|
|
|
|
2009-10-08 21:40:12 +00:00
|
|
|
TRANSLATIONS += lang/rbutil_cs.ts \
|
|
|
|
lang/rbutil_de.ts \
|
2008-10-05 12:40:57 +00:00
|
|
|
lang/rbutil_fi.ts \
|
|
|
|
lang/rbutil_fr.ts \
|
|
|
|
lang/rbutil_gr.ts \
|
|
|
|
lang/rbutil_he.ts \
|
2009-01-07 17:36:43 +00:00
|
|
|
lang/rbutil_ja.ts \
|
2008-10-05 12:40:57 +00:00
|
|
|
lang/rbutil_nl.ts \
|
2009-01-07 17:36:43 +00:00
|
|
|
lang/rbutil_pt.ts \
|
2009-07-16 08:32:56 +00:00
|
|
|
lang/rbutil_pt_BR.ts \
|
2008-10-05 12:40:57 +00:00
|
|
|
lang/rbutil_tr.ts \
|
|
|
|
lang/rbutil_zh_CN.ts \
|
|
|
|
lang/rbutil_zh_TW.ts \
|
2009-01-07 17:36:43 +00:00
|
|
|
|
2008-09-11 17:16:18 +00:00
|
|
|
|
2007-07-29 17:35:31 +00:00
|
|
|
QT += network
|
2007-07-29 20:43:07 +00:00
|
|
|
DEFINES += RBUTIL _LARGEFILE64_SOURCE
|
2007-07-29 17:35:31 +00:00
|
|
|
|
2007-08-07 16:48:45 +00:00
|
|
|
win32 {
|
2007-07-29 17:35:31 +00:00
|
|
|
SOURCES += ../ipodpatcher/ipodio-win32.c
|
2009-08-07 22:19:59 +00:00
|
|
|
SOURCES += ../ipodpatcher/ipodio-win32-scsi.c
|
2007-07-29 17:35:31 +00:00
|
|
|
SOURCES += ../sansapatcher/sansaio-win32.c
|
2007-08-14 15:44:47 +00:00
|
|
|
RC_FILE = rbutilqt.rc
|
2008-06-21 10:28:10 +00:00
|
|
|
LIBS += -lsetupapi -lnetapi32
|
2007-07-29 17:35:31 +00:00
|
|
|
}
|
|
|
|
|
2007-08-07 16:48:45 +00:00
|
|
|
unix {
|
2007-07-29 17:35:31 +00:00
|
|
|
SOURCES += ../ipodpatcher/ipodio-posix.c
|
|
|
|
SOURCES += ../sansapatcher/sansaio-posix.c
|
2008-02-21 19:55:42 +00:00
|
|
|
}
|
2009-08-08 12:28:47 +00:00
|
|
|
unix:!static:!libusb1 {
|
2007-09-23 10:34:28 +00:00
|
|
|
LIBS += -lusb
|
2007-07-29 17:35:31 +00:00
|
|
|
}
|
2009-08-08 12:28:47 +00:00
|
|
|
unix:!static:libusb1 {
|
|
|
|
DEFINES += LIBUSB1
|
|
|
|
LIBS += -lusb-1.0
|
|
|
|
}
|
|
|
|
|
2008-02-21 19:55:42 +00:00
|
|
|
unix:static {
|
2008-05-17 14:50:51 +00:00
|
|
|
# force statically linking of libusb. Libraries that are appended
|
|
|
|
# later will get linked dynamically again.
|
|
|
|
LIBS += -Wl,-Bstatic -lusb -Wl,-Bdynamic
|
2008-02-21 19:55:42 +00:00
|
|
|
}
|
2007-07-29 20:43:07 +00:00
|
|
|
|
2007-09-01 21:13:22 +00:00
|
|
|
macx {
|
|
|
|
QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.4u.sdk
|
2008-07-09 20:36:38 +00:00
|
|
|
QMAKE_LFLAGS_PPC=-mmacosx-version-min=10.4 -arch ppc
|
|
|
|
QMAKE_LFLAGS_X86=-mmacosx-version-min=10.4 -arch i386
|
2007-09-01 21:13:22 +00:00
|
|
|
CONFIG+=x86 ppc
|
2009-11-28 22:39:05 +00:00
|
|
|
LIBS += -L/usr/local/lib -framework IOKit -lz
|
2007-10-13 16:26:38 +00:00
|
|
|
INCLUDEPATH += /usr/local/include
|
2007-10-13 17:43:12 +00:00
|
|
|
QMAKE_INFO_PLIST = Info.plist
|
|
|
|
RC_FILE = icons/rbutilqt.icns
|
2008-06-30 14:39:21 +00:00
|
|
|
|
|
|
|
# rule for creating a dmg file
|
|
|
|
dmg.commands = hdiutil create -ov -srcfolder rbutilqt.app/ rbutil.dmg
|
|
|
|
QMAKE_EXTRA_TARGETS += dmg
|
2007-09-01 21:13:22 +00:00
|
|
|
}
|
|
|
|
|
2007-08-22 22:19:22 +00:00
|
|
|
static {
|
|
|
|
QTPLUGIN += qtaccessiblewidgets
|
|
|
|
LIBS += -L$$(QT_BUILD_TREE)/plugins/accessible -lqtaccessiblewidgets
|
2008-07-06 19:46:48 +00:00
|
|
|
LIBS += -L.
|
2007-08-22 22:19:22 +00:00
|
|
|
DEFINES += STATIC
|
|
|
|
message("using static plugin")
|
|
|
|
}
|
2007-07-29 20:43:07 +00:00
|
|
|
|
2008-05-24 16:57:40 +00:00
|
|
|
unix {
|
|
|
|
target.path = /usr/local/bin
|
|
|
|
INSTALLS += target
|
|
|
|
}
|
2008-01-06 22:06:13 +00:00
|
|
|
|
2008-09-02 16:22:31 +00:00
|
|
|
|
2008-09-08 21:11:55 +00:00
|
|
|
|