Fix process.resourcesPath.

This commit is contained in:
Cheng Zhao 2014-03-16 13:24:25 +08:00
parent 6285e26972
commit 5dd5f18edf
5 changed files with 10 additions and 9 deletions

View file

@ -3,7 +3,7 @@ Module = require 'module'
# Expose information of current process.
process.__atom_type = 'renderer'
process.resourcesPath = path.resolve process.argv[1], '..', '..', '..'
process.resourcesPath = path.resolve process.argv[1], '..', '..', '..', '..'
# We modified the original process.argv to let node.js load the
# atom-renderer.js, we need to restore it here.
@ -12,7 +12,7 @@ process.argv.splice 1, 1
# Add renderer/api/lib to require's search paths, which contains javascript part
# of Atom's built-in libraries.
globalPaths = Module.globalPaths
globalPaths.push path.join(process.resourcesPath, 'renderer', 'api', 'lib')
globalPaths.push path.join(process.resourcesPath, 'atom', 'renderer', 'api', 'lib')
# And also app.
globalPaths.push path.join(process.resourcesPath, 'app')