summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2021-12-28 19:53:54 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2021-12-28 19:53:54 +0100
commitbbd1056afbf2f9e61fe2e8d7fe86ff6fe6b5cee0 (patch)
tree4fa19ce78e5702cdb35c281d35f7d654abcd347a
parent3d983ad3a1e931678b5ba512a153c3460a88d246 (diff)
downloadrockbox-bbd1056afb.tar.gz
rockbox-bbd1056afb.zip
themeeditor: Fix dmg deploy steps.
- Fix binary name in Info.plist. - Run dmgbuild as Python module, in some cases it isn't available directly. - Add missing dmgbuild configuration for themeeditor. Change-Id: I2db50959b88283f43e2203cf71b130cdb33103dd
-rw-r--r--utils/cmake/deploy.cmake7
-rw-r--r--utils/themeeditor/Info.plist2
-rw-r--r--utils/themeeditor/dmgbuild.cfg17
3 files changed, 22 insertions, 4 deletions
diff --git a/utils/cmake/deploy.cmake b/utils/cmake/deploy.cmake
index 34e937f5d5..4a43c033fa 100644
--- a/utils/cmake/deploy.cmake
+++ b/utils/cmake/deploy.cmake
@@ -73,12 +73,13 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
message(WARNING "Deploying a Debug build.")
endif()
- set(DMGBUILD ${CMAKE_BINARY_DIR}/venv/bin/dmgbuild)
+ set(DMGBUILD ${CMAKE_BINARY_DIR}/venv/bin/python3 -m dmgbuild)
+ set(DMGBUILD_STAMP ${CMAKE_BINARY_DIR}/dmgbuild.stamp)
find_program(MACDEPLOYQT_EXECUTABLE macdeployqt HINTS "${qtbindir}")
add_custom_command(
COMMENT "Setting up dmgbuild virtualenv"
- OUTPUT ${DMGBUILD}
+ OUTPUT ${DMGBUILD_STAMP}
COMMAND python3 -m venv ${CMAKE_BINARY_DIR}/venv
COMMAND ${CMAKE_BINARY_DIR}/venv/bin/python -m pip install -q dmgbuild
)
@@ -92,7 +93,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
-Dappbundle=${target}.app
${target} ${CMAKE_BINARY_DIR}/${target}.dmg
DEPENDS ${target}
- ${DMGBUILD}
+ ${DMGBUILD_STAMP}
)
add_custom_target(deploy_${target}
DEPENDS ${CMAKE_BINARY_DIR}/${target}.dmg)
diff --git a/utils/themeeditor/Info.plist b/utils/themeeditor/Info.plist
index 95c5604604..22cf2ea1cf 100644
--- a/utils/themeeditor/Info.plist
+++ b/utils/themeeditor/Info.plist
@@ -3,7 +3,7 @@
<plist version="0.9">
<dict>
<key>CFBundleExecutable</key>
- <string>rbthemeeditor</string>
+ <string>RockboxThemeEditor</string>
<key>CFBundleName</key>
<string>Theme Editor</string>
<key>CFBundleShortVersionString</key>
diff --git a/utils/themeeditor/dmgbuild.cfg b/utils/themeeditor/dmgbuild.cfg
new file mode 100644
index 0000000000..70d086c098
--- /dev/null
+++ b/utils/themeeditor/dmgbuild.cfg
@@ -0,0 +1,17 @@
+# Configuration for creating a dmg with dmgbuild
+# (https://github.com/al45tair/dmgbuild)
+# Requires at least Python 3.4
+
+import os
+import plistlib
+
+_appbundle = defines['appbundle']
+_plfile = open(os.path.join(_appbundle, 'Contents/Info.plist'))
+_pldata = _plfile.read().encode()
+_plist = plistlib.loads(_pldata)
+_iconfile = os.path.join(_appbundle, 'Contents/Resources', _plist['CFBundleIconFile'])
+
+files = [ _appbundle ]
+icon = _iconfile
+background = '#c6d6f5'
+