diff --git a/ui (gen4)/e.js b/ui (gen4)/e.js index 97f3a5e4..89445e2a 100644 --- a/ui (gen4)/e.js +++ b/ui (gen4)/e.js @@ -43,14 +43,14 @@ function createWindow() { // and load the index.html of the app. win.loadURL(url.format({ - // XXX for some reason the system is loaded twice... + // XXX unify this with index.html pathname: path.join(__dirname, 'electron.html'), protocol: 'file:', slashes: true })) // Open the DevTools. - win.webContents.openDevTools() + //win.webContents.openDevTools() // Emitted when the window is closed. win.on('closed', () => { diff --git a/ui (gen4)/electron.html b/ui (gen4)/electron.html index 507347a6..5a1f3598 100755 --- a/ui (gen4)/electron.html +++ b/ui (gen4)/electron.html @@ -85,7 +85,7 @@ if(window.require && window.nw){ diff --git a/ui (gen4)/ig.js b/ui (gen4)/ig.js index c0772dfe..4a99d5b6 100644 --- a/ui (gen4)/ig.js +++ b/ui (gen4)/ig.js @@ -10,8 +10,14 @@ require('./cfg/requirejs') -var _require = require -require = requirejs +nodeRequire = +global.nodeRequire = + require + +require = +requirejs = +global.requirejs = + require('requirejs') diff --git a/ui (gen4)/ui.js b/ui (gen4)/ui.js index a85f54ce..efb8428e 100755 --- a/ui (gen4)/ui.js +++ b/ui (gen4)/ui.js @@ -19,12 +19,6 @@ if((typeof(process) != 'undefined' ? process : {}).__nwjs){ // Setup requirejs if we are in node/nw... // // NOTE: no need to do this in browser... -// -// XXX this will create a second requirejs instance with node -// compatibility... -// ...would be nice if we could avoid this... -// XXX setting nodeRequire on existing requirejs will change how -// everything is loaded... if(typeof(process) != 'undefined'){ requirejs = global.requirejs =