icon implementation

This commit is contained in:
DNLRQ
2024-11-27 23:10:51 -07:00
parent f2e239beaa
commit 6216ba5133
3 changed files with 5 additions and 1 deletions

View File

@@ -4,11 +4,12 @@ const path = require('path');
process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true';
function createWindow() {
const isDev = !app.isPackaged;
const win = new BrowserWindow({
width: 800,
height: 600,
icon: path.join(__dirname, 'favicon.ico'),
icon: path.join(__dirname, 'public/icon.ico'),
webPreferences: {
preload: path.join(__dirname, 'preload.js'),
contextIsolation: true,
@@ -16,6 +17,8 @@ function createWindow() {
},
});
win.maximize();
if (isDev) {
win.loadURL('http://localhost:5173');
win.webContents.openDevTools();

View File

@@ -60,6 +60,7 @@
"node_modules/**/*"
],
"win": {
"icon": "public/icon.ico",
"target": "nsis",
"signAndEditExecutable": false
},

BIN
public/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB