修复用户提交的自定义图标不存在时候默认图标为微信图标的bug

This commit is contained in:
Tlntin
2022-12-29 11:54:01 +08:00
parent 8ef542bfc7
commit 48c2707a44
2 changed files with 18 additions and 0 deletions

View File

@@ -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"];
}
}
// 处理托盘自定义图标