mirror of
https://github.com/drawdb-io/drawdb.git
synced 2025-09-22 07:54:49 +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';
|
process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true';
|
||||||
|
|
||||||
function createWindow() {
|
function createWindow() {
|
||||||
|
|
||||||
const isDev = !app.isPackaged;
|
const isDev = !app.isPackaged;
|
||||||
const win = new BrowserWindow({
|
const win = new BrowserWindow({
|
||||||
width: 800,
|
width: 800,
|
||||||
height: 600,
|
height: 600,
|
||||||
icon: path.join(__dirname, 'favicon.ico'),
|
icon: path.join(__dirname, 'public/icon.ico'),
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
preload: path.join(__dirname, 'preload.js'),
|
preload: path.join(__dirname, 'preload.js'),
|
||||||
contextIsolation: true,
|
contextIsolation: true,
|
||||||
@@ -16,6 +17,8 @@ function createWindow() {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
win.maximize();
|
||||||
|
|
||||||
if (isDev) {
|
if (isDev) {
|
||||||
win.loadURL('http://localhost:5173');
|
win.loadURL('http://localhost:5173');
|
||||||
win.webContents.openDevTools();
|
win.webContents.openDevTools();
|
||||||
|
@@ -60,6 +60,7 @@
|
|||||||
"node_modules/**/*"
|
"node_modules/**/*"
|
||||||
],
|
],
|
||||||
"win": {
|
"win": {
|
||||||
|
"icon": "public/icon.ico",
|
||||||
"target": "nsis",
|
"target": "nsis",
|
||||||
"signAndEditExecutable": false
|
"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