Fix app icon: use rcedit afterPack hook to embed custom icon in EXE

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Sucukdeluxe
2026-03-03 03:17:47 +01:00
co-authored by Claude Opus 4.6
parent 4585db0281
commit 9ac557b0a8
3 changed files with 149 additions and 27 deletions
+9
View File
@@ -0,0 +1,9 @@
const path = require("path");
const { rcedit } = require("rcedit");
module.exports = async function afterPack(context) {
const exePath = path.join(context.appOutDir, `${context.packager.appInfo.productFilename}.exe`);
const iconPath = path.resolve(__dirname, "..", "assets", "app_icon.ico");
console.log(` • rcedit: patching icon → ${exePath}`);
await rcedit(exePath, { icon: iconPath });
};