Dock icon should accept all file types (fix #156)

This commit is contained in:
Feross Aboukhadijeh
2016-03-19 02:48:45 -07:00
parent 33a9e7e93d
commit 309e509a76
3 changed files with 29 additions and 14 deletions

View File

@@ -154,14 +154,23 @@ function postDarwinism () {
])
var infoPlist = plist.parse(fs.readFileSync(infoPlistPath).toString())
infoPlist['CFBundleDocumentTypes'] = [{
CFBundleTypeExtensions: [ 'torrent' ],
CFBundleTypeIconFile: 'WebTorrentFile.icns',
CFBundleTypeName: 'BitTorrent Document',
CFBundleTypeRole: 'Editor',
LSHandlerRank: 'Owner',
LSItemContentTypes: [ 'org.bittorrent.torrent' ]
}]
infoPlist.CFBundleDocumentTypes = [
{
CFBundleTypeExtensions: [ 'torrent' ],
CFBundleTypeIconFile: 'WebTorrentFile.icns',
CFBundleTypeName: 'BitTorrent Document',
CFBundleTypeRole: 'Editor',
LSHandlerRank: 'Owner',
LSItemContentTypes: [ 'org.bittorrent.torrent' ]
},
{
CFBundleTypeName: 'Any',
CFBundleTypeOSTypes: [ '****' ],
CFBundleTypeRole: 'Editor',
LSTypeIsPackage: false,
LSHandlerRank: 'Owner'
}
]
fs.writeFileSync(infoPlistPath, plist.build(infoPlist))
cp.execSync(`cp ${webTorrentFileIconPath} ${resourcesPath}`)