rbutil: Change MacOS dmgbuild to use plistlib.
We're not dealing with binary plist files, to biplist is not the one we want. Also, plistlib is part of Python. Change-Id: I529516da0d6b04809a7c0d38b20c6f40900560f8
This commit is contained in:
parent
5999b4f791
commit
88a50ab104
2 changed files with 6 additions and 4 deletions
|
@ -78,7 +78,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
|||
COMMENT "Setting up dmgbuild virtualenv"
|
||||
OUTPUT ${DMGBUILD}
|
||||
COMMAND python3 -m venv ${CMAKE_BINARY_DIR}/venv
|
||||
COMMAND ${CMAKE_BINARY_DIR}/venv/bin/python -m pip install -q dmgbuild biplist
|
||||
COMMAND ${CMAKE_BINARY_DIR}/venv/bin/python -m pip install -q dmgbuild
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
# Configuration for creating a dmg with dmgbuild
|
||||
# (https://github.com/al45tair/dmgbuild)
|
||||
# Needs biplist as additional package.
|
||||
# Requires at least Python 3.4
|
||||
|
||||
import os
|
||||
import biplist
|
||||
import plistlib
|
||||
|
||||
_appbundle = defines['appbundle']
|
||||
_plist = biplist.readPlist(os.path.join(_appbundle, 'Contents/Info.plist'))
|
||||
_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 ]
|
||||
|
|
Loading…
Reference in a new issue