diff options
Diffstat (limited to 'misc/qutebrowser.spec')
-rw-r--r-- | misc/qutebrowser.spec | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/misc/qutebrowser.spec b/misc/qutebrowser.spec index 60729266e..f7ce81226 100644 --- a/misc/qutebrowser.spec +++ b/misc/qutebrowser.spec @@ -6,11 +6,57 @@ import os sys.path.insert(0, os.getcwd()) from scripts import setupcommon +import qutebrowser from qutebrowser.extensions import loader block_cipher = None +INFO_PLIST_UPDATES = { + 'CFBundleVersion': qutebrowser.__version__, + 'CFBundleShortVersionString': qutebrowser.__version__, + 'NSSupportsAutomaticGraphicsSwitching': True, + 'NSHighResolutionCapable': True, + 'NSRequiresAquaSystemAppearance': False, + 'CFBundleURLTypes': [{ + "CFBundleURLName": "http(s) URL", + "CFBundleURLSchemes": ["http", "https"] + }, { + "CFBundleURLName": "local file URL", + "CFBundleURLSchemes": ["file"] + }], + 'CFBundleDocumentTypes': [{ + "CFBundleTypeExtensions": ["html", "htm"], + "CFBundleTypeMIMETypes": ["text/html"], + "CFBundleTypeName": "HTML document", + "CFBundleTypeOSTypes": ["HTML"], + "CFBundleTypeRole": "Viewer", + }, { + "CFBundleTypeExtensions": ["xhtml"], + "CFBundleTypeMIMETypes": ["text/xhtml"], + "CFBundleTypeName": "XHTML document", + "CFBundleTypeRole": "Viewer", + }], + + # https://developer.apple.com/documentation/avfoundation/cameras_and_media_capture/requesting_authorization_for_media_capture_on_macos + # + # Keys based on Google Chrome's .app, except Bluetooth keys which seem to + # be iOS-only. + # + # If we don't do this, we get a SIGABRT from macOS when those permissions + # are used, and even in some other situations (like logging into Google + # accounts)... + 'NSCameraUsageDescription': + 'A website in qutebrowser wants to use the camera.', + 'NSLocationUsageDescription': + 'A website in qutebrowser wants to use your location information.', + 'NSMicrophoneUsageDescription': + 'A website in qutebrowser wants to use your microphone.', + 'NSBluetoothAlwaysUsageDescription': + 'A website in qutebrowser wants to access Bluetooth.', +} + + def get_data_files(): data_files = [ ('../qutebrowser/html', 'html'), @@ -85,5 +131,6 @@ coll = COLLECT(exe, app = BUNDLE(coll, name='qutebrowser.app', icon=icon, + info_plist=INFO_PLIST_UPDATES, # https://github.com/pyinstaller/pyinstaller/blob/b78bfe530cdc2904f65ce098bdf2de08c9037abb/PyInstaller/hooks/hook-PyQt5.QtWebEngineWidgets.py#L24 bundle_identifier='org.qt-project.Qt.QtWebEngineCore') |