macOS: Add missing URI handler(#4557)

Backport from Electron Cash -- fix missing bitcoin: URI types form macOS Info.plist
This commit is contained in:
Calin Culianu 2018-09-04 23:38:38 +03:00 committed by Johann Bauer
parent 6c7bfe613f
commit 0da1e904fe

View file

@ -90,5 +90,11 @@ done
info "Building binary"
pyinstaller --noconfirm --ascii --clean --name $VERSION contrib/build-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></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."
info "Creating .DMG"
hdiutil create -fs HFS+ -volname $PACKAGE -srcfolder dist/$PACKAGE.app dist/electrum-$VERSION.dmg || fail "Could not create .DMG"