question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot package for win32 with wine

See original GitHub issue
  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Please describe your issue: Trying to build for win32 on a linux machine. Wine and Mono are both installed. Always fails at the rcedit.exe stage, depending on the WINEARCH setting:

wine: Bad EXE format for Z:\my-project\node_modules\rcedit\bin\rcedit.exe.

wine: ‘/root/.wine’ is a 32-bit installation, it cannot support 64-bit applications.

Console output when you run electron-forge with the environment variable DEBUG=electron-forge:*. (Instructions on how to do so here). Please include the stack trace if one exists.

WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:async-ora Process Started: Checking your system +0ms
  electron-forge:check-system checking system, create ~/.skip-forge-system-check to stop doing this +0ms
  electron-forge:async-ora Process Succeeded: Checking your system -- after 333ms +334ms
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:async-ora Process Started: Preparing to Package Application for arch: x64 +0ms
  electron-forge:project-resolver searching for project in: /my-project +0ms
  electron-forge:project-resolver electron-forge compatible package.json found in /my-project/package.json +8ms
  electron-forge:packager packaging with options { asar: false,
  overwrite: true,
  appCopyright: '...',
  icon: './resources/img/logo.ico',
  dir: '/my-project',
  arch: 'x64',
  platform: 'win32',
  afterCopy: [ [Function] ],
  afterExtract: [ [Function] ],
  afterPrune: [ [Function] ],
  out: '/my-project/out',
  electronVersion: '5.0.7',
  quiet: true } +0ms
  electron-forge:async-ora Process Succeeded: Preparing to Package Application for arch: x64 -- after 10.7s +11s
  electron-forge:async-ora Process Started: Preparing native dependencies +0ms
  electron-forge:async-ora Process Succeeded: Preparing native dependencies -- after 119ms +119ms
  electron-forge:async-ora Process Started: Packaging Application +0ms

An unhandled rejection has occurred inside Forge:
Error: rcedit.exe failed with exit code 193. wine: Bad EXE format for Z:\my-project\node_modules\rcedit\bin\rcedit.exe.
    at ChildProcess.child.on.code (/my-project/node_modules/rcedit/lib/rcedit.js:69:16)
    at ChildProcess.emit (events.js:198:13)
    at maybeClose (internal/child_process.js:982:16)
    at Socket.stream.socket.on (internal/child_process.js:389:11)
    at Socket.emit (events.js:198:13)
    at Pipe._handle.close (net.js:606:12)

Electron Forge was terminated. Location:
{}

What command line arguments are you passing?

electron-forge package --platform win32

What does your config.forge data in package.json look like?

{
  "packagerConfig": {
	"appCopyright": "...",
	"icon": "./resources/img/logo.ico"
  },
  "makers": [...]
}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

13reactions
luisdiasdevcommented, Jun 26, 2020

I’m using electronuserland/builder:wine and running electron-forge make --platform=win32

any tips how to resolve?

An unhandled rejection has occurred inside Forge:
--
40 | Error: rcedit.exe failed with exit code 1. wine: '/root/.wine' is a 32-bit installation, it cannot support 64-bit applications.
41 | at ChildProcess.<anonymous> (/drone/src/desktop/node_modules/rcedit/lib/rcedit.js:69:16)
42 | at ChildProcess.emit (events.js:311:20)
43 | at ChildProcess.EventEmitter.emit (domain.js:482:12)
44 | at maybeClose (internal/child_process.js:1021:16)
45 | at Socket.<anonymous> (internal/child_process.js:443:11)
46 | at Socket.emit (events.js:311:20)
47 | at Socket.EventEmitter.emit (domain.js:482:12)
48 | at Pipe.<anonymous> (net.js:668:12)
49 |  
50 | Electron Forge was terminated. Location:
51 | {}
      "makers": [
        {
          "name": "@electron-forge/maker-squirrel",
          "platforms": [
            "win32"
          ],

I made it work with the image electronuserland/builder:wine-mono. I haven’t tested the wine only variant, but I guess it could work. To make it work I had to do a little bit of tweaking with the system:

# Removes the original 32-bit wine prefix from the generated image
rm -rf /root/.wine
# Creates a new 64-bit one
winecfg

After theses steps I could run electron-forge make --platform=win32 without problems.

Hope it helps.

1reaction
OrangeDogcommented, Aug 8, 2019

wine32 cannot be installed on a 64-bit Alpine Linux as far as I can tell (I got many musl conflicts).

On Debian, with dpkg --add-architecture i386 it can be installed, and the build does then work. Probably worth mentioning that both wine32 (for rcedit.exe) and wine64 (for maker-squirrel) are required, not simply wine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot package for win32 with wine #1080 - electron/forge
Trying to build for win32 on a linux machine. Wine and Mono are both installed. Always fails at the rcedit.exe stage, depending on...
Read more >
[SOLVED] Wine package doesn't work - Linux Mint Forums
Hi! I installed Wine package from software manager (the version suggested by Mint team, file is called wine-installer) but it doesn't work.
Read more >
FAQ - WineHQ Wiki
2.5 I have a problem installing my distro's Wine package and need help; 2.6 Can I install more than one Wine version on...
Read more >
Ubuntu Wine - cannot find C:\\windows\\system32?
Run the Configure Wine application from the launcher or open a terminal with Ctrl Alt T and issue the command winecfg Either way...
Read more >
Wine package guidelines - ArchWiki
In this guideline we will talk about Win32 binaries, ... If the program cannot be installed the easy way, you need to create...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found