Configure icons based on --channel option to build task
On CI, set that option to 'beta', 'stable' or 'dev' based on the branch
@@ -31,13 +31,16 @@ module.exports = (grunt) ->
|
||||
# This allows all subsequent paths to the relative to the root of the repo
|
||||
grunt.file.setBase(path.resolve('..'))
|
||||
|
||||
[major, minor, patch] = packageJson.version.split('.')
|
||||
tmpDir = os.tmpdir()
|
||||
appName = if process.platform is 'darwin' then 'Atom.app' else 'Atom'
|
||||
buildDir = grunt.option('build-dir') ? path.join(tmpDir, 'atom-build')
|
||||
buildDir = path.resolve(buildDir)
|
||||
installDir = grunt.option('install-dir')
|
||||
|
||||
channel = grunt.option('channel')
|
||||
channel ?= process.env.JANKY_BRANCH if process.env.JANKY_BRANCH in ['stable', 'beta']
|
||||
channel ?= 'dev'
|
||||
|
||||
home = if process.platform is 'win32' then process.env.USERPROFILE else process.env.HOME
|
||||
electronDownloadDir = path.join(home, '.atom', 'electron')
|
||||
|
||||
@@ -153,7 +156,7 @@ module.exports = (grunt) ->
|
||||
grunt.initConfig
|
||||
pkg: grunt.file.readJSON('package.json')
|
||||
|
||||
atom: {appDir, appName, symbolsDir, buildDir, contentsDir, installDir, shellAppDir}
|
||||
atom: {appDir, appName, symbolsDir, buildDir, contentsDir, installDir, shellAppDir, channel}
|
||||
|
||||
docsOutputDir: 'docs/output'
|
||||
|
||||
@@ -234,8 +237,8 @@ module.exports = (grunt) ->
|
||||
outputDirectory: path.join(buildDir, 'installer')
|
||||
authors: 'GitHub Inc.'
|
||||
loadingGif: path.resolve(__dirname, '..', 'resources', 'win', 'loading.gif')
|
||||
iconUrl: 'https://raw.githubusercontent.com/atom/atom/master/resources/win/atom.ico'
|
||||
setupIcon: path.resolve(__dirname, '..', 'resources', 'win', 'atom.ico')
|
||||
iconUrl: 'https://raw.githubusercontent.com/atom/atom/master/resources/app-icons/stable/atom.ico'
|
||||
setupIcon: path.resolve(__dirname, '..', 'resources', 'app-icons', 'stable', 'atom.ico')
|
||||
remoteReleases: 'https://atom.io/api/updates'
|
||||
|
||||
shell:
|
||||
|
||||
@@ -40,7 +40,6 @@ module.exports = (grunt) ->
|
||||
'benchmark'
|
||||
'dot-atom'
|
||||
'vendor'
|
||||
'resources'
|
||||
]
|
||||
|
||||
{devDependencies} = grunt.file.readJSON('package.json')
|
||||
@@ -86,9 +85,6 @@ module.exports = (grunt) ->
|
||||
path.join('build', 'Release', 'obj')
|
||||
path.join('build', 'Release', '.deps')
|
||||
path.join('vendor', 'apm')
|
||||
path.join('resources', 'linux')
|
||||
path.join('resources', 'mac')
|
||||
path.join('resources', 'win')
|
||||
|
||||
# These are only require in dev mode when the grammar isn't precompiled
|
||||
path.join('snippets', 'node_modules', 'loophole')
|
||||
@@ -179,10 +175,14 @@ module.exports = (grunt) ->
|
||||
if process.platform isnt 'win32'
|
||||
fs.symlinkSync(path.join('..', '..', 'bin', 'apm'), path.resolve(appDir, '..', 'new-app', 'apm', 'node_modules', '.bin', 'apm'))
|
||||
|
||||
channel = grunt.config.get('atom.channel')
|
||||
|
||||
cp path.join('resources', 'app-icons', channel, 'png', '1024.png'), path.join(appDir, 'resources', 'atom.png')
|
||||
|
||||
if process.platform is 'darwin'
|
||||
grunt.file.recurse path.join('resources', 'mac'), (sourcePath, rootDirectory, subDirectory='', filename) ->
|
||||
unless /.+\.plist/.test(sourcePath)
|
||||
grunt.file.copy(sourcePath, path.resolve(appDir, '..', subDirectory, filename))
|
||||
cp path.join('resources', 'app-icons', channel, 'atom.icns'), path.resolve(appDir, '..', 'atom.icns')
|
||||
cp path.join('resources', 'mac', 'file.icns'), path.resolve(appDir, '..', 'file.icns')
|
||||
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')
|
||||
@@ -191,7 +191,7 @@ module.exports = (grunt) ->
|
||||
cp path.join('resources', 'win', 'apm.sh'), path.join(shellAppDir, 'resources', 'cli', 'apm.sh')
|
||||
|
||||
if process.platform is 'linux'
|
||||
cp path.join('resources', 'linux', 'icons'), path.join(buildDir, 'icons')
|
||||
cp path.join('resources', 'app-icons', channel, 'png'), path.join(buildDir, 'icons')
|
||||
|
||||
dependencies = ['compile', 'generate-license:save', 'generate-module-cache', 'compile-packages-slug']
|
||||
dependencies.push('copy-info-plist') if process.platform is 'darwin'
|
||||
|
||||
@@ -23,6 +23,7 @@ module.exports = (grunt) ->
|
||||
grunt.registerTask 'mkdeb', 'Create debian package', ->
|
||||
done = @async()
|
||||
buildDir = grunt.config.get('atom.buildDir')
|
||||
channel = grunt.config.get('atom.channel')
|
||||
|
||||
if process.arch is 'ia32'
|
||||
arch = 'i386'
|
||||
@@ -41,10 +42,10 @@ module.exports = (grunt) ->
|
||||
data = {name, version, description, section, arch, maintainer, installDir, iconName, installedSize, executable}
|
||||
controlFilePath = fillTemplate(path.join('resources', 'linux', 'debian', 'control'), data)
|
||||
desktopFilePath = fillTemplate(path.join('resources', 'linux', 'atom.desktop'), data)
|
||||
icon = path.join('resources', 'atom.png')
|
||||
iconPath = path.join('resources', 'app-icons', channel, 'png', '1024.png')
|
||||
|
||||
cmd = path.join('script', 'mkdeb')
|
||||
args = [version, arch, controlFilePath, desktopFilePath, icon, buildDir]
|
||||
args = [version, arch, controlFilePath, desktopFilePath, iconPath, buildDir]
|
||||
spawn {cmd, args}, (error) ->
|
||||
if error?
|
||||
done(error)
|
||||
|
||||
@@ -4,9 +4,10 @@ module.exports = (grunt) ->
|
||||
grunt.registerTask 'set-exe-icon', 'Set icon of the exe', ->
|
||||
done = @async()
|
||||
|
||||
channel = grunt.config.get('atom.channel')
|
||||
shellAppDir = grunt.config.get('atom.shellAppDir')
|
||||
shellExePath = path.join(shellAppDir, 'atom.exe')
|
||||
iconPath = path.resolve('resources', 'win', 'atom.ico')
|
||||
iconPath = path.resolve('resources', 'app-icons', channel, 'atom.ico')
|
||||
|
||||
rcedit = require('rcedit')
|
||||
rcedit(shellExePath, {'icon': iconPath}, done)
|
||||
|
||||
BIN
resources/app-icons/beta/atom.icns
Normal file
BIN
resources/app-icons/beta/atom.ico
Normal file
|
After Width: | Height: | Size: 78 KiB |
BIN
resources/app-icons/beta/png/1024.png
Normal file
|
After Width: | Height: | Size: 629 KiB |
BIN
resources/app-icons/beta/png/128.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
resources/app-icons/beta/png/16.png
Normal file
|
After Width: | Height: | Size: 907 B |
BIN
resources/app-icons/beta/png/24.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
resources/app-icons/beta/png/256.png
Normal file
|
After Width: | Height: | Size: 60 KiB |
BIN
resources/app-icons/beta/png/32.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
resources/app-icons/beta/png/48.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
resources/app-icons/beta/png/512.png
Normal file
|
After Width: | Height: | Size: 192 KiB |
BIN
resources/app-icons/beta/png/64.png
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
resources/app-icons/dev/atom.icns
Normal file
BIN
resources/app-icons/dev/atom.ico
Normal file
|
After Width: | Height: | Size: 76 KiB |
BIN
resources/app-icons/dev/png/1024.png
Normal file
|
After Width: | Height: | Size: 601 KiB |
BIN
resources/app-icons/dev/png/128.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
resources/app-icons/dev/png/16.png
Normal file
|
After Width: | Height: | Size: 905 B |
BIN
resources/app-icons/dev/png/24.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
resources/app-icons/dev/png/256.png
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
resources/app-icons/dev/png/32.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
resources/app-icons/dev/png/48.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
resources/app-icons/dev/png/512.png
Normal file
|
After Width: | Height: | Size: 184 KiB |
BIN
resources/app-icons/dev/png/64.png
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 182 KiB After Width: | Height: | Size: 182 KiB |
|
Before Width: | Height: | Size: 628 KiB After Width: | Height: | Size: 628 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 944 B After Width: | Height: | Size: 944 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 192 KiB After Width: | Height: | Size: 192 KiB |
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 628 KiB |