Install apm to process.resourcesPath

This commit is contained in:
Cheng Zhao
2015-03-25 13:35:03 +08:00
parent 01130230e4
commit 3ce12693e6
2 changed files with 4 additions and 4 deletions

View File

@@ -22,7 +22,7 @@ module.exports = (grunt) ->
mkdir appDir
if process.platform isnt 'win32'
cp 'atom.sh', path.join(appDir, 'atom.sh')
cp 'atom.sh', path.resolve(appDir, '..', 'atom.sh')
cp 'package.json', path.join(appDir, 'package.json')
@@ -145,9 +145,9 @@ module.exports = (grunt) ->
cp 'src', path.join(appDir, 'src'), filter: /.+\.(cson|coffee)$/
cp 'static', path.join(appDir, 'static')
cp path.join('apm', 'node_modules', 'atom-package-manager'), path.join(appDir, 'apm'), filter: filterNodeModule
cp path.join('apm', 'node_modules', 'atom-package-manager'), path.resolve(appDir, '..', 'apm'), filter: filterNodeModule
if process.platform isnt 'win32'
fs.symlinkSync(path.join('..', '..', 'bin', 'apm'), path.join(appDir, 'apm', 'node_modules', '.bin', 'apm'))
fs.symlinkSync(path.join('..', '..', 'bin', 'apm'), path.resolve(appDir, '..', 'apm', 'node_modules', '.bin', 'apm'))
if process.platform is 'darwin'
grunt.file.recurse path.join('resources', 'mac'), (sourcePath, rootDirectory, subDirectory='', filename) ->

View File

@@ -36,7 +36,7 @@ module.exports =
message: "Failed to install shell commands"
detailedMessage: error.message
resourcePath = atom.getLoadSettings().resourcePath
resourcePath = process.resourcesPath
@installAtomCommand resourcePath, true, (error) =>
if error?
showErrorDialog(error)