修复用户提交的自定义图标不存在时候默认图标为微信图标的bug
This commit is contained in:
9
bin/builders/common.ts
vendored
9
bin/builders/common.ts
vendored
@@ -218,6 +218,15 @@ export async function mergeTauriConfig(
|
||||
}
|
||||
} else {
|
||||
logger.warn("the custom icon path may not exists. we will use default icon to replace it");
|
||||
if (process.platform === "win32") {
|
||||
tauriConf.tauri.bundle.icon = ["png/icon_256.ico"];
|
||||
}
|
||||
if (process.platform === "linux") {
|
||||
tauriConf.tauri.bundle.icon = ["png/icon_512.png"];
|
||||
}
|
||||
if (process.platform === "darwin") {
|
||||
tauriConf.tauri.bundle.icon = ["icons/icon.icns"];
|
||||
}
|
||||
}
|
||||
|
||||
// 处理托盘自定义图标
|
||||
|
||||
9
dist/cli.js
vendored
9
dist/cli.js
vendored
@@ -1808,6 +1808,15 @@ function mergeTauriConfig(url, options, tauriConf) {
|
||||
}
|
||||
else {
|
||||
logger.warn("the custom icon path may not exists. we will use default icon to replace it");
|
||||
if (process.platform === "win32") {
|
||||
tauriConf.tauri.bundle.icon = ["png/icon_256.ico"];
|
||||
}
|
||||
if (process.platform === "linux") {
|
||||
tauriConf.tauri.bundle.icon = ["png/icon_512.png"];
|
||||
}
|
||||
if (process.platform === "darwin") {
|
||||
tauriConf.tauri.bundle.icon = ["icons/icon.icns"];
|
||||
}
|
||||
}
|
||||
// 处理托盘自定义图标
|
||||
let useDefaultIcon = true; // 是否使用默认托盘图标
|
||||
|
||||
Reference in New Issue
Block a user