mirror of
https://github.com/atom/atom.git
synced 2026-01-26 07:19:06 -05:00
Merge pull request #12515 from atom/sm-windows-file-icon
[WIP] Add Windows file icon
This commit is contained in:
@@ -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}"}
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user