Files
Multi-Hoster-Upload/scripts/afterPack.cjs
T
Sucukdeluxe 59cead80c6 fix: stabilize renderer state and lifecycle updates
Prevent stale history, account, diagnostics, and language updates from repainting newer state. Keep queue virtualization, panel sizing, telemetry, cancellation, and runtime timing consistent across rapid UI changes. Strengthen painted-frame and lifecycle regression coverage, and brand packaged Windows metadata with the product publisher.
2026-08-13 07:07:42 +02:00

45 lines
1.3 KiB
JavaScript

const path = require("path");
module.exports = async function afterPack(context) {
let rcedit;
try {
rcedit = require("rcedit");
} catch {
console.warn(" rcedit: skipped - rcedit not installed");
return;
}
const productFilename = context.packager?.appInfo?.productFilename;
const version = context.packager?.appInfo?.version;
if (!productFilename || !version) {
console.warn(" rcedit: skipped - application metadata not available");
return;
}
const exePath = path.join(context.appOutDir, `${productFilename}.exe`);
const iconPath = path.resolve(__dirname, "..", "assets", "app_icon.ico");
try {
const fs = require("fs");
if (!fs.existsSync(iconPath)) {
console.warn(" rcedit: skipped - app_icon.ico not found");
return;
}
console.log(` rcedit: branding executable -> ${exePath}`);
await rcedit(exePath, {
icon: iconPath,
"file-version": version,
"product-version": version,
"version-string": {
CompanyName: "Sucukdeluxe",
FileDescription: "Multi Hoster Uploader",
InternalName: productFilename,
OriginalFilename: `${productFilename}.exe`,
ProductName: "Multi Hoster Uploader"
}
});
} catch (error) {
console.warn(` rcedit: failed - ${String(error)}`);
}
};