def create_plist(self):
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',
}]
pl = dict(
CFBundleDevelopmentRegion='English',
CFBundleDisplayName=APPNAME,
CFBundleName=APPNAME,
CFBundleIdentifier='net.kovidgoyal.calibre',
CFBundleVersion=VERSION,
CFBundleShortVersionString=VERSION,
CFBundlePackageType='APPL',
CFBundleSignature='????',
CFBundleExecutable='calibre',
CFBundleDocumentTypes=docs,
LSMinimumSystemVersion='10.9.5',
LSRequiresNativeExecution=True,
NSAppleScriptEnabled=False,
NSHumanReadableCopyright=time.strftime('Copyright %Y, Kovid Goyal'),
CFBundleGetInfoString=('calibre, an E-book management '
'application. Visit https://calibre-ebook.com for details.'),
CFBundleIconFile='calibre.icns',
NSHighResolutionCapable=True,
LSApplicationCategoryType='public.app-category.productivity',
LSEnvironment=env
)
plistlib.writePlist(pl, join(self.contents_dir, 'Info.plist'))
评论列表
文章目录