mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Add a plist to the utils bundle
Also move it to where it is easy to sign
This commit is contained in:
parent
1db4a15d89
commit
133ed8968f
@ -168,7 +168,7 @@ class Freeze(object):
|
||||
self.resources_dir = join(self.contents_dir, 'Resources')
|
||||
self.frameworks_dir = join(self.contents_dir, 'Frameworks')
|
||||
self.exe_dir = join(self.contents_dir, 'MacOS')
|
||||
self.helpers_dir = join(self.build_dir, 'Helpers', 'utils.app', 'Contents', 'MacOS')
|
||||
self.helpers_dir = join(self.contents_dir, 'utils.app', 'Contents', 'MacOS')
|
||||
self.site_packages = join(self.resources_dir, 'Python', 'site-packages')
|
||||
self.to_strip = []
|
||||
self.warnings = []
|
||||
@ -375,6 +375,24 @@ class Freeze(object):
|
||||
dest = join(cdir, 'Resources')
|
||||
src = self.resources_dir
|
||||
os.symlink(os.path.relpath(src, cdir), dest)
|
||||
pl = dict(
|
||||
CFBundleDevelopmentRegion='English',
|
||||
CFBundleDisplayName=APPNAME + ' - utils',
|
||||
CFBundleName=APPNAME + '-utils',
|
||||
CFBundleIdentifier='com.calibre-ebook.utils',
|
||||
LSBackgroundOnly='1',
|
||||
CFBundleVersion=VERSION,
|
||||
CFBundleShortVersionString=VERSION,
|
||||
CFBundlePackageType='APPL',
|
||||
CFBundleSignature='????',
|
||||
CFBundleExecutable='pdftohtml',
|
||||
LSMinimumSystemVersion='10.14.0',
|
||||
LSRequiresNativeExecution=True,
|
||||
NSAppleScriptEnabled=False,
|
||||
CFBundleIconFile='',
|
||||
)
|
||||
with open(join(cdir, 'Info.plist'), 'wb') as p:
|
||||
plistlib.dump(pl, p)
|
||||
|
||||
@flush
|
||||
def add_calibre_plugins(self):
|
||||
@ -412,7 +430,7 @@ class Freeze(object):
|
||||
CFBundleSignature='????',
|
||||
CFBundleExecutable='calibre',
|
||||
CFBundleDocumentTypes=docs,
|
||||
LSMinimumSystemVersion='10.9.5',
|
||||
LSMinimumSystemVersion='10.14.0',
|
||||
LSRequiresNativeExecution=True,
|
||||
NSAppleScriptEnabled=False,
|
||||
NSHumanReadableCopyright=time.strftime('Copyright %Y, Kovid Goyal'),
|
||||
|
@ -109,9 +109,10 @@ def do_sign_app(appdir):
|
||||
# Sign everything in MacOS except the main executables of the various
|
||||
# app bundles which will be signed automatically by codesign when
|
||||
# signing the app bundles
|
||||
with current_dir('MacOS'):
|
||||
items = set(os.listdir('.')) - executables
|
||||
codesign(expand_dirs(items))
|
||||
for MacOS in ('MacOS', 'utils.app/Contents/MacOS'):
|
||||
with current_dir(MacOS):
|
||||
items = set(os.listdir('.')) - executables
|
||||
codesign(expand_dirs(items))
|
||||
|
||||
# Sign everything in Frameworks
|
||||
with current_dir('Frameworks'):
|
||||
|
@ -34,7 +34,7 @@ def popen(cmd, **kw):
|
||||
|
||||
|
||||
if isosx and hasattr(sys, 'frameworks_dir'):
|
||||
base = os.path.join(os.path.dirname(os.path.dirname(sys.frameworks_dir)), 'Helpers', 'utils.app', 'Contents', 'MacOS')
|
||||
base = os.path.join(os.path.dirname(sys.frameworks_dir), 'utils.app', 'Contents', 'MacOS')
|
||||
PDFTOHTML = os.path.join(base, PDFTOHTML)
|
||||
if iswindows and hasattr(sys, 'frozen'):
|
||||
base = sys.extensions_location if hasattr(sys, 'new_app_layout') else os.path.dirname(sys.executable)
|
||||
|
Loading…
x
Reference in New Issue
Block a user