diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index b29166ab5..b2eca2778 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -144,7 +144,11 @@ module.exports = (grunt) -> cp 'spec', path.join(appDir, 'spec') cp 'src', path.join(appDir, 'src'), filter: /.+\.(cson|coffee)$/ cp 'static', path.join(appDir, 'static') - cp 'apm', path.join(appDir, 'apm'), filter: filterNodeModule + + if process.platform is 'win32' + cp path.join('apm', 'node_modules', 'atom-package-manager'), path.join(appDir, 'apm'), filter: filterNodeModule + else + cp 'apm', path.join(appDir, 'apm'), filter: filterNodeModule if process.platform is 'darwin' grunt.file.recurse path.join('resources', 'mac'), (sourcePath, rootDirectory, subDirectory='', filename) -> diff --git a/resources/win/apm.sh b/resources/win/apm.sh index 3a317ca9d..c895f2bce 100644 --- a/resources/win/apm.sh +++ b/resources/win/apm.sh @@ -1,3 +1,3 @@ #!/bin/sh -"$0/../../app/apm/node_modules/atom-package-manager/bin/node.exe" "$0/../../app/apm/node_modules/atom-package-manager/lib/cli.js" "$@" +"$0/../../app/apm/bin/node.exe" "$0/../../app/apm/lib/cli.js" "$@" diff --git a/resources/win/atom.cmd b/resources/win/atom.cmd index 029763c52..04a4ccbb0 100644 --- a/resources/win/atom.cmd +++ b/resources/win/atom.cmd @@ -18,5 +18,5 @@ FOR %%a IN (%*) DO ( IF "%EXPECT_OUTPUT%"=="YES" ( "%~dp0\..\..\atom.exe" %* ) ELSE ( - "%~dp0\..\app\apm\node_modules\atom-package-manager\bin\node.exe" "%~dp0\atom.js" %* + "%~dp0\..\app\apm\bin\node.exe" "%~dp0\atom.js" %* ) diff --git a/resources/win/atom.sh b/resources/win/atom.sh index ed6af2292..96370bee5 100644 --- a/resources/win/atom.sh +++ b/resources/win/atom.sh @@ -18,5 +18,5 @@ done if [ $EXPECT_OUTPUT ]; then "$0/../../../atom.exe" "$@" else - "$0/../../app/apm/node_modules/atom-package-manager/bin/node.exe" "$0/../atom.js" "$@" + "$0/../../app/apm/bin/node.exe" "$0/../atom.js" "$@" fi diff --git a/src/package-manager.coffee b/src/package-manager.coffee index f657517f9..a397843ba 100644 --- a/src/package-manager.coffee +++ b/src/package-manager.coffee @@ -128,9 +128,10 @@ class PackageManager # # Return a {String} file path to apm. getApmPath: -> - commandName = 'apm' - commandName += '.cmd' if process.platform is 'win32' - @apmPath ?= path.resolve(__dirname, '..', 'apm', 'node_modules', 'atom-package-manager', 'bin', commandName) + if process.platform is 'win32' + @apmPath ?= path.resolve(__dirname, '..', 'apm', 'bin', 'apm.cmd') + else + @apmPath ?= path.resolve(__dirname, '..', 'apm', 'node_modules', 'atom-package-manager', 'bin', 'apm') # Public: Get the paths being used to look for packages. #