summaryrefslogtreecommitdiffstats
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2020-10-31 17:21:34 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2020-10-31 19:20:36 +0100
commit5aa7245077e88f2797ccc006754fa3a0b5e75a47 (patch)
tree6109c48c9e65bfe752c42564e5a98d41021f6499 /rbutil
parent125e97b0bf979e1d03b84b17e72fc655b74015fb (diff)
downloadrockbox-5aa7245077e88f2797ccc006754fa3a0b5e75a47.tar.gz
rockbox-5aa7245077e88f2797ccc006754fa3a0b5e75a47.tar.bz2
rockbox-5aa7245077e88f2797ccc006754fa3a0b5e75a47.zip
rbutil: Create more fancy dmg on macOS using dmgbuild.
Add target to build a dmg containing Rockbox Utility, ipodpatcher and sansapatcher as single app bundle, and create a more fancy dmg using dmgbuild. Change-Id: Idb36776c05f820afc98efecf45a011dc75a13c31
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutil.pro23
-rw-r--r--rbutil/rbutilqt/dmgbuild.cfg9
2 files changed, 32 insertions, 0 deletions
diff --git a/rbutil/rbutil.pro b/rbutil/rbutil.pro
index db3391d9a8..d5d9053d6d 100644
--- a/rbutil/rbutil.pro
+++ b/rbutil/rbutil.pro
@@ -57,4 +57,27 @@ unix:!macx {
QMAKE_EXTRA_TARGETS += appimage_dl appimage_prepare appimage
}
+macx {
+ dmgbuild.commands = \
+ python3 -m venv venv; \
+ venv/bin/python -m pip install dmgbuild
+
+ appbundle_merge.commands = \
+ cp -pr rbutilqt/RockboxUtility.app .; \
+ cp ipodpatcher/ipodpatcher.app/Contents/MacOS/ipodpatcher RockboxUtility.app/Contents/MacOS; \
+ cp sansapatcher/sansapatcher.app/Contents/MacOS/sansapatcher RockboxUtility.app/Contents/MacOS
+
+ appbundle_deploy.commands = \
+ $$[QT_INSTALL_BINS]/macdeployqt RockboxUtility.app
+ appbundle_deploy.depends = appbundle_merge
+
+ dmg.commands = \
+ venv/bin/dmgbuild -s $$_PRO_FILE_PWD_/rbutilqt/dmgbuild.cfg \
+ -Dbasepath=$$_PRO_FILE_PWD_ \"Rockbox Utility\" RockboxUtility.dmg
+
+ dmg.depends = appbundle_merge appbundle_deploy dmgbuild
+
+ QMAKE_EXTRA_TARGETS += dmgbuild appbundle_merge appbundle_deploy dmg
+}
+
diff --git a/rbutil/rbutilqt/dmgbuild.cfg b/rbutil/rbutilqt/dmgbuild.cfg
new file mode 100644
index 0000000000..65d7b274a0
--- /dev/null
+++ b/rbutil/rbutilqt/dmgbuild.cfg
@@ -0,0 +1,9 @@
+# Configuration for creating a dmg with dmgbuild
+# (https://github.com/al45tair/dmgbuild)
+
+import os
+
+files = [ 'RockboxUtility.app' ]
+background = '#c6d6f5'
+icon = os.path.join(defines['basepath'], 'rbutilqt/icons/rbutilqt.icns')
+