Fix process.resourcesPath.
This commit is contained in:
parent
6285e26972
commit
5dd5f18edf
5 changed files with 10 additions and 9 deletions
|
@ -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')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue