-
Notifications
You must be signed in to change notification settings - Fork 1k
Windows: can't edit EXE's resources with tools like rcedit #149
Comments
This commit replaces our home-grown CLI packaging mechanism based on browserify + node-static-entry-point with pkg, an open source tool to package Node.js applications for distribution. Some highlights: - Removing browserify got rid of a lot of dependencies from npm-shrinkwrap.json - pkg currently has an issue where macOS binaries can't be code-signed (vercel/pkg#128), therefore this commit comments-out the binary signing section for that operating system - pkg currently has an issue where Windows binaries can't be branded (vercel/pkg#149), therefore this commit comments-out the branding section for that operating system See: https://github.com/zeit/pkg Change-Type: patch Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This commit replaces our home-grown CLI packaging mechanism based on browserify + node-static-entry-point with pkg, an open source tool to package Node.js applications for distribution. Some highlights: - Removing browserify got rid of a lot of dependencies from npm-shrinkwrap.json - pkg currently has an issue where macOS binaries can't be code-signed (vercel/pkg#128), therefore this commit comments-out the binary signing section for that operating system - pkg currently has an issue where Windows binaries can't be branded (vercel/pkg#149), therefore this commit comments-out the branding section for that operating system See: https://github.com/zeit/pkg Change-Type: patch Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This commit replaces our home-grown CLI packaging mechanism based on browserify + node-static-entry-point with pkg, an open source tool to package Node.js applications for distribution. Some highlights: - Removing browserify got rid of a lot of dependencies from npm-shrinkwrap.json - pkg currently has an issue where macOS binaries can't be code-signed (vercel/pkg#128), therefore this commit comments-out the binary signing section for that operating system - pkg currently has an issue where Windows binaries can't be branded (vercel/pkg#149), therefore this commit comments-out the branding section for that operating system See: https://github.com/zeit/pkg Change-Type: patch Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This commit replaces our home-grown CLI packaging mechanism based on browserify + node-static-entry-point with pkg, an open source tool to package Node.js applications for distribution. Some highlights: - Removing browserify got rid of a lot of dependencies from npm-shrinkwrap.json - pkg currently has an issue where macOS binaries can't be code-signed (vercel/pkg#128), therefore this commit comments-out the binary signing section for that operating system - pkg currently has an issue where Windows binaries can't be branded (vercel/pkg#149), therefore this commit comments-out the branding section for that operating system See: https://github.com/zeit/pkg Change-Type: patch Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This commit replaces our home-grown CLI packaging mechanism based on browserify + node-static-entry-point with pkg, an open source tool to package Node.js applications for distribution. Some highlights: - Removing browserify got rid of a lot of dependencies from npm-shrinkwrap.json - pkg currently has an issue where macOS binaries can't be code-signed (vercel/pkg#128), therefore this commit comments-out the binary signing section for that operating system - pkg currently has an issue where Windows binaries can't be branded (vercel/pkg#149), therefore this commit comments-out the branding section for that operating system See: https://github.com/zeit/pkg Change-Type: patch Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This commit replaces our home-grown CLI packaging mechanism based on browserify + node-static-entry-point with pkg, an open source tool to package Node.js applications for distribution. Some highlights: - Removing browserify got rid of a lot of dependencies from npm-shrinkwrap.json - pkg currently has an issue where macOS binaries can't be code-signed (vercel/pkg#128), therefore this commit comments-out the binary signing section for that operating system - pkg currently has an issue where Windows binaries can't be branded (vercel/pkg#149), therefore this commit comments-out the branding section for that operating system See: https://github.com/zeit/pkg Fixes: #1531 Fixes: #1450 Change-Type: patch Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This commit replaces our home-grown CLI packaging mechanism based on browserify + node-static-entry-point with pkg, an open source tool to package Node.js applications for distribution. Some highlights: - Removing browserify got rid of a lot of dependencies from npm-shrinkwrap.json - pkg currently has an issue where macOS binaries can't be code-signed (vercel/pkg#128), therefore this commit comments-out the binary signing section for that operating system - pkg currently has an issue where Windows binaries can't be branded (vercel/pkg#149), therefore this commit comments-out the branding section for that operating system See: https://github.com/zeit/pkg Fixes: #1531 Fixes: #1450 Change-Type: patch Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This commit replaces our home-grown CLI packaging mechanism based on browserify + node-static-entry-point with pkg, an open source tool to package Node.js applications for distribution. Some highlights: - Removing browserify got rid of a lot of dependencies from npm-shrinkwrap.json - pkg currently has an issue where macOS binaries can't be code-signed (vercel/pkg#128), therefore this commit comments-out the binary signing section for that operating system - pkg currently has an issue where Windows binaries can't be branded (vercel/pkg#149), therefore this commit comments-out the branding section for that operating system See: https://github.com/zeit/pkg Fixes: #1531 Fixes: #1450 Change-Type: patch Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This commit replaces our home-grown CLI packaging mechanism based on browserify + node-static-entry-point with pkg, an open source tool to package Node.js applications for distribution. Some highlights: - Removing browserify got rid of a lot of dependencies from npm-shrinkwrap.json - pkg currently has an issue where macOS binaries can't be code-signed (vercel/pkg#128), therefore this commit comments-out the binary signing section for that operating system - pkg currently has an issue where Windows binaries can't be branded (vercel/pkg#149), therefore this commit comments-out the branding section for that operating system See: https://github.com/zeit/pkg Fixes: #1531 Fixes: #1450 Change-Type: patch Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This commit replaces our home-grown CLI packaging mechanism based on browserify + node-static-entry-point with pkg, an open source tool to package Node.js applications for distribution. Some highlights: - Removing browserify got rid of a lot of dependencies from npm-shrinkwrap.json - pkg currently has an issue where macOS binaries can't be code-signed (vercel/pkg#128), therefore this commit comments-out the binary signing section for that operating system - pkg currently has an issue where Windows binaries can't be branded (vercel/pkg#149), therefore this commit comments-out the branding section for that operating system See: https://github.com/zeit/pkg Fixes: #1531 Fixes: #1450 Change-Type: patch Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This commit replaces our home-grown CLI packaging mechanism based on browserify + node-static-entry-point with pkg, an open source tool to package Node.js applications for distribution. Some highlights: - Removing browserify got rid of a lot of dependencies from npm-shrinkwrap.json - pkg currently has an issue where macOS binaries can't be code-signed (vercel/pkg#128), therefore this commit comments-out the binary signing section for that operating system - pkg currently has an issue where Windows binaries can't be branded (vercel/pkg#149), therefore this commit comments-out the branding section for that operating system See: https://github.com/zeit/pkg Fixes: #1531 Fixes: #1450 Change-Type: patch Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This commit replaces our home-grown CLI packaging mechanism based on browserify + node-static-entry-point with pkg, an open source tool to package Node.js applications for distribution. Some highlights: - Removing browserify got rid of a lot of dependencies from npm-shrinkwrap.json - pkg currently has an issue where macOS binaries can't be code-signed (vercel/pkg#128), therefore this commit comments-out the binary signing section for that operating system - pkg currently has an issue where Windows binaries can't be branded (vercel/pkg#149), therefore this commit comments-out the branding section for that operating system See: https://github.com/zeit/pkg Fixes: #1531 Fixes: #1450 Change-Type: patch Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This commit replaces our home-grown CLI packaging mechanism based on browserify + node-static-entry-point with pkg, an open source tool to package Node.js applications for distribution. Some highlights: - Removing browserify got rid of a lot of dependencies from npm-shrinkwrap.json - pkg currently has an issue where macOS binaries can't be code-signed (vercel/pkg#128), therefore this commit comments-out the binary signing section for that operating system - pkg currently has an issue where Windows binaries can't be branded (vercel/pkg#149), therefore this commit comments-out the branding section for that operating system See: https://github.com/zeit/pkg Fixes: #1531 Fixes: #1450 Change-Type: patch Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This commit replaces our home-grown CLI packaging mechanism based on browserify + node-static-entry-point with pkg, an open source tool to package Node.js applications for distribution. Some highlights: - Removing browserify got rid of a lot of dependencies from npm-shrinkwrap.json - pkg currently has an issue where macOS binaries can't be code-signed (vercel/pkg#128), therefore this commit comments-out the binary signing section for that operating system - pkg currently has an issue where Windows binaries can't be branded (vercel/pkg#149), therefore this commit comments-out the branding section for that operating system See: https://github.com/zeit/pkg Fixes: #1531 Fixes: #1450 Change-Type: patch Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
I have a working (manual) solution that might help. I've been using this to get the version metadata into the exe that Squirrel/Windows looks for. This is what I do : 1. Compile the executable 2. Compile the VERSION INFO resource definition file to binary format 3. Import the VERSION INFO resource into the exe That creates index-output.exe with the VERSION INFO resource added. Here's an example of the plain text .rc file used in step 2 (
|
I had a similar need to change the EXE's resources and I wanted to use a simple tool like rcedit.
Here is my typescript code: import rcedit from 'rcedit'
import glob from 'glob'
import path from 'path'
process.env.PKG_CACHE_PATH = path.resolve('./.pkg-cache')
build()
async function build() {
const pkgTarget = 'node14-win-x64'
const cacheExe = await downloadCache(pkgTarget)
await rcedit(cacheExe, {
'product-version': '1,0.0.0',
'file-version': '1,0.0.0',
icon: path.resolve('./src/assets/icon.ico'),
'version-string': {
FileDescription: 'File description',
ProductName: 'Program Name',
LegalCopyright: `© ${new Date().getFullYear()} My Copyright.`,
OriginalFilename: 'program.exe',
},
})
const pkg = await import('pkg')
const outputExe = path.resolve('./dist/output.exe')
await pkg.exec([path.resolve('./dist/app.js'), ...['--target', pkgTarget], ...['--output', outputExe]])
}
async function downloadCache(pkgTarget: string): Promise<string> {
const [nodeRange, platform, arch] = pkgTarget.split('-')
const pkgFetch = await import('pkg-fetch')
await pkgFetch.need({ nodeRange, platform, arch })
const cacheExe = glob.sync(`${PKG_CACHE_PATH}/**/fetched*`)
if (cacheExe.length < 1) throw new Error('Error downloading PKG cache')
return cacheExe[0]
} |
This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label |
I haven't tried this myself, but does anybody know if using |
I have been trying to get @mmamedel 's script working for me, but no luck so far as it does not change the exe. I've tried applying https://github.com/vercel/pkg-fetch/issues/188 as well, but either way, the I am using CommonJS and require() instead of ES modules for this, but otherwise, but script is basically the same as the @mmamedel one above. Are other folks having issues or success? I am on pkg@5.3.2 and pkg-fetch@3.2.3 |
This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label |
This issue is now closed due to inactivity, you can of course reopen or reference this issue if you see fit. |
This will not work, as pgk-fetch will check EXPECTED_HASHES and rejects the binary if it does not match the hardcoded hash. You can hack the pgk-fetch in the node_modules, but that sucks as its .gitignored. The only "clean" solution is to work with a custom pkg (instead of npm install pgk) and do there the rcedit magic as explained above. |
I wonder if this is related to #128.
Looks like I can't brand pkg generated binaries with rcedit.
For example:
The text was updated successfully, but these errors were encountered: