electron / node-rcedit Goto Github PK
View Code? Open in Web Editor NEWNode module to edit resources of exe
License: MIT License
Node module to edit resources of exe
License: MIT License
If you use an executable (.exe) with an Umlaut (ä,ö,ü) or with an accent (é, è, etc) in its name, then node-rcedit crashes (at least if used with wine on OSX)
The Error is as follows:
fixme:heap:HeapSetInformation 0x0 1 0x0 0
Fatal error: Unable to load file
wine: wine-1.6.2
rcedit: 0.3.0
You should at least mention this in the documentation.
"spawn E:\git\mock\out\mock-win32-x64\resources\app.asar\node_modules\rcedit\bin\rcedit.exe ENOENT"
Hi,
I'm unable to alter icon in docker image
{
'icon': 'AppIcon.ico',
}
Using wine32 in docker image.
Probably related to electron/rcedit#56?
spawn wine [ '/builds/project-0/build/rcedit/bin/rcedit.exe',
'build/bin/x64/t.exe',
'--set-version-string',
'CompanyName',
'T, s.r.o.',
'--set-version-string',
'FileDescription',
'T agent',
'--set-version-string',
'LegalCopyright',
'Copyright 2018',
'--set-version-string',
'ProductName',
'T agent',
'--set-version-string',
'OriginalFilename',
't.exe',
'--set-icon',
'AppIcon.ico' ]
Error: rcedit.exe failed with exit code 1. wine: created the configuration directory '/root/.wine'
Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.
Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.
Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.
Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.
Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.
wine: configuration in '/root/.wine' has been updated.
Cannot open icon file 'A'
Fatal error: Unable to set icon
Also tried to pass 32bit exe
I've seen this while using Electron Packager to build a Windows version of an Electron app with a custom app icon on a Mac with Apple Silicon (M1) . wine-stable
is installed via Homebrew and works properly. The reason is that node-rcedit only checks for the x64
architecture to execute rcedit-x64.exe
instead of rcedit.exe
. This may also fail on other ARM64 platforms where Wine/node-rcedit is used.
To fix it, this line
Line 9 in 488329a
should be
const rceditExe = process.arch === 'x64' || process.arch === 'arm64' ? 'rcedit-x64.exe' : 'rcedit.exe'
Since node-rcedit now uses cross-spawn-windows-exe to run Wine a similar fix seems to be needed there (I think).
Maybe this should also be backported to v2.3.0 since this is the version Electron Packager currently uses. The changes there would be
Line 10 in ee4e10a
to
let rcedit = path.resolve(__dirname, '..', 'bin', process.arch === 'x64' || process.arch === 'arm64' ? 'rcedit-x64.exe' : 'rcedit.exe')
and
Line 40 in ee4e10a
to
rcedit = process.arch === 'x64' || process.arch === 'arm64' ? 'wine64' : 'wine'
When using wsl, the library uses the windows execrable.
But the path to the executable is not being fixed, Causing an exception.
Trying to run this on NixOS I'm getting this error:
> electron-forge make --platform win32
✔ Checking your system
✔ Resolving Forge Config
We need to package your application before we can make it
✔ Preparing to Package Application for arch: x64
✔ Preparing native dependencies
⠙ Packaging Application
An unhandled rejection has occurred inside Forge:
Error: rcedit.exe failed with exit code 90
We have wine64
as a script pointing to wine
:
> wine64 --help
Usage: wine PROGRAM [ARGUMENTS...] Run the specified program
wine --help Display this help and exit
wine --version Output version information and exit
The wine
is a 64bit version wine because it is on NixOS, and NixOS is 64bit ONLY. So I assume that wine
in NixOS has to be 64 bit.
the master branch's package.json says "1.1.1", but github releases has 1.1.2 and 2.0.0
Hi.
Packing my electron app for win32, I got Fatal error
.
Currently, no icon for win32.
After set icon
to "assets/app.icns"
for win32,
$ npm run build
...
Packaging app for platform win32 ia32 using electron v0.28.3
fixme:heap:HeapSetInformation 0x0 1 0x0 0
Fatal error: Unable to set icon
undefined
I've already installed wine using brew.
OSX-10.10.3
wine-1.6.2
pkg ./test.js --output test.exe
then it works good.
Change the icon :
const rcedit = require('rcedit')
const fs = require('fs')
const filename = './test.exe'
console.log(fs.existsSync(filename))
rcedit(filename , {
icon: './png/003_snorlax_Fxe_icon.ico'
},(err) => {
console.log(err)
})
then execute the program again it will result an error:
Pkg: Error reading from file.
I've opened a similar issue on the electron-packager GitHub, specifically because I am unsure if there is a problem with rcedit or electron-packager's passing of parameters to rcedit. Unfortunately the error messaging is vague and I'm at a loss of where to go from here.
I keep getting the following when using electron-packager:
λ electron-packager . app --platform=win32 --arch=x64
Packaging app for platform win32 x64 using electron v1.4.13
rcedit.exe failed with exit code 1. Fatal error: Unable to commit changes
I've ensured that rcedit was downloaded by electron-packager, and even placed rcedit in my path just in case and got the same error. Unfortunately, the error is very vague and I'm not sure how to debug it.
After a bit of searching, I eventually worked out that the source code for bin/rcedit.exe
is actually in https://github.com/electron/rcedit
IMHO it would be nice if that was mentioned in the README for this repo :-)
(and conversely, maybe it'd be useful for the rcedit README to mention that a pre-compiled binary is available from https://github.com/electron/node-rcedit/tree/master/bin ? Because https://github.com/electron/rcedit/releases is pretty old!)
See electron/packager#173 (comment)
Any value for ProductVersion will work, except 1 or 1.0. When either of those values are applied, the ProductVersion remains empty
trace #6 to this line
https://github.com/atom/node-rcedit/blob/master/src/rcedit.coffee#L34-L35
when callback(error)
, there is not any error info on the console.
electron-packager
not return any error also.
A new release is available at https://github.com/electron/rcedit/releases/tag/v1.0.0
When using latest rcedit with wine:
err:module:import_dll Library MSVCP120.dll (which is needed by L"Z:\\home\\iofjuupasli\\projects\\alpatsino\\t\\node_modules\\rcedit\\bin\\rcedit.exe") not found
err:module:import_dll Library MSVCR120.dll (which is needed by L"Z:\\home\\iofjuupasli\\projects\\alpatsino\\t\\node_modules\\rcedit\\bin\\rcedit.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"Z:\\home\\iofjuupasli\\projects\\alpatsino\\t\\node_modules\\rcedit\\bin\\rcedit.exe" failed, status c0000135
undefined
There was no errors in previous version.
Is it possible to include this dependencies to package?
I spent a lot of time trying to figure out what is going on.
If you miss msvcp120.dll
which is common problem for Windows the rcedit.exe
will rise that error, but node-rcedit
not.
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\node-rcedit\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'mocha'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'premocha', 'mocha', 'postmocha' ]
5 info lifecycle [email protected]premocha: [email protected]mocha: [email protected]
6 info lifecycle [email protected]
7 verbose lifecycle [email protected]mocha: unsafe-perm in lifecycle truemocha: PATH: C:\node-rcedit\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\node-rcedit\node_modules.bin;C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\node-rcedit\node_modules.bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\Git\cmd;C:\Program Files\nodejs;C:\Users\Sherebyah Tisbi\AppData\Local\Microsoft\WindowsApps;C:\Users\Sherebyah Tisbi\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Sherebyah Tisbi\AppData\Roaming\npm
8 verbose lifecycle [email protected]
9 verbose lifecycle [email protected]mocha: CWD: C:\node-rceditmocha: Args: [ '/d /s /c', 'mocha test/*.js' ]
10 silly lifecycle [email protected]
11 silly lifecycle [email protected]mocha: Returned: code: 3 signal: nullmocha: Failed to exec mocha script
12 info lifecycle [email protected]
13 verbose stack Error: [email protected] mocha: mocha test/*.js
13 verbose stack Exit status 3
13 verbose stack at EventEmitter. (C:\node-rcedit\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:310:20)
13 verbose stack at ChildProcess. (C:\node-rcedit\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:310:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid [email protected]
15 verbose cwd C:\node-rcedit
16 verbose Windows_NT 10.0.18363
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\node-rcedit\node_modules\npm\bin\npm-cli.js" "run" "mocha"
18 verbose node v12.16.3
19 verbose npm v6.14.5
20 error code ELIFECYCLE
21 error errno 3
22 error [email protected] mocha: mocha test/*.js
22 error Exit status 3
23 error Failed at the [email protected] mocha script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 3, true ]
Replacing the windows icon for an exe with a proper, multi-icon file yields in the app icon to be shown crispy and not resized in windows. Looking into the exe however, all icons are correctly transferred including size and transparency. Yet this only happens with rcedit
Hello,
I'm packaging atom [1] for debian [2].
Your software is there included.
I found some issues in your software:
Regards,
Jörg Frings-Fürst
[1] http://atom.io
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=747824
[3]
// Copyright 20xx-20xx your name
// License: [your license eg. MIT / GPL-2 ....]
Have any way to change the language propertie?
Reference: https://msdn.microsoft.com/en-us/library/windows/desktop/aa381058(v=vs.85).aspx
Hi,
rcedit.exe crashes in windows server 2012 with the following stack trace.
Problem signature:
Problem Event Name: APPCRASH
Application Name: rcedit.exe
Application Version: 0.2.0.0
Application Timestamp: 528436dd
Fault Module Name: MSVCP100.dll
Fault Module Version: 6.3.9600.17736
Fault Module Timestamp: 550f42c2
Exception Code: c0000135
Exception Offset: 0009d4f2
OS Version: 6.3.9600.2.0.0.400.8
Locale ID: 1033
Additional Information 1: 1abe
Additional Information 2: 1abee00edb3fc1158f9ad6f44f0f6be8
Additional Information 3: 1abe
Additional Information 4: 1abee00edb3fc1158f9ad6f44f0f6be8
Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid=280262
If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt
Hey there,
Any chance to have a cli support as well? so we can run it with npx?
I was using Travis CI to do automatic testing and suddenly everything failed after the required wine version grew.
By digging into the logs I discover the wine version used is 1.4, but after I switch to ppa:wine/wine-builds
and winehq-devel
1.9, the situation doesn't change. I fix this by fixingrcedit
version to 0.5.0 in package.json
. But a warning will always be a good thing.
BTW don't think this is a minor change.
Just want to know if there is some method to remove a certain version string.
Hello!
I am trying to use [email protected]
on macOS Catalina with wine64
. And here is what happens.
$ wine64 ./node_modules/rcedit/bin/rcedit-x64.exe ./build/my_app.exe --set-icon ./win_icon.ico
0009:fixme:ver:GetCurrentPackageId (0x21fd10 0x0): stub
Do you have any suggestions on how I can solve it?
Hello guys,
I am not quite familiar with npm. I installed it recently and run the command "npm install -g rcedit" to install rcedit. But how do I use it ?
Thank you,
Regards,
is there a way to change the language code using this? in the resource file there's:
BLOCK "VarFileInfo"
{
VALUE "Translation", 0x0409 0x04B0
}
where 0x0409 is the English (United States) code
need to change the language to my countries lang
Hi!
Looks like wine
doesn't work on macOS Catalina: https://forum.winehq.org/viewtopic.php?f=9&t=32590
% wine
zsh: bad CPU type in executable: wine
So, this package throws an error indeed. Example: electron/packager#1055
Would be nice to find a mitigation.
In electron/packager#519 someone asked to be able to use wine64 to run rcedit.exe
. My suggestion is to use process.env.WINE || 'wine'
and add a WINE=wine64
env to the Travis build matrix.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.