Restore the v2.1.19 application baseline and retain only the focused import preflight summary with duplicate, unavailable, destination, job, and size-limit visibility.
This commit is contained in:
+30
-18
@@ -1,32 +1,44 @@
|
||||
const path = require("path");
|
||||
const fs = require("fs");
|
||||
|
||||
module.exports = async function afterPack(context) {
|
||||
const rcedit = require("rcedit");
|
||||
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) {
|
||||
throw new Error("Application metadata is unavailable");
|
||||
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");
|
||||
|
||||
if (!fs.existsSync(iconPath)) {
|
||||
throw new Error("Application icon is unavailable");
|
||||
}
|
||||
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"
|
||||
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)}`);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user