diff --git a/script/lib/create-debian-package.js b/script/lib/create-debian-package.js index 9c545d6d8..120463f7b 100644 --- a/script/lib/create-debian-package.js +++ b/script/lib/create-debian-package.js @@ -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`) ) diff --git a/script/lib/package-application.js b/script/lib/package-application.js index 5e01e5543..842883e51 100644 --- a/script/lib/package-application.js +++ b/script/lib/package-application.js @@ -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'