зеркало из https://github.com/electron/electron.git
Use __dirname when setting globalPaths
This commit is contained in:
Родитель
3f3e66916a
Коммит
0b8efc434d
|
@ -21,7 +21,7 @@ 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 = module.globalPaths
|
||||
globalPaths.push path.join process.resourcesPath, 'atom', 'browser', 'api', 'lib'
|
||||
globalPaths.push path.resolve(__dirname, '..', 'api', 'lib')
|
||||
|
||||
# Import common settings.
|
||||
require path.resolve(__dirname, '..', '..', 'common', 'lib', 'init')
|
||||
|
|
|
@ -12,7 +12,7 @@ process.atomBinding = (name) ->
|
|||
|
||||
# Add common/api/lib to module search paths.
|
||||
globalPaths = Module.globalPaths
|
||||
globalPaths.push path.join(process.resourcesPath, 'atom', 'common', 'api', 'lib')
|
||||
globalPaths.push path.resolve(__dirname, '..', '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
|
||||
|
|
|
@ -15,9 +15,10 @@ 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, 'atom', 'renderer', 'api', 'lib')
|
||||
globalPaths.push path.resolve(__dirname, '..', 'api', 'lib')
|
||||
# And also app.
|
||||
globalPaths.push path.join(process.resourcesPath, 'app')
|
||||
globalPaths.push path.join(process.resourcesPath, 'app.asar')
|
||||
|
||||
# Import common settings.
|
||||
require path.resolve(__dirname, '..', '..', 'common', 'lib', 'init')
|
||||
|
|
Загрузка…
Ссылка в новой задаче