diff --git a/src/renderer/src/native_controll.js b/src/renderer/src/native_controll.js index b7743f716..248b15bf9 100644 --- a/src/renderer/src/native_controll.js +++ b/src/renderer/src/native_controll.js @@ -1,7 +1,6 @@ 'use strict'; var nowLocale = app.getLocale(); var options = {}; -var _real_path = __dirname; var _real_temp_path = app.getPath('userData'); sharedObject.workingPath = _real_temp_path; var _real_temp_path_posix = _real_temp_path diff --git a/src/renderer/src/require.js b/src/renderer/src/require.js index 00b149486..e543c0077 100644 --- a/src/renderer/src/require.js +++ b/src/renderer/src/require.js @@ -1,5 +1,7 @@ const lru = require('lru-cache')({ max: 256, maxAge: 250 }); const fs = require('fs'); +const _real_path = __dirname; +window._real_path = _real_path; var origLstat = fs.lstatSync.bind(fs); fs.lstatSync = function(p) { let r = lru.get(p); diff --git a/src/renderer/src/static.js b/src/renderer/src/static.js index 95914c422..6971430dc 100644 --- a/src/renderer/src/static.js +++ b/src/renderer/src/static.js @@ -1,8 +1,7 @@ import _ from 'lodash'; -var { EntryStatic } = require(path.resolve( - 'src', - 'renderer', +var { EntryStatic } = require(path.join( + _real_path, 'bower_components', 'entryjs', 'extern',