問題描述
當我使用 Electron-Builder 創建和安裝可執行文件時,桌面快捷方式會顯示一個 Electron 圖標.我必須手動 Change Icon...
才能使 icon.ico
生效.
When I create and install an executable using Electron-Builder, the desktop shortcut instead displays an Electron icon. I have to manually Change Icon...
for icon.ico
to take effect.
"target": "nsis",
"icon": "assets/icon_256.ico",
"nsis": {
"installerIcon": "assets/icon.ico",
"uninstallerIcon": "assets/icon.ico",
"installerHeaderIcon": "assets/icon.ico"
}
// I have also tried this, which also produces the same issue.
"win": {
"target": "nsis",
"icon": "assets/icon_256.ico"
}
有沒有辦法強制它按預期在安裝時生效?
Is there a way to force it to take effect upon installation as would be expected?
鏈接到 GitHub 上的問題.
推薦答案
您可以嘗試以下提示:
1.確保您使用的是真實的.ico文件,而不只是重命名文件擴展名,而是使用一些工具來轉換.
2.嘗試替換assets/icon_256.ico"與./assets/icon_256.ico".并檢查您的文件路徑
Here some tips you can try:
1.Be sure you are using real .ico file,not just rename file extension, But use some tool to transform.
2.try replace "assets/icon_256.ico" with "./assets/icon_256.ico". And check your file path
這篇關于必須手動啟用電子生成器桌面快捷方式圖標的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!