mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
Merge pull request #14682 from atom/bring-back-asar
Bring back ASAR archives
This commit is contained in:
@@ -98,7 +98,7 @@ module.exports = function (packagedAppPath) {
|
||||
|
||||
console.log(`Copying icon into "${debianPackageIconsDirPath}"`)
|
||||
fs.copySync(
|
||||
path.join(packagedAppPath, 'resources', 'app', 'resources', 'atom.png'),
|
||||
path.join(packagedAppPath, 'resources', 'app.asar.unpacked', 'resources', 'atom.png'),
|
||||
path.join(debianPackageIconsDirPath, `${atomExecutableName}.png`)
|
||||
)
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ module.exports = function () {
|
||||
'app-copyright': `Copyright © 2014-${(new Date()).getFullYear()} GitHub, Inc. All rights reserved.`,
|
||||
'app-version': CONFIG.appMetadata.version,
|
||||
'arch': process.platform === 'darwin' ? 'x64' : process.arch, // OS X is 64-bit only
|
||||
'asar': {unpack: buildAsarUnpackGlobExpression()},
|
||||
'build-version': CONFIG.appMetadata.version,
|
||||
'download': {cache: CONFIG.electronDownloadPath},
|
||||
'dir': CONFIG.intermediateAppPath,
|
||||
@@ -95,6 +96,22 @@ function chmodNodeFiles (packagedAppPath) {
|
||||
childProcess.execSync(`find "${packagedAppPath}" -type f -name *.node -exec chmod a-x {} \\;`)
|
||||
}
|
||||
|
||||
function buildAsarUnpackGlobExpression () {
|
||||
const unpack = [
|
||||
'*.node',
|
||||
'ctags-config',
|
||||
'ctags-darwin',
|
||||
'ctags-linux',
|
||||
'ctags-win32.exe',
|
||||
path.join('**', 'node_modules', 'spellchecker', '**'),
|
||||
path.join('**', 'node_modules', 'dugite', 'git', '**'),
|
||||
path.join('**', 'node_modules', 'github', 'bin', '**'),
|
||||
path.join('**', 'resources', 'atom.png')
|
||||
]
|
||||
|
||||
return `{${unpack.join(',')}}`
|
||||
}
|
||||
|
||||
function getAppName () {
|
||||
if (process.platform === 'darwin') {
|
||||
return CONFIG.channel === 'beta' ? 'Atom Beta' : 'Atom'
|
||||
|
||||
Reference in New Issue
Block a user