summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2020-10-02 21:11:24 +0200
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2020-10-11 09:42:13 +0200
commitc8fa53050d30b667f224668ca5de2bb7f07a1b3d (patch)
treea088303d2d536247498c8b4f68096eac33ce113e
parentcd192f239bc9d6e42e3f5b002f4aed8233118095 (diff)
downloadrockbox-c8fa53050d30b667f224668ca5de2bb7f07a1b3d.tar.gz
rockbox-c8fa53050d30b667f224668ca5de2bb7f07a1b3d.zip
rbutil: Add project file for building multiple binaries.
To use ipodpatcher and sansapatcher as external binaries (so we can do proper permission elevation) we need to build them using qmake as part of the main build. Add a subdirs template based project file to do that, and project files for the patchers. Move Linux appimage rules one level up, since it needs to include the patchers as well. Change-Id: I63ee59372668f4319402df65a77a6f04521d133b
-rw-r--r--rbutil/ipodpatcher/ipodpatcher.pro43
-rw-r--r--rbutil/rbutil.pro60
-rw-r--r--rbutil/rbutilqt/rbutilqt.pro26
-rw-r--r--rbutil/sansapatcher/sansapatcher.pro38
4 files changed, 141 insertions, 26 deletions
diff --git a/rbutil/ipodpatcher/ipodpatcher.pro b/rbutil/ipodpatcher/ipodpatcher.pro
new file mode 100644
index 0000000000..65dd1016e4
--- /dev/null
+++ b/rbutil/ipodpatcher/ipodpatcher.pro
@@ -0,0 +1,43 @@
1#
2# __________ __ ___.
3# Open \______ \ ____ ____ | | _\_ |__ _______ ___
4# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7# \/ \/ \/ \/ \/
8#
9# All files in this archive are subject to the GNU General Public License.
10# See the file COPYING in the source tree root for full license agreement.
11#
12# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
13# KIND, either express or implied.
14#
15
16TEMPLATE = app
17TARGET = ipodpatcher
18QT -= core
19
20SOURCES += \
21 main.c \
22 ipodpatcher.c \
23 ipodio-posix.c \
24 ipodio-win32-scsi.c \
25 ipodio-win32.c \
26 fat32format.c \
27 arc4.c \
28
29HEADERS += \
30 arc4.h \
31 ipodio.h \
32 ipodpatcher.h \
33 parttypes.h \
34
35DEFINES += RELEASE=1 _LARGEFILE64_SOURCE
36
37RC_FILE = ipodpatcher.rc
38
39
40unix {
41 target.path = /usr/local/bin
42 INSTALLS += target
43}
diff --git a/rbutil/rbutil.pro b/rbutil/rbutil.pro
new file mode 100644
index 0000000000..db3391d9a8
--- /dev/null
+++ b/rbutil/rbutil.pro
@@ -0,0 +1,60 @@
1#
2# __________ __ ___.
3# Open \______ \ ____ ____ | | _\_ |__ _______ ___
4# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7# \/ \/ \/ \/ \/
8#
9# All files in this archive are subject to the GNU General Public License.
10# See the file COPYING in the source tree root for full license agreement.
11#
12# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
13# KIND, either express or implied.
14#
15
16unix:!mac{
17 CCACHE = $$system(which ccache)
18 !isEmpty(CCACHE) {
19 message("using ccache at $$CCACHE")
20 QMAKE_CXX = ccache $$QMAKE_CXX
21 QMAKE_CC = ccache $$QMAKE_CC
22 }
23}
24
25TEMPLATE = subdirs
26SUBDIRS = rbutilqt ipodpatcher sansapatcher
27
28rbutilqt.depends = ipodpatcher sansapatcher
29
30
31unix:!macx {
32 LINUXDEPLOYQTURL = https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
33 LINUXDEPLOYURL = https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
34
35 appimage_dl.commands = \
36 curl -C- -fLO $$LINUXDEPLOYQTURL -fLO $$LINUXDEPLOYURL ; \
37 chmod +x *.AppImage; \
38 touch appimage_dl
39
40 appimage_prepare.commands = \
41 mkdir -p AppImage/usr/bin; \
42 cp sansapatcher/sansapatcher AppImage/usr/bin; \
43 cp ipodpatcher/ipodpatcher AppImage/usr/bin; \
44 cp rbutilqt/RockboxUtility AppImage/usr/bin
45
46 appimage_prepare.depends = ipodpatcher sansapatcher rbutilqt appimage_dl
47
48 appimage.commands = \
49 ./linuxdeploy-x86_64.AppImage \
50 --appdir AppImage \
51 --verbosity 2 --plugin qt --output appimage \
52 -e AppImage/usr/bin/RockboxUtility \
53 -d $$_PRO_FILE_PWD_/rbutilqt/RockboxUtility.desktop \
54 -i $$_PRO_FILE_PWD_/../docs/logo/rockbox-clef.svg
55 appimage.depends = appimage_prepare
56
57 QMAKE_EXTRA_TARGETS += appimage_dl appimage_prepare appimage
58}
59
60
diff --git a/rbutil/rbutilqt/rbutilqt.pro b/rbutil/rbutilqt/rbutilqt.pro
index fb20143397..d07c1e01bc 100644
--- a/rbutil/rbutilqt/rbutilqt.pro
+++ b/rbutil/rbutilqt/rbutilqt.pro
@@ -239,32 +239,6 @@ unix {
239 INSTALLS += target 239 INSTALLS += target
240} 240}
241 241
242unix:!macx {
243 LINUXDEPLOYQTURL = https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
244 LINUXDEPLOYURL = https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
245
246 appimage_dl.commands = \
247 curl -C- -fLO $$LINUXDEPLOYQTURL -fLO $$LINUXDEPLOYURL ; \
248 chmod +x *.AppImage; \
249 touch appimage_dl
250
251 appimage_prepare.commands = \
252 mkdir -p AppImage/usr/bin; \
253 cp ${TARGET} AppImage/usr/bin
254 appimage_prepare.depends = ${TARGET} appimage_dl
255
256 appimage.commands = \
257 ./linuxdeploy-x86_64.AppImage \
258 --appdir AppImage \
259 --verbosity 2 --plugin qt --output appimage \
260 -e AppImage/usr/bin/${TARGET} \
261 -d $$_PRO_FILE_PWD_/RockboxUtility.desktop \
262 -i $$RBBASE_DIR/docs/logo/rockbox-clef.svg
263 appimage.depends = appimage_prepare
264
265 QMAKE_EXTRA_TARGETS += appimage_dl appimage_prepare appimage
266}
267
268 242
269# source files are separate. 243# source files are separate.
270include(rbutilqt.pri) 244include(rbutilqt.pri)
diff --git a/rbutil/sansapatcher/sansapatcher.pro b/rbutil/sansapatcher/sansapatcher.pro
new file mode 100644
index 0000000000..f8308e6283
--- /dev/null
+++ b/rbutil/sansapatcher/sansapatcher.pro
@@ -0,0 +1,38 @@
1#
2# __________ __ ___.
3# Open \______ \ ____ ____ | | _\_ |__ _______ ___
4# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7# \/ \/ \/ \/ \/
8#
9# All files in this archive are subject to the GNU General Public License.
10# See the file COPYING in the source tree root for full license agreement.
11#
12# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
13# KIND, either express or implied.
14#
15
16TEMPLATE = app
17TARGET = sansapatcher
18QT -= core
19
20SOURCES += \
21 sansaio-posix.c \
22 sansaio-win32.c \
23 sansapatcher.c \
24 main.c
25
26HEADERS += \
27 parttypes.h \
28 sansaio.h \
29 sansapatcher.h \
30
31RC_FILE = sansapatcher.rc
32
33DEFINES += _LARGEFILE64_SOURCE
34
35unix {
36 target.path = /usr/local/bin
37 INSTALLS += target
38}