Merge pull request #12515 from atom/sm-windows-file-icon

[WIP] Add Windows file icon
This commit is contained in:
Damien Guard
2016-08-25 21:40:17 -07:00
committed by GitHub
3 changed files with 5 additions and 6 deletions

View File

@@ -3,6 +3,7 @@ Path = require 'path'
exeName = Path.basename(process.execPath)
appPath = "\"#{process.execPath}\""
fileIconPath = "\"#{Path.join(process.execPath, '..', 'resources', 'cli', 'file.ico')}\""
isBeta = appPath.includes(' Beta')
appName = exeName.replace('atom', (if isBeta then 'Atom Beta' else 'Atom' )).replace('.exe', '')
@@ -41,8 +42,9 @@ exports.appName = appName
exports.fileHandler = new ShellOption("\\Software\\Classes\\Applications\\#{exeName}",
[
{key: 'shell\\open\\command', name: '', value: "#{appPath} \"%1\""},
{key: 'shell\\open', name: 'FriendlyAppName', value: "#{appName}"},
{key: 'shell\\open\\command', name: '', value: "#{appPath} \"%1\""}
{key: 'DefaultIcon', name: '', value: "#{fileIconPath}"}
]
)