Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

32-bit rcedit does not work on macOS 10.15 (Catalina) hosts when building Windows targets #1055

Closed
3 tasks done
neuronflow opened this issue Oct 8, 2019 · 10 comments
Closed
3 tasks done
Labels
bug 🐛 build-host:mac 🍎 Running Electron Packager on macOS build-target:windows Bundling an Electron app specifically for Windows invalid ❌ Not related to Electron Packager directly

Comments

@neuronflow
Copy link

neuronflow commented Oct 8, 2019

Preflight Checklist

  • 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 a bug that matches the one I want to file, without success.

Issue Details

  • Electron Packager Version:
    13.1.1
  • Electron Version:

4.1.4

  • Operating System:

OSX 10.15

  • Last Known Working Electron Packager version::

13.1.1 / 14.0.6

Expected Behavior

package all apps

Actual Behavior

when packaging the windows app the following error msgs appear:

13.1.1:

Unhandled rejection Error: spawn Unknown system error -86
at ChildProcess.spawn (internal/child_process.js:366:11)
at spawn (child_process.js:551:9)
at module.exports (/Users/meow/data/phd/phd_projects/pipeline/code/elephant_client/node_modules/rcedit/lib/rcedit.js:47:15)
at P (/Users/meow/data/phd/phd_projects/pipeline/code/elephant_client/node_modules/electron-packager/node_modules/pify/index.js:32:6)
at new Promise ()
at /Users/meow/data/phd/phd_projects/pipeline/code/elephant_client/node_modules/electron-packager/node_modules/pify/index.js:6:9
at ret (/Users/meow/data/phd/phd_projects/pipeline/code/elephant_client/node_modules/electron-packager/node_modules/pify/index.js:56:76)
at getIconPath.then.icon (/Users/meow/data/phd/phd_projects/pipeline/code/elephant_client/node_modules/electron-packager/win32.js:95:39)

14.0.6:
Packaging app for platform darwin x64 using electron v4.1.4
Packaging app for platform mas x64 using electron v4.1.4
Packaging app for platform linux x64 using electron v4.1.4
Packaging app for platform win32 x64 using electron v4.1.4
(node:16768) UnhandledPromiseRejectionWarning: Error: spawn Unknown system error -86
at ChildProcess.spawn (internal/child_process.js:366:11)
at spawn (child_process.js:551:9)
at Promise (/Users/meow/data/phd/phd_projects/pipeline/code/elephant_client/node_modules/rcedit/lib/rcedit.js:44:19)
at new Promise ()
at module.exports (/Users/meow/data/phd/phd_projects/pipeline/code/elephant_client/node_modules/rcedit/lib/rcedit.js:43:10)
at WindowsApp.runRcedit (/Users/meow/data/phd/phd_projects/pipeline/code/elephant_client/node_modules/electron-packager/src/win32.js:94:31)
(node:16768) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:16768) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
WARNING: signing is required for mas builds. Provide the osx-sign option, or manually sign the app later.

To Reproduce

Additional Information

@welcome
Copy link

welcome bot commented Oct 8, 2019

👋 Thanks for opening your first issue here! If you have a question about using Electron Packager, read the support docs. If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. Development and issue triage is community-driven, so please be patient and we will get back to you as soon as we can.

To help make it easier for us to investigate your issue, please follow the contributing guidelines.

@antelle
Copy link

antelle commented Oct 8, 2019

Hi! Got this as well. I guess, that's because wine is not x64 and doesn't work on macOS Catalina: https://forum.winehq.org/viewtopic.php?f=9&t=32590

@antelle
Copy link

antelle commented Oct 8, 2019

Created an issue in rcedit: electron/node-rcedit#51

@malept malept added the invalid ❌ Not related to Electron Packager directly label Oct 8, 2019
@malept
Copy link
Member

malept commented Oct 8, 2019

I'm going to close this since this is rcedit-specific. You can track progress in the node-rcedit bug you filed.

@malept malept closed this as completed Oct 8, 2019
@neuronflow
Copy link
Author

thanks for the headsup..damn had I known about this issue before I would not have done the update -_-

@antelle
Copy link

antelle commented Oct 8, 2019

I guess, we'll still need to upgrade rcedit when they fix it.

@antelle
Copy link

antelle commented Oct 8, 2019

Maybe it makes sense to switch to another tool for writing icons? There are tools to read PE format in python, for example pefile. Example of icon extraction using it: https://github.com/firodj/extract-icon-py. I'm not sure if there's anything that allows writing icons into exe (will post here if I find anything), but it's possible that it exists.

@malept
Copy link
Member

malept commented Oct 8, 2019

It's not just icons, there are also some Windows metadata (including a strange XML blob embedded in the EXE for administrative rights).

I would rather not require Python to be installed on top of needing Node for Electron Packager.

@antelle
Copy link

antelle commented Oct 8, 2019

Well, Python is preinstalled on mac and exists everywhere on linux and it's for sure not that bad as requiring wine that does not exist at all for mac now. The problem is, if there's complex information, pefile can produce broken results 😞

@antelle
Copy link

antelle commented Oct 9, 2019

I've solved it this way:

  1. make a VM with Ubuntu+wine (use this hack to fix VirtualBox crashes on macOS Catalina)
  2. remove wine
  3. add a script called wine and inside this script upload everything to the VM, after which run wine there
  4. override arguments, if necessary

Seems to be working fine here.

My wine script, to save some time if anyone wants to do the same: https://gist.github.com/antelle/10ca9beed2a83da9af918f1fce3fe7e7

Disclaimer: shitty quality everywhere here in my scripts. Use at your own risk.

@malept malept changed the title packaging windows app does not work after upgrading to OSX 10.15 32-bit rcedit does not work on macOS 10.15 (Catalina) hosts when building Windows targets Oct 10, 2019
@malept malept added build-host:mac 🍎 Running Electron Packager on macOS build-target:windows Bundling an Electron app specifically for Windows labels Oct 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 build-host:mac 🍎 Running Electron Packager on macOS build-target:windows Bundling an Electron app specifically for Windows invalid ❌ Not related to Electron Packager directly
Projects
None yet
Development

No branches or pull requests

3 participants