1
0

mac build: let pyinstaller handle Info.plist

note: newer versions of pyinstaller (4.4+ ?) want to sign the bundle
themselves, in which case modifying the Info.plist file after
pyinstaller returns invalidates the sig.
This commit is contained in:
SomberNight
2022-08-29 13:35:39 +00:00
parent d37b5e7d75
commit 859d43d0b2
2 changed files with 6 additions and 7 deletions

View File

@@ -219,12 +219,6 @@ VERSION=`git describe --tags --dirty --always`
info "Building binary"
pyinstaller --noconfirm --ascii --clean --name $VERSION contrib/osx/osx.spec || fail "Could not build binary"
info "Adding bitcoin URI types to Info.plist"
plutil -insert 'CFBundleURLTypes' \
-xml '<array><dict> <key>CFBundleURLName</key> <string>bitcoin</string> <key>CFBundleURLSchemes</key> <array><string>bitcoin</string><string>lightning</string></array> </dict></array>' \
-- dist/$PACKAGE.app/Contents/Info.plist \
|| fail "Could not add keys to Info.plist. Make sure the program 'plutil' exists and is installed."
DoCodeSignMaybe "app bundle" "dist/${PACKAGE}.app"
if [ ! -z "$CODESIGN_CERT" ]; then

View File

@@ -123,6 +123,11 @@ app = BUNDLE(
bundle_identifier=None,
info_plist={
'NSHighResolutionCapable': 'True',
'NSSupportsAutomaticGraphicsSwitching': 'True'
'NSSupportsAutomaticGraphicsSwitching': 'True',
'CFBundleURLTypes':
[{
'CFBundleURLName': 'bitcoin',
'CFBundleURLSchemes': ['bitcoin', 'lightning', ],
}],
},
)