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

@@ -176,11 +176,8 @@ module.exports = (grunt) ->
cp path.join('resources', 'mac', 'speakeasy.pem'), path.resolve(appDir, '..', 'speakeasy.pem')
if process.platform is 'win32'
cp path.join('resources', 'win', 'atom.cmd'), path.join(shellAppDir, 'resources', 'cli', 'atom.cmd')
cp path.join('resources', 'win', 'atom.sh'), path.join(shellAppDir, 'resources', 'cli', 'atom.sh')
cp path.join('resources', 'win', 'atom.js'), path.join(shellAppDir, 'resources', 'cli', 'atom.js')
cp path.join('resources', 'win', 'apm.cmd'), path.join(shellAppDir, 'resources', 'cli', 'apm.cmd')
cp path.join('resources', 'win', 'apm.sh'), path.join(shellAppDir, 'resources', 'cli', 'apm.sh')
[ 'atom.cmd', 'atom.sh', 'atom.js', 'apm.cmd', 'apm.sh', 'file.ico' ]
.forEach (file) -> cp path.join('resources', 'win', file), path.join(shellAppDir, 'resources', 'cli', file)
if process.platform is 'linux'
cp path.join('resources', 'app-icons', channel, 'png'), path.join(buildDir, 'icons')

BIN
resources/win/file.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

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}"}
]
)