mirror of
https://github.com/drawdb-io/drawdb.git
synced 2025-09-21 15:24:51 +00:00
icon implementation
This commit is contained in:
5
main.cjs
5
main.cjs
@@ -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();
|
||||
|
@@ -60,6 +60,7 @@
|
||||
"node_modules/**/*"
|
||||
],
|
||||
"win": {
|
||||
"icon": "public/icon.ico",
|
||||
"target": "nsis",
|
||||
"signAndEditExecutable": false
|
||||
},
|
||||
|
BIN
public/icon.ico
Normal file
BIN
public/icon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 264 KiB |
Reference in New Issue
Block a user