mirror of https://github.com/Syncplay/syncplay
appdmg: update for dmgbuild 1.4.2
This commit is contained in:
parent
594ca8ba0d
commit
7b8cb3b94a
11
appdmg.py
11
appdmg.py
|
@ -1,16 +1,18 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
import biplist
|
||||
import os.path
|
||||
|
||||
import plistlib
|
||||
|
||||
application = defines.get('app', 'dist/Syncplay.app')
|
||||
appname = os.path.basename(application)
|
||||
|
||||
def read_plist(path):
|
||||
with open(path, 'rb') as f:
|
||||
return plistlib.load(f)
|
||||
|
||||
def icon_from_app(app_path):
|
||||
plist_path = os.path.join(app_path, 'Contents', 'Info.plist')
|
||||
plist = biplist.readPlist(plist_path)
|
||||
plist = read_plist(plist_path)
|
||||
icon_name = plist['CFBundleIconFile']
|
||||
icon_root, icon_ext = os.path.splitext(icon_name)
|
||||
if not icon_ext:
|
||||
|
@ -18,7 +20,6 @@ def icon_from_app(app_path):
|
|||
icon_name = icon_root + icon_ext
|
||||
return os.path.join(app_path, 'Contents', 'Resources', icon_name)
|
||||
|
||||
|
||||
# Volume format (see hdiutil create -help)
|
||||
format = defines.get('format', 'UDZO')
|
||||
|
||||
|
|
Loading…
Reference in New Issue