添加图标

main
cysamurai 3 months ago
parent 987f755ae2
commit 41db6cc794

@ -13,6 +13,7 @@ asarUnpack:
- resources/**
win:
executableName: call-client
icon: resources/call_icon.jpg
nsis:
artifactName: ${name}-${version}-setup.${ext}
shortcutName: ${productName}
@ -33,6 +34,7 @@ linux:
- deb
- AppImage
executableName: call-client
icon: resources/call_icon.jpg
maintainer: electronjs.org
category: Utility
artifactName: ${name}-${version}-${arch}.${ext}

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

@ -1,13 +1,17 @@
import { is } from '@electron-toolkit/utils'
import { BrowserWindow } from 'electron'
import { app, BrowserWindow } from 'electron'
import path from 'node:path'
const isDev = process.env.NODE_ENV === 'development'
const appIconPath = app.isPackaged
? path.join(process.resourcesPath, 'resources', 'call_icon.jpg')
: path.join(process.cwd(), 'resources', 'call_icon.jpg')
export const createLoginWindow = (): BrowserWindow => {
const win = new BrowserWindow({
width: 480,
height: 600,
icon: appIconPath,
titleBarStyle: 'hidden',
transparent: true, // 透明窗口
frame: false, // 无边框窗口
@ -39,6 +43,7 @@ export const createMainWindow = (): BrowserWindow => {
const win = new BrowserWindow({
width: 500,
height: 100,
icon: appIconPath,
titleBarStyle: 'hidden',
transparent: true, // 透明窗口
frame: false, // 无边框窗口
@ -86,6 +91,7 @@ export const createTicketWindow = (parentWindow: BrowserWindow): void => {
ticketWindow = new BrowserWindow({
width: 1024,
height: 720,
icon: appIconPath,
parent: parentWindow || undefined,
modal: false, // 如果设为 true 则为模态窗口
resizable: false, // 不可调整大小

Loading…
Cancel
Save