try other icon fix

This commit is contained in:
Nicolas Constant 2020-10-02 20:59:36 -04:00
parent e46c878e36
commit 0c361d57fc
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
1 changed files with 9 additions and 3 deletions

View File

@ -4,14 +4,20 @@ const { app, Menu, MenuItem, BrowserWindow, shell } = require("electron");
// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
let win;
const globalAny = global;
if (process.env.NODE_ENV !== 'development') {
globalAny.__static = require('path').join(__dirname, '/assets/icons').replace(/\\/g, '\\\\');
}
function createWindow() {
// Create the browser window
let icon = join(__dirname, '/src/assets/icons/icon-512x512.png');
// Set icon
let icon = join(globalAny.__static, '/png/512x512.png');
if (process.platform === "win32") {
icon = join(__dirname, '/assets/icons/win/icon.ico');
icon = join(globalAny.__static, '/win/icon.ico');
}
// Create the browser window
win = new BrowserWindow({
width: 377,
height: 800,