Skip to content

Conversation

@goosewobbler
Copy link
Member

@goosewobbler goosewobbler commented May 16, 2024

Currently we are using the Node process.arch value to generate the binary path, this doesn't align to the arch values which can be used by Forge and EB.

Getting the arch value from the respective build tool config files was considered, but both tools allow setting these values as CLI args (and Forge doesn't have a config option for arch anyway), so a more robust way of handling it is to generate paths for each supported arch and check each one for existence and executability. This is implemented for all platforms when using Forge and on Darwin when using electron-builder.

Also added: support for Forge custom output directories (since electron/forge#3458 was merged).

Closes #565.

TODO:

  • use Forge allOfficialArchsForPlatformAndVersion
  • support for Forge custom output directories
  • unit tests
  • e2es

@goosewobbler goosewobbler added the status:wip Work in progress label May 16, 2024
@goosewobbler goosewobbler force-pushed the sm/support-darwin-universal-arch branch from e5bd287 to bc3291e Compare May 16, 2024 15:02
@goosewobbler goosewobbler force-pushed the sm/support-darwin-universal-arch branch from dfab096 to 7760cfa Compare May 16, 2024 15:16
@goosewobbler goosewobbler force-pushed the sm/support-darwin-universal-arch branch from 7760cfa to f6c2ad7 Compare May 16, 2024 15:23
@goosewobbler goosewobbler removed the status:wip Work in progress label May 16, 2024
@goosewobbler goosewobbler force-pushed the sm/support-darwin-universal-arch branch 4 times, most recently from fe1ea22 to a8ebb1f Compare May 17, 2024 02:20
Copy link
Contributor

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@goosewobbler goosewobbler force-pushed the sm/support-darwin-universal-arch branch from a8ebb1f to 5aeafda Compare May 17, 2024 11:51
@goosewobbler goosewobbler merged commit 6eab81f into main May 17, 2024
@goosewobbler goosewobbler deleted the sm/support-darwin-universal-arch branch May 17, 2024 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Detect universal mac binary (electron-builder)

2 participants