Fix process.resourcesPath.
This commit is contained in:
parent
6285e26972
commit
5dd5f18edf
5 changed files with 10 additions and 9 deletions
6
atom.gyp
6
atom.gyp
|
@ -290,7 +290,7 @@
|
|||
],
|
||||
},
|
||||
{
|
||||
'destination': '<(PRODUCT_DIR)/<(product_name).app/Contents/Resources/browser',
|
||||
'destination': '<(PRODUCT_DIR)/<(product_name).app/Contents/Resources/atom/browser',
|
||||
'files': [
|
||||
'atom/browser/default_app',
|
||||
],
|
||||
|
@ -328,7 +328,7 @@
|
|||
],
|
||||
},
|
||||
{
|
||||
'destination': '<(PRODUCT_DIR)/resources/browser',
|
||||
'destination': '<(PRODUCT_DIR)/resources/atom/browser',
|
||||
'files': [
|
||||
'atom/browser/default_app',
|
||||
]
|
||||
|
@ -346,7 +346,7 @@
|
|||
],
|
||||
},
|
||||
{
|
||||
'destination': '<(PRODUCT_DIR)/resources/browser',
|
||||
'destination': '<(PRODUCT_DIR)/resources/atom/browser',
|
||||
'files': [
|
||||
'atom/browser/default_app',
|
||||
]
|
||||
|
|
|
@ -4,7 +4,7 @@ util = require 'util'
|
|||
|
||||
# Expose information of current process.
|
||||
process.__atom_type = 'browser'
|
||||
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.js,
|
||||
# we need to restore it here.
|
||||
|
@ -18,7 +18,7 @@ process.execArgv = process.argv.splice startMark, endMark - startMark + 1
|
|||
# Add browser/api/lib to require's search paths,
|
||||
# which contains javascript part of Atom's built-in libraries.
|
||||
globalPaths = require('module').globalPaths
|
||||
globalPaths.push path.join process.resourcesPath, 'browser', 'api', 'lib'
|
||||
globalPaths.push path.join process.resourcesPath, 'atom', 'browser', 'api', 'lib'
|
||||
|
||||
# Do loading in next tick since we still need some initialize work before
|
||||
# native bindings can work.
|
||||
|
|
|
@ -4,7 +4,7 @@ Module = require 'module'
|
|||
|
||||
# Add common/api/lib to module search paths.
|
||||
globalPaths = Module.globalPaths
|
||||
globalPaths.push path.join(process.resourcesPath, 'common', 'api', 'lib')
|
||||
globalPaths.push path.join(process.resourcesPath, 'atom', 'common', 'api', 'lib')
|
||||
|
||||
# setImmediate and process.nextTick makes use of uv_check and uv_prepare to
|
||||
# run the callbacks, however since we only run uv loop on requests, the
|
||||
|
|
|
@ -125,7 +125,8 @@ node::Environment* NodeBindings::CreateEnvironment(
|
|||
exec_path.DirName().AppendASCII("resources");
|
||||
#endif
|
||||
base::FilePath script_path =
|
||||
resources_path.AppendASCII(is_browser_ ? "browser" : "renderer")
|
||||
resources_path.AppendASCII("atom")
|
||||
.AppendASCII(is_browser_ ? "browser" : "renderer")
|
||||
.AppendASCII("lib")
|
||||
.AppendASCII("init.js");
|
||||
std::string script_path_str = script_path.AsUTF8Unsafe();
|
||||
|
|
|
@ -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…
Reference in a new issue