const {app, BrowserWindow} = require('electron') 
const url = require('url') 
const path = require('path')  
const {ipcMain} = require('electron')

let win  

function createWindow() { 
   win = new BrowserWindow({width: 800, frame: false, height: 600,icon: __dirname + '\\ikonakoncowa.ico'}) 
   win.maximize()
   win.setProgressBar(0.5, {'mode':'error'})
   win.loadURL(url.format ({ 
      pathname: path.join(__dirname, 'index.html'), 
      protocol: 'file:', 
      slashes: true 
   })) 
}  

app.on('ready', createWindow) 