electron/node-rcedit

What is exit code 90

CMCDragonkai opened this issue · 5 comments

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 wine is also wine-5.0.2.

I just realised that this is coming from electron-forge make --platform win32.

But If I download your master executables. And try it directly, it does appear to work:

[nix-shell:~/Downloads]$ wine64 ./rcedit.exe 
001f:err:winediag:xrandr12_init_modes Broken NVIDIA RandR detected, falling back to RandR 1.0. Please consider using the Nouveau driver instead.
000d:err:winediag:xrandr12_init_modes Broken NVIDIA RandR detected, falling back to RandR 1.0. Please consider using the Nouveau driver instead.
Rcedit v0.2.0: Edit resources of exe.

Usage: rcedit <filename> [options...]

Options:
  -h, --help                                 Show this message
  --set-version-string <key> <value>         Set version string
  --get-version-string <key>                 Print version string
  --set-file-version <version>               Set FileVersion
  --set-product-version <version>            Set ProductVersion
  --set-icon <path-to-icon>                  Set file icon
  --set-requested-execution-level <level>    Pass nothing to see usage
  --application-manifest <path-to-file>      Set manifest file
  --set-resource-string <key> <value>        Set resource string
  --get-resource-string <key>                Get resource string
  --set-rcdata <key> <path-to-file>          Replace RCDATA by integer id
0009:fixme:ver:GetCurrentPackageId (0x32fe94 (nil)): stub

Is there a version difference between your master branch and what is currently on @electron-forge/cli?

Just found out that the current release of electron-forge/cli is using rcedit v2.3.0. Maybe that's the problem?

Ok I found out what command that it is actually trying to run:

wine64 /home/cmcdragonkai/Projects/Typescript-Demo-Lib/node_modules/rcedit/bin/rcedit-x64.exe /tmp/electron-packager/win32-x64/someapp-win32-x64/someapp.exe --set-version-string FileDescription someapp --set-version-string InternalName someapp --set-version-string OriginalFilename someapp.exe --set-version-string ProductName someapp --set-version-string CompanyName Roger Qiu --set-file-version 1.0.0 --set-product-version 1.0.0

So this doesn't work because the rcedit-x64.exe does not work.

But if I change this to rcedit.exe, it does work...

I thought that NixOS's wine is definitely a 64bit wine. But now I'm not so sure...

Is it possible that NixOS which is a 64 bit linux distro is packaging a 32 bit wine?

We just needed wineWowPackages.full not wine. All sorted.