refactor(project): 修正图标显示问题

This commit is contained in:
ApplePine 2025-07-02 14:19:37 +08:00
parent 806f91e325
commit f0f1c994bd
17 changed files with 11 additions and 9 deletions

View File

@ -8,12 +8,14 @@ export default {
asar: true,
mac: {
target: [
{ target: 'zip', arch: ['arm64', 'x64'] },
{ target: 'dmg', arch: ['arm64', 'x64'] },
{ target: 'zip', arch: ['arm64'] },
{ target: 'dmg', arch: ['arm64'] },
],
icon: 'public/icons/mac.icns',
artifactName: 'findyourfile-${version}-mac-${arch}.${ext}',
icon: 'dist/icons/mac/icon.icns',
artifactName: 'findyourfile-${version}-mac-arm64.${ext}',
category: 'public.app-category.productivity',
// 使用自签名配置
identity: 'ApplePine',
hardenedRuntime: false,
notarize: false,
},
@ -22,7 +24,7 @@ export default {
{ target: 'zip', arch: ['x64'] },
{ target: 'nsis', arch: ['x64'] },
],
icon: 'public/icons/win.ico',
icon: 'dist/icons/win/icon.ico',
artifactName: 'findyourfile-${version}-win-x64.${ext}',
},
nsis: {

View File

@ -17,9 +17,9 @@ let db
function createWindow() {
// 设置应用图标路径
const iconPath = process.platform === 'darwin'
? path.join(__dirname, '../public/icons/mac.icns')
: path.join(__dirname, '../public/icons/win.ico')
const iconPath = process.platform === 'darwin'
? path.join(__dirname, '../dist/icons/mac/icon.icns')
: path.join(__dirname, '../dist/icons/win/icon.ico')
mainWindow = new BrowserWindow({
width: 1200,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

BIN
public/icons/mac/icon.icns Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 927 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
public/icons/png/16x16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 688 B

BIN
public/icons/png/24x24.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
public/icons/png/32x32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
public/icons/png/48x48.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 KiB

BIN
public/icons/png/64x64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 KiB

BIN
public/icons/win/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 KiB

View File

@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="./icons/favicon.jpeg">
<link rel="icon" href="./icons/png/1024x1024.png">
<title>文件位置查询</title>
</head>
<body>