Fix manual download links.
[kugel-rb.git] / rbutil / rbutilqt / rbutilqt.pro
blob0b03907a9426f900523b2a6afd49dc4f1606e372
2 # ccache
3 unix:!mac:!noccache {
4 CCACHE = $$system(which ccache)
5 !isEmpty(CCACHE) {
6 message("using ccache")
7 QMAKE_CXX = ccache g++
8 QMAKE_CC = ccache gcc
12 MYBUILDDIR = $$OUT_PWD/build/
13 OBJECTS_DIR = $$MYBUILDDIR/o
14 UI_DIR = $$MYBUILDDIR/ui
15 MOC_DIR = $$MYBUILDDIR/moc
16 RCC_DIR = $$MYBUILDDIR/rcc
19 # check version of Qt installation
20 VER = $$find(QT_VERSION, ^4\.[3-9]+.*)
21 isEmpty(VER) {
22 !isEmpty(QT_VERSION) error("Qt found:" $$[QT_VERSION])
23 error("Qt >= 4.3 required!")
25 message("Qt version used:" $$VER)
27 RBBASE_DIR = $$_PRO_FILE_PWD_
28 RBBASE_DIR = $$replace(RBBASE_DIR,/rbutil/rbutilqt,)
30 message("Rockbox Base dir: "$$RBBASE_DIR)
32 # custom rules for rockbox-specific libs
33 !mac {
34 RBLIBPOSTFIX = .a
36 mac {
37 RBLIBPOSTFIX = -universal
39 rbspeex.commands = @$(MAKE) TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/tools/rbspeex librbspeex$$RBLIBPOSTFIX CC=\"$$QMAKE_CC\"
40 libucl.commands = @$(MAKE) TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/tools/ucl/src libucl$$RBLIBPOSTFIX CC=\"$$QMAKE_CC\"
41 libmkamsboot.commands = @$(MAKE) TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/rbutil/mkamsboot libmkamsboot$$RBLIBPOSTFIX CC=\"$$QMAKE_CC\"
42 libmktccboot.commands = @$(MAKE) TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/rbutil/mktccboot libmktccboot$$RBLIBPOSTFIX CC=\"$$QMAKE_CC\"
43 QMAKE_EXTRA_TARGETS += rbspeex libucl libmkamsboot libmktccboot
44 PRE_TARGETDEPS += rbspeex libucl libmkamsboot libmktccboot
46 # rule for creating ctags file
47 tags.commands = ctags -R --c++-kinds=+p --fields=+iaS --extra=+q $(SOURCES)
48 tags.depends = $(SOURCES)
49 QMAKE_EXTRA_TARGETS += tags
51 # add a custom rule for making the translations
52 lrelease.commands = $$[QT_INSTALL_BINS]/lrelease -silent $$_PRO_FILE_
53 QMAKE_EXTRA_TARGETS += lrelease
54 !dbg {
55 PRE_TARGETDEPS += lrelease
58 SOURCES += rbutilqt.cpp \
59 main.cpp \
60 installwindow.cpp \
61 base/httpget.cpp \
62 configure.cpp \
63 zip/zip.cpp \
64 zip/unzip.cpp \
65 base/zipinstaller.cpp \
66 progressloggergui.cpp \
67 installtalkwindow.cpp \
68 base/talkfile.cpp \
69 base/talkgenerator.cpp \
70 base/autodetection.cpp \
71 ../ipodpatcher/ipodpatcher.c \
72 ../sansapatcher/sansapatcher.c \
73 ../chinachippatcher/chinachip.c \
74 browsedirtree.cpp \
75 themesinstallwindow.cpp \
76 base/uninstall.cpp \
77 uninstallwindow.cpp \
78 base/utils.cpp \
79 preview.cpp \
80 base/encoders.cpp \
81 encttscfggui.cpp \
82 base/encttssettings.cpp \
83 base/ttsbase.cpp \
84 base/ttsexes.cpp \
85 base/ttssapi.cpp \
86 base/ttsfestival.cpp \
87 ../../tools/wavtrim.c \
88 ../../tools/voicefont.c \
89 base/voicefile.cpp \
90 createvoicewindow.cpp \
91 base/rbsettings.cpp \
92 base/serverinfo.cpp \
93 base/systeminfo.cpp \
94 base/rbunzip.cpp \
95 base/rbzip.cpp \
96 base/system.cpp \
97 sysinfo.cpp \
98 systrace.cpp \
99 base/bootloaderinstallbase.cpp \
100 base/bootloaderinstallmi4.cpp \
101 base/bootloaderinstallhex.cpp \
102 base/bootloaderinstallipod.cpp \
103 base/bootloaderinstallsansa.cpp \
104 base/bootloaderinstallfile.cpp \
105 base/bootloaderinstallchinachip.cpp \
106 base/bootloaderinstallams.cpp \
107 base/bootloaderinstalltcc.cpp \
108 ../../tools/mkboot.c \
109 ../../tools/iriver.c \
111 HEADERS += rbutilqt.h \
112 installwindow.h \
113 base/httpget.h \
114 configure.h \
115 zip/zip.h \
116 zip/unzip.h \
117 zip/zipentry_p.h \
118 zip/unzip_p.h \
119 zip/zip_p.h \
120 version.h \
121 base/zipinstaller.h \
122 installtalkwindow.h \
123 base/talkfile.h \
124 base/talkgenerator.h \
125 base/autodetection.h \
126 base/progressloggerinterface.h \
127 progressloggergui.h \
128 ../ipodpatcher/ipodpatcher.h \
129 ../ipodpatcher/ipodio.h \
130 ../ipodpatcher/parttypes.h \
131 ../sansapatcher/sansapatcher.h \
132 ../sansapatcher/sansaio.h \
133 ../chinachippatcher/chinachip.h \
134 irivertools/h100sums.h \
135 irivertools/h120sums.h \
136 irivertools/h300sums.h \
137 browsedirtree.h \
138 themesinstallwindow.h \
139 base/uninstall.h \
140 uninstallwindow.h \
141 base/utils.h \
142 preview.h \
143 base/encoders.h \
144 encttscfggui.h \
145 base/encttssettings.h \
146 base/ttsbase.h \
147 base/ttsexes.h \
148 base/ttsfestival.h \
149 base/ttssapi.h \
150 ../../tools/wavtrim.h \
151 ../../tools/voicefont.h \
152 base/voicefile.h \
153 createvoicewindow.h \
154 base/rbsettings.h \
155 base/serverinfo.h \
156 base/systeminfo.h \
157 base/rbunzip.h \
158 base/rbzip.h \
159 sysinfo.h \
160 base/system.h \
161 systrace.h \
162 base/bootloaderinstallbase.h \
163 base/bootloaderinstallmi4.h \
164 base/bootloaderinstallhex.h \
165 base/bootloaderinstallipod.h \
166 base/bootloaderinstallsansa.h \
167 base/bootloaderinstallfile.h \
168 base/bootloaderinstallchinachip.h \
169 base/bootloaderinstallams.h \
170 base/bootloaderinstalltcc.h \
171 ../../tools/mkboot.h \
172 ../../tools/iriver.h \
174 # Needed by QT on Win
175 INCLUDEPATH = $$_PRO_FILE_PWD_ $$_PRO_FILE_PWD_/irivertools $$_PRO_FILE_PWD_/zip $$_PRO_FILE_PWD_/zlib $$_PRO_FILE_PWD_/base
176 INCLUDEPATH += $$RBBASE_DIR/rbutil/ipodpatcher $$RBBASE_DIR/rbutil/sansapatcher $$RBBASE_DIR/tools/rbspeex $$RBBASE_DIR/tools
178 DEPENDPATH = $$INCLUDEPATH
180 LIBS += -L$$OUT_PWD -L$$MYBUILDDIR -lrbspeex -lmkamsboot -lmktccboot -lucl
182 # check for system speex. Add a custom rule for pre-building librbspeex if not
183 # found. Newer versions of speex are split up into libspeex and libspeexdsp,
184 # and some distributions package them separately. Check for both and fall back
185 # to librbspeex if not found.
186 # NOTE: keep this after -lrbspeex, otherwise linker errors occur if the linker
187 # defaults to --as-needed (see http://www.gentoo.org/proj/en/qa/asneeded.xml)
188 LIBSPEEX = $$system(pkg-config --silence-errors --libs speex speexdsp)
189 !static:!isEmpty(LIBSPEEX) {
190 LIBS += $$LIBSPEEX
193 TEMPLATE = app
194 dbg {
195 CONFIG += debug thread qt warn_on
196 DEFINES -= QT_NO_DEBUG_OUTPUT
197 message("debug")
199 !dbg {
200 CONFIG += release thread qt
201 DEFINES -= QT_NO_DEBUG_OUTPUT
202 DEFINES += NODEBUG
203 message("release")
206 TARGET = RockboxUtility
208 FORMS += rbutilqtfrm.ui \
209 aboutbox.ui \
210 installwindowfrm.ui \
211 progressloggerfrm.ui \
212 configurefrm.ui \
213 browsedirtreefrm.ui \
214 installtalkfrm.ui \
215 themesinstallfrm.ui \
216 uninstallfrm.ui \
217 previewfrm.ui \
218 createvoicefrm.ui \
219 sysinfofrm.ui \
220 systracefrm.ui
222 RESOURCES += $$_PRO_FILE_PWD_/rbutilqt.qrc
223 win32 {
224 RESOURCES += $$_PRO_FILE_PWD_/rbutilqt-win.qrc
226 !dbg {
227 RESOURCES += $$_PRO_FILE_PWD_/rbutilqt-lang.qrc
230 TRANSLATIONS += lang/rbutil_cs.ts \
231 lang/rbutil_de.ts \
232 lang/rbutil_fi.ts \
233 lang/rbutil_fr.ts \
234 lang/rbutil_gr.ts \
235 lang/rbutil_he.ts \
236 lang/rbutil_it.ts \
237 lang/rbutil_ja.ts \
238 lang/rbutil_nl.ts \
239 lang/rbutil_pl.ts \
240 lang/rbutil_pt.ts \
241 lang/rbutil_pt_BR.ts \
242 lang/rbutil_ru.ts \
243 lang/rbutil_tr.ts \
244 lang/rbutil_zh_CN.ts \
245 lang/rbutil_zh_TW.ts \
248 QT += network
249 DEFINES += RBUTIL _LARGEFILE64_SOURCE
251 win32 {
252 SOURCES += ../ipodpatcher/ipodio-win32.c
253 SOURCES += ../ipodpatcher/ipodio-win32-scsi.c
254 SOURCES += ../sansapatcher/sansaio-win32.c
255 RC_FILE = rbutilqt.rc
256 LIBS += -lsetupapi -lnetapi32
259 unix {
260 SOURCES += ../ipodpatcher/ipodio-posix.c
261 SOURCES += ../sansapatcher/sansaio-posix.c
263 unix:!static:!libusb1 {
264 LIBS += -lusb
266 unix:!static:libusb1 {
267 DEFINES += LIBUSB1
268 LIBS += -lusb-1.0
271 unix:static {
272 # force statically linking of libusb. Libraries that are appended
273 # later will get linked dynamically again.
274 LIBS += -Wl,-Bstatic -lusb -Wl,-Bdynamic
277 macx {
278 SOURCES += base/ttscarbon.cpp
279 HEADERS += base/ttscarbon.h
280 QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.4u.sdk
281 QMAKE_LFLAGS_PPC=-mmacosx-version-min=10.4 -arch ppc
282 QMAKE_LFLAGS_X86=-mmacosx-version-min=10.4 -arch i386
283 CONFIG+=x86 ppc
284 LIBS += -L/usr/local/lib -framework IOKit -framework CoreFoundation -framework Carbon -lz
285 INCLUDEPATH += /usr/local/include
286 QMAKE_INFO_PLIST = Info.plist
287 RC_FILE = icons/rbutilqt.icns
289 # rule for creating a dmg file
290 dmg.commands = hdiutil create -ov -srcfolder rbutilqt.app/ rbutil.dmg
291 QMAKE_EXTRA_TARGETS += dmg
294 static {
295 QTPLUGIN += qtaccessiblewidgets
296 LIBS += -L$$(QT_BUILD_TREE)/plugins/accessible -lqtaccessiblewidgets
297 LIBS += -L.
298 DEFINES += STATIC
299 message("using static plugin")
302 unix {
303 target.path = /usr/local/bin
304 INSTALLS += target