__init__.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:build-calibre 作者: kovidgoyal 项目源码 文件源码
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'))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号