Register the calibre URL on macOS as well

This commit is contained in:
Kovid Goyal 2020-11-11 12:34:31 +05:30
parent 0191c621fb
commit 9dad654fc2
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -403,11 +403,18 @@ class Freeze(object):
BOOK_EXTENSIONS = calibre_constants['book_extensions']
env = dict(**ENV)
env['CALIBRE_LAUNCHED_FROM_BUNDLE'] = '1'
docs = [{'CFBundleTypeName': 'E-book',
'CFBundleTypeExtensions': list(BOOK_EXTENSIONS),
'CFBundleTypeIconFile': 'book.icns',
'CFBundleTypeRole': 'Viewer',
}]
docs = [{
'CFBundleTypeName': 'E-book',
'CFBundleTypeExtensions': list(BOOK_EXTENSIONS),
'CFBundleTypeIconFile': 'book.icns',
'CFBundleTypeRole': 'Viewer',
}]
url_handlers = [dict(
CFBundleTypeRole='Viewer',
CFBundleURLIconFile='calibre',
CFBundleURLName='com.calibre-ebook.calibre-url',
CFBundleURLSchemes=['calibre']
)]
pl = dict(
CFBundleDevelopmentRegion='English',
@ -420,6 +427,7 @@ class Freeze(object):
CFBundleSignature='????',
CFBundleExecutable='calibre',
CFBundleDocumentTypes=docs,
CFBundleURLTypes=url_handlers,
LSMinimumSystemVersion='10.14.0',
LSRequiresNativeExecution=True,
NSAppleScriptEnabled=False,