forked from vercel/pkg
-
-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Description
I’d like to request support for setting Windows executable metadata (e.g. ProductVersion, FileVersion, CompanyName, etc.) either:
- during the
pkg
build process (preferred) - or safely after build, e.g. using tools like
rcedit
, without breaking the generated binary
❌ Current Issue
When using rcedit
to modify the .exe
after building with pkg
, the binary becomes corrupted and fails to run with:
Pkg: Error reading from file.
This seems to be caused by how pkg
structures its executables, making post-build modifications unsafe. Unfortunately, this blocks all standard methods of adding or correcting metadata.
Related Issues in the original vercel/pkg
- How to modify properties of the .exe vercel/pkg#212
- Windows: can't edit EXE's resources with tools like rcedit vercel/pkg#149
- RFC: pkg 6.0 vercel/pkg#1655
- Windows binary ICO replacement fails vercel/pkg#812
- Executable File Icon vercel/pkg#318
✅ Suggested Solutions
Ideal (during build)
Add a field in package.json or a CLI flag to set version metadata during the build process. For example:
"pkg": {
"versionMetadata": {
"ProductVersion": "6.5.0",
"FileVersion": "6.5.0",
"CompanyName": "my-company",
"ProductName": "my-product"
}
}
Alternative (after build)
Make the generated .exe
compatible with post-build tools like rcedit
, postject
, etc. so users can safely inject version metadata after building.
📌 Why It Matters
Version metadata is essential for
- displaying correct information in Windows Explorer
- deployment and patching tools
- digital code signing
- QA/version tracking across systems
Metadata
Metadata
Assignees
Labels
No labels