Integrate convttf into tools/.
[kugel-rb/myfork.git] / rbutil / rbutilqt / rbutilqt.pro
blob78c399ebd752c8428ba0dd8bce6e8c89bd66466d
1 unix:!mac {
2 CCACHE = $$system(which ccache)
3 !isEmpty(CCACHE) {
4 message("using ccache")
5 QMAKE_CXX = ccache g++
6 QMAKE_CC = ccache gcc
10 OBJECTS_DIR = build/o
11 UI_DIR = build/ui
12 MOC_DIR = build/moc
13 RCC_DIR = build/rcc
15 # check version of Qt installation
16 VER = $$find(QT_VERSION, ^4\.[3-9]+.*)
17 isEmpty(VER) {
18 !isEmpty(QT_VERSION) error("Qt found:" $$[QT_VERSION])
19 error("Qt >= 4.3 required!")
21 message("Qt version used:" $$VER)
23 # add a custom rule for pre-building librbspeex
24 !mac {
25 rbspeex.commands = @$(MAKE) -C ../../tools/rbspeex librbspeex.a
27 mac {
28 rbspeex.commands = @$(MAKE) -C ../../tools/rbspeex librbspeex-universal
30 QMAKE_EXTRA_TARGETS += rbspeex
31 PRE_TARGETDEPS += rbspeex
33 # rule for creating ctags file
34 tags.commands = ctags -R --c++-kinds=+p --fields=+iaS --extra=+q $(SOURCES)
35 tags.depends = $(SOURCES)
36 QMAKE_EXTRA_TARGETS += tags
38 # add a custom rule for making the translations
39 lrelease.commands = $$[QT_INSTALL_BINS]/lrelease -silent rbutilqt.pro
40 QMAKE_EXTRA_TARGETS += lrelease
41 !dbg {
42 PRE_TARGETDEPS += lrelease
45 #custom rules for libucl.a
46 !mac {
47 libucl.commands = @$(MAKE) -C ../../tools/ucl/src libucl.a
49 mac {
50 libucl.commands = @$(MAKE) -C ../../tools/ucl/src libucl-universal
52 QMAKE_EXTRA_TARGETS += libucl
53 PRE_TARGETDEPS += libucl
55 #custom rules for libmkamsboot.a
56 !mac {
57 libmkamsboot.commands = @$(MAKE) -C ../mkamsboot libmkamsboot.a
59 mac {
60 libmkamsboot.commands = @$(MAKE) -C ../mkamsboot libmkamsboot-universal
62 QMAKE_EXTRA_TARGETS += libmkamsboot
63 PRE_TARGETDEPS += libmkamsboot
65 SOURCES += rbutilqt.cpp \
66 main.cpp \
67 install.cpp \
68 base/httpget.cpp \
69 configure.cpp \
70 zip/zip.cpp \
71 zip/unzip.cpp \
72 base/zipinstaller.cpp \
73 progressloggergui.cpp \
74 installtalkwindow.cpp \
75 base/talkfile.cpp \
76 base/talkgenerator.cpp \
77 base/autodetection.cpp \
78 ../ipodpatcher/ipodpatcher.c \
79 ../sansapatcher/sansapatcher.c \
80 ../chinachippatcher/chinachip.c \
81 browsedirtree.cpp \
82 themesinstallwindow.cpp \
83 base/uninstall.cpp \
84 uninstallwindow.cpp \
85 base/utils.cpp \
86 preview.cpp \
87 base/encoders.cpp \
88 encttscfggui.cpp \
89 base/encttssettings.cpp \
90 base/tts.cpp \
91 ../../tools/wavtrim.c \
92 ../../tools/voicefont.c \
93 base/voicefile.cpp \
94 createvoicewindow.cpp \
95 base/rbsettings.cpp \
96 base/rbunzip.cpp \
97 base/rbzip.cpp \
98 base/system.cpp \
99 sysinfo.cpp \
100 systrace.cpp \
101 base/bootloaderinstallbase.cpp \
102 base/bootloaderinstallmi4.cpp \
103 base/bootloaderinstallhex.cpp \
104 base/bootloaderinstallipod.cpp \
105 base/bootloaderinstallsansa.cpp \
106 base/bootloaderinstallfile.cpp \
107 base/bootloaderinstallchinachip.cpp \
108 base/bootloaderinstallams.cpp \
109 ../../tools/mkboot.c \
110 ../../tools/iriver.c
112 HEADERS += rbutilqt.h \
113 install.h \
114 base/httpget.h \
115 configure.h \
116 zip/zip.h \
117 zip/unzip.h \
118 zip/zipentry_p.h \
119 zip/unzip_p.h \
120 zip/zip_p.h \
121 version.h \
122 base/zipinstaller.h \
123 installtalkwindow.h \
124 base/talkfile.h \
125 base/talkgenerator.h \
126 base/autodetection.h \
127 base/progressloggerinterface.h \
128 progressloggergui.h \
129 ../ipodpatcher/ipodpatcher.h \
130 ../ipodpatcher/ipodio.h \
131 ../ipodpatcher/parttypes.h \
132 ../sansapatcher/sansapatcher.h \
133 ../sansapatcher/sansaio.h \
134 ../chinachippatcher/chinachip.h \
135 irivertools/h100sums.h \
136 irivertools/h120sums.h \
137 irivertools/h300sums.h \
138 browsedirtree.h \
139 themesinstallwindow.h \
140 base/uninstall.h \
141 uninstallwindow.h \
142 base/utils.h \
143 preview.h \
144 base/encoders.h \
145 encttscfggui.h \
146 base/encttssettings.h \
147 base/tts.h \
148 ../../tools/wavtrim.h \
149 ../../tools/voicefont.h \
150 base/voicefile.h \
151 createvoicewindow.h \
152 base/rbsettings.h \
153 base/rbunzip.h \
154 base/rbzip.h \
155 sysinfo.h \
156 base/system.h \
157 systrace.h \
158 base/bootloaderinstallbase.h \
159 base/bootloaderinstallmi4.h \
160 base/bootloaderinstallhex.h \
161 base/bootloaderinstallipod.h \
162 base/bootloaderinstallsansa.h \
163 base/bootloaderinstallfile.h \
164 base/bootloaderinstallchinachip.h \
165 base/bootloaderinstallams.h \
166 ../../tools/mkboot.h \
167 ../../tools/iriver.h
169 # Needed by QT on Win
170 INCLUDEPATH = . irivertools zip zlib ../ipodpatcher ../sansapatcher ../../tools/rbspeex ../../tools
171 INCLUDEPATH += base
173 LIBS += -L../../tools/rbspeex -lrbspeex -L../mkamsboot -lmkamsboot -L../../tools/ucl/src/ -lucl
175 TEMPLATE = app
176 dbg {
177 CONFIG += debug thread qt warn_on
178 DEFINES -= QT_NO_DEBUG_OUTPUT
179 message("debug")
181 !dbg {
182 CONFIG += release thread qt
183 DEFINES -= QT_NO_DEBUG_OUTPUT
184 DEFINES += NODEBUG
185 message("release")
188 TARGET = rbutilqt
190 FORMS += rbutilqtfrm.ui \
191 aboutbox.ui \
192 installfrm.ui \
193 progressloggerfrm.ui \
194 configurefrm.ui \
195 browsedirtreefrm.ui \
196 installtalkfrm.ui \
197 themesinstallfrm.ui \
198 uninstallfrm.ui \
199 previewfrm.ui \
200 createvoicefrm.ui \
201 sysinfofrm.ui \
202 systracefrm.ui
204 RESOURCES += rbutilqt.qrc
205 win32 {
206 RESOURCES += rbutilqt-win.qrc
208 !dbg {
209 RESOURCES += rbutilqt-lang.qrc
212 TRANSLATIONS += lang/rbutil_de.ts \
213 lang/rbutil_fi.ts \
214 lang/rbutil_fr.ts \
215 lang/rbutil_gr.ts \
216 lang/rbutil_he.ts \
217 lang/rbutil_ja.ts \
218 lang/rbutil_nl.ts \
219 lang/rbutil_pt.ts \
220 lang/rbutil_pt_BR.ts \
221 lang/rbutil_tr.ts \
222 lang/rbutil_zh_CN.ts \
223 lang/rbutil_zh_TW.ts \
226 QT += network
227 DEFINES += RBUTIL _LARGEFILE64_SOURCE
229 win32 {
230 SOURCES += ../ipodpatcher/ipodio-win32.c
231 SOURCES += ../ipodpatcher/ipodio-win32-scsi.c
232 SOURCES += ../sansapatcher/sansaio-win32.c
233 RC_FILE = rbutilqt.rc
234 LIBS += -lsetupapi -lnetapi32
237 unix {
238 SOURCES += ../ipodpatcher/ipodio-posix.c
239 SOURCES += ../sansapatcher/sansaio-posix.c
241 unix:!static:!libusb1 {
242 LIBS += -lusb
244 unix:!static:libusb1 {
245 DEFINES += LIBUSB1
246 LIBS += -lusb-1.0
249 unix:static {
250 # force statically linking of libusb. Libraries that are appended
251 # later will get linked dynamically again.
252 LIBS += -Wl,-Bstatic -lusb -Wl,-Bdynamic
255 macx {
256 QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.4u.sdk
257 QMAKE_LFLAGS_PPC=-mmacosx-version-min=10.4 -arch ppc
258 QMAKE_LFLAGS_X86=-mmacosx-version-min=10.4 -arch i386
259 CONFIG+=x86 ppc
260 LIBS += -L/usr/local/lib -framework IOKit
261 INCLUDEPATH += /usr/local/include
262 QMAKE_INFO_PLIST = Info.plist
263 RC_FILE = icons/rbutilqt.icns
265 # rule for creating a dmg file
266 dmg.commands = hdiutil create -ov -srcfolder rbutilqt.app/ rbutil.dmg
267 QMAKE_EXTRA_TARGETS += dmg
270 static {
271 QTPLUGIN += qtaccessiblewidgets
272 LIBS += -L$$(QT_BUILD_TREE)/plugins/accessible -lqtaccessiblewidgets
273 LIBS += -L.
274 DEFINES += STATIC
275 message("using static plugin")
278 unix {
279 target.path = /usr/local/bin
280 INSTALLS += target