Added dynamic detection of default server.

This commit is contained in:
Daniel Scalzi
2017-12-02 02:59:25 -05:00
parent 52ab270ce3
commit 086bfc8593
8 changed files with 156 additions and 39 deletions

View File

@@ -9,7 +9,15 @@ const ejse = require('ejs-electron')
let win
function createWindow() {
win = new BrowserWindow({ width: 980, height: 552, icon: getPlatformIcon('WesterosSealSquare'), frame: false})
win = new BrowserWindow({
width: 980,
height: 552,
icon: getPlatformIcon('WesterosSealSquare'),
frame: false,
webPreferences: {
preload: path.join(__dirname, 'app', 'assets', 'js', 'preloader.js')
}
})
ejse.data('bkid', Math.floor((Math.random() * fs.readdirSync(path.join(__dirname, 'app', 'assets', 'images', 'backgrounds')).length)))