try other icon fix
This commit is contained in:
parent
e46c878e36
commit
0c361d57fc
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue