mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
Copy file icon and use as icon for Atom associated files
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -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', '')
|
||||
|
||||
@@ -40,7 +41,10 @@ class ShellOption
|
||||
exports.appName = appName
|
||||
|
||||
exports.fileHandler = new ShellOption("\\Software\\Classes\\Applications\\#{exeName}",
|
||||
[{key: 'shell\\open\\command', name: '', value: "#{appPath} \"%1\""}]
|
||||
[
|
||||
{key: 'shell\\open\\command', name: '', value: "#{appPath} \"%1\""},
|
||||
{key: 'DefaultIcon', name: '', value: "#{fileIconPath}"}
|
||||
]
|
||||
)
|
||||
|
||||
contextParts = [
|
||||
|
||||
Reference in New Issue
Block a user