Modified Info.plist generation to enable folder drop onto dock icon (#307)

* Added CFBundleDocumentTypes to package Info.plist generation

* More precise CFBundleDocumentTypes in Info.plist
This commit is contained in:
Lorenzo Zottar 2016-07-20 18:52:19 +02:00 committed by Guillermo Rauch
parent b938ad4c58
commit c75d5dedd0
2 changed files with 35 additions and 1 deletions

View file

@ -23,7 +23,7 @@ cp -r app/assets build/
cp app/index.html build/
cp -r app/dist build/
mkdir dist
electron-packager ./ --platform=darwin --out=dist --arch=x64 --app-bundle-id="co.zeit.hyperterm" --app-version="$VERSION" --osx-sign.identity="$HYPERTERM_OSX_SIGNING_IDENTITY" --icon=static/icon.icns --prune --ignore=app/
electron-packager ./ --platform=darwin --out=dist --arch=x64 --app-bundle-id="co.zeit.hyperterm" --app-version="$VERSION" --extend-info=static/Info.plist --osx-sign.identity="$HYPERTERM_OSX_SIGNING_IDENTITY" --icon=static/icon.icns --prune --ignore=app/
cd dist/HyperTerm-darwin-x64/
zip -r -q -y ../hyperterm-macos-x64-$VERSION.zip .
cd -

34
static/Info.plist Normal file
View file

@ -0,0 +1,34 @@
<plist version="1.0">
<dict>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>Folders</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSItemContentTypes</key>
<array>
<string>public.folder</string>
<string>com.apple.bundle</string>
<string>com.apple.package</string>
<string>com.apple.resolvable</string>
</array>
<key>LSHandlerRank</key>
<string>Alternate</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>UnixExecutables</string>
<key>CFBundleTypeRole</key>
<string>Shell</string>
<key>LSItemContentTypes</key>
<array>
<string>public.unix-executable</string>
</array>
<key>LSHandlerRank</key>
<string>Alternate</string>
</dict>
</array>
</dict>
</plist>