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

fix: cross-platform build for native modules using prebuild #7465

Closed

Conversation

cocktailpeanut
Copy link

The rebuild() method has not been passing the platform to the electron-rebuild.

This means electron-builder has been using the process.platform no matter what platform you specify, which means no cross-platform build if an app includes native modules that include prebuilt binaries.

Combined with the fix for @electron/rebuild at electron/rebuild#1072 I have confirmed that now I can successfully build using electron-builder for ALL platforms using the correct native built binaries.

The `rebuild()` method has not been passing the platform to the electron-rebuild, which meant, electron-rebuild has been using the `process.platform` no matter what platform you specify, which means no cross-platform build if an app includes native modules that include prebuilt binaries.
@changeset-bot
Copy link

changeset-bot bot commented Mar 7, 2023

⚠️ No Changeset found

Latest commit: 73f751b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify
Copy link

netlify bot commented Mar 7, 2023

Deploy Preview for car-park-attendant-cleat-11576 ready!

Name Link
🔨 Latest commit 73f751b
🔍 Latest deploy log https://app.netlify.com/sites/car-park-attendant-cleat-11576/deploys/640784db8a358f0008a9943c
😎 Deploy Preview https://deploy-preview-7465--car-park-attendant-cleat-11576.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 7, 2023

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@mmaietta
Copy link
Collaborator

Attempting to reimplement this via #7629

@mmaietta
Copy link
Collaborator

@cocktailpeanut can you try next 24.5.1 with the new implementation I added?

@willemdjong
Copy link

willemdjong commented Jun 29, 2023

@mmaietta I tried using 24.5.2 and set npmRebuild at true but it ain't working as previous versions of electron builder. Previously I used electron-builder version=23.6.0. Rebuilding native dependencies and install prebuilt binary are the missing lines in my electron-builder output. Currently this is blocking me to upgrade from 23 to 24.

@mmaietta
Copy link
Collaborator

@willemdjong please create a Issue ticket, tag me, and we can consolidate our convo there. I'll need a minimum reproducible repo of the project to test with as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants