summaryrefslogtreecommitdiff
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-bbd1056afbf2f9e61fe2e8d7fe86ff6fe6b5cee0.tar.gz
rockbox-bbd1056afbf2f9e61fe2e8d7fe86ff6fe6b5cee0.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")
73 if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") 73 if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
74 message(WARNING "Deploying a Debug build.") 74 message(WARNING "Deploying a Debug build.")
75 endif() 75 endif()
76 set(DMGBUILD ${CMAKE_BINARY_DIR}/venv/bin/dmgbuild) 76 set(DMGBUILD ${CMAKE_BINARY_DIR}/venv/bin/python3 -m dmgbuild)
77 set(DMGBUILD_STAMP ${CMAKE_BINARY_DIR}/dmgbuild.stamp)
77 find_program(MACDEPLOYQT_EXECUTABLE macdeployqt HINTS "${qtbindir}") 78 find_program(MACDEPLOYQT_EXECUTABLE macdeployqt HINTS "${qtbindir}")
78 79
79 add_custom_command( 80 add_custom_command(
80 COMMENT "Setting up dmgbuild virtualenv" 81 COMMENT "Setting up dmgbuild virtualenv"
81 OUTPUT ${DMGBUILD} 82 OUTPUT ${DMGBUILD_STAMP}
82 COMMAND python3 -m venv ${CMAKE_BINARY_DIR}/venv 83 COMMAND python3 -m venv ${CMAKE_BINARY_DIR}/venv
83 COMMAND ${CMAKE_BINARY_DIR}/venv/bin/python -m pip install -q dmgbuild 84 COMMAND ${CMAKE_BINARY_DIR}/venv/bin/python -m pip install -q dmgbuild
84 ) 85 )
@@ -92,7 +93,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
92 -Dappbundle=${target}.app 93 -Dappbundle=${target}.app
93 ${target} ${CMAKE_BINARY_DIR}/${target}.dmg 94 ${target} ${CMAKE_BINARY_DIR}/${target}.dmg
94 DEPENDS ${target} 95 DEPENDS ${target}
95 ${DMGBUILD} 96 ${DMGBUILD_STAMP}
96 ) 97 )
97 add_custom_target(deploy_${target} 98 add_custom_target(deploy_${target}
98 DEPENDS ${CMAKE_BINARY_DIR}/${target}.dmg) 99 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 @@
3<plist version="0.9"> 3<plist version="0.9">
4 <dict> 4 <dict>
5 <key>CFBundleExecutable</key> 5 <key>CFBundleExecutable</key>
6 <string>rbthemeeditor</string> 6 <string>RockboxThemeEditor</string>
7 <key>CFBundleName</key> 7 <key>CFBundleName</key>
8 <string>Theme Editor</string> 8 <string>Theme Editor</string>
9 <key>CFBundleShortVersionString</key> 9 <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 @@
1# Configuration for creating a dmg with dmgbuild
2# (https://github.com/al45tair/dmgbuild)
3# Requires at least Python 3.4
4
5import os
6import plistlib
7
8_appbundle = defines['appbundle']
9_plfile = open(os.path.join(_appbundle, 'Contents/Info.plist'))
10_pldata = _plfile.read().encode()
11_plist = plistlib.loads(_pldata)
12_iconfile = os.path.join(_appbundle, 'Contents/Resources', _plist['CFBundleIconFile'])
13
14files = [ _appbundle ]
15icon = _iconfile
16background = '#c6d6f5'
17