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

feat:(mac): Apple Silicon builds (arm64) #5426

Merged
merged 5 commits into from
Dec 14, 2020

Conversation

mmaietta
Copy link
Collaborator

@mmaietta mmaietta commented Nov 18, 2020

Apple Silicon support: Initial dev work for achieving arm64 builds for Mac. This PR enables packaging both arm64 and x64 on mac. Supports building native app dependencies for both archs as well. dmg assets will follow current electron-builder logic/nomenclature, with only x64 builds not having an arch suffix.

Opening PR for tracking issues:
#5095
#5392
#5397
#5402

Quick Notes:
Unrelated, PR also fixes build error with unused semver import

Copying here from #5392 for posterity's sake. I'm unable test on MacOS Big Sur as I'm blocked from installing it on my company laptop. I'd appreciate it if others could try it locally

For local development, I used yalc so I could test changes with the electron-quick-start app
Env setup from scratch (line by line for an easy copy-paste)

yarn global add yalc

git clone -b Feature/AppleSiliconARM64 https://github.com/mmaietta/electron-builder.git

( cd electron-builder && yarn && yarn compile && \
(cd ./packages/app-builder-lib && yalc push) && \
(cd ./packages/builder-util && yalc push) && \
(cd ./packages/builder-util-runtime && yalc push) && \
(cd ./packages/dmg-builder && yalc push) && \
(cd ./packages/electron-builder && yalc push) && \
(cd ./packages/electron-publish && yalc push) && \
(cd ./packages/electron-builder-squirrel-windows && yalc push) && \
(cd ./packages/electron-forge-maker-appimage && yalc push) && \
(cd ./packages/electron-forge-maker-nsis && yalc push) && \
(cd ./packages/electron-forge-maker-nsis-web && yalc push) && \
(cd ./packages/electron-forge-maker-snap && yalc push) && \
(cd ./packages/electron-updater && yalc push) )

git clone https://github.com/electron/electron-quick-start.git

cd electron-quick-start

npm install && npm install -D electron-builder

yalc link app-builder-lib builder-util builder-util-runtime dmg-builder electron-builder electron-publish electron-builder-squirrel-windows electron-forge-maker-appimage electron-forge-maker-nsis electron-forge-maker-nsis-web electron-forge-maker-snap electron-updater

yarn electron-builder --arm64 --x64

And now the magical brute-force one-liner for whenever you make changes! Rebuilds electron-builder, patches the npm module in electron-quick-start, and begins packaging.

cd electron-builder

yarn compile && \
(cd ./packages/app-builder-lib && yalc push) && \
(cd ./packages/builder-util && yalc push) && \
(cd ./packages/builder-util-runtime && yalc push) && \
(cd ./packages/dmg-builder && yalc push) && \
(cd ./packages/electron-builder && yalc push) && \
(cd ./packages/electron-publish && yalc push) && \
(cd ./packages/electron-builder-squirrel-windows && yalc push) && \
(cd ./packages/electron-forge-maker-appimage && yalc push) && \
(cd ./packages/electron-forge-maker-nsis && yalc push) && \
(cd ./packages/electron-forge-maker-nsis-web && yalc push) && \
(cd ./packages/electron-forge-maker-snap && yalc push) && \
(cd ./packages/electron-updater && yalc push) \
&& ( cd ../electron-quick-start && rm -rf dist && yarn electron-builder --arm64 --x64 )

If wanting to use a package.json, this is the config:

"devDependencies": {
    "electron": "^11.0.0",
    "electron-builder": "^22.9.1"
  },
  "build": {
    "mac": {
      "target": {
        "target": "dmg",
        "arch": [
          "arm64",
          "x64"
        ]
      }
    }
  }

If using native addons, it's likely they haven't supplied compiled assets yet for darwin-arm64, so you'll need to rebuild from source. That also works with this PR, just add "buildDependenciesFromSource": true and presto, arm64 native addon.

Example output (with spacing for better legibility) if using sqlite3 and electron-quick-start app with the env described above:

$ electron-builder  • electron-builder  version=22.8.1 os=19.6.0  • loaded configuration  file=package.json ("build" field)
  • writing effective config  file=dist/builder-effective-config.yaml

  • rebuilding native dependencies  dependencies=sqlite3@5.0.0 platform=darwin arch=arm64
  • rebuilding native dependency  name=sqlite3 version=5.0.0
  • packaging       platform=darwin arch=arm64 electron=11.0.0 appOutDir=dist/mac-arm64
  • default Electron icon is used  reason=application icon is not set
  • skipped macOS code signing  reason=identity explicitly is set to null
  • building        target=DMG arch=arm64 file=dist/electron-quick-start-1.0.0-arm64.dmg

  • rebuilding native dependencies  dependencies=sqlite3@5.0.0 platform=darwin arch=x64
  • rebuilding native dependency  name=sqlite3 version=5.0.0

  • building block map  blockMapFile=dist/electron-quick-start-1.0.0-arm64.dmg.blockmap

  • packaging       platform=darwin arch=x64 electron=11.0.0 appOutDir=dist/mac
  • skipped macOS code signing  reason=identity explicitly is set to null
  • building        target=DMG arch=x64 file=dist/electron-quick-start-1.0.0.dmg

  • building block map  blockMapFile=dist/electron-quick-start-1.0.0.dmg.blockmap
✨  Done in 157.86s.

… hardcoded values and making sure user-options are utilized for platform/dmg packagers. Updated tests to target electron 11. Updated mac snapshots to include multi-arch images
@lutzroeder
Copy link
Contributor

@mmaietta Do you have any thoughts on next steps to support building a single universal binary?

@quanglam2807
Copy link
Contributor

@mmaietta Do you have any thoughts on next steps to support building a single universal binary?

That actually depends on electron, not just electron-builder

Source: https://www.electronjs.org/blog/apple-silicon

In the future, we will release a package that allows you to "merge" your arm64 and x64 apps into a single universal binary, but it's worth noting that this binary would be huge and probably isn't ideal for shipping to users.

@lutzroeder
Copy link
Contributor

@mmaietta Do you have any thoughts on next steps to support building a single universal binary?
That actually depends on electron, not just electron-builder

@quanglam2807 see electron/electron#26710. The package already exists.

@quanglam2807
Copy link
Contributor

@mmaietta @develar Is it possible to get this PR merged and cut a pre-release so we can all test it ?

@mmaietta mmaietta marked this pull request as ready for review December 2, 2020 05:33
@mmaietta
Copy link
Collaborator Author

mmaietta commented Dec 2, 2020

@mmaietta @develar Is it possible to get this PR merged and cut a pre-release so we can all test it ?

Yes, the build and tests were passing previously, but master branch is currently broken. I'm hesitant to merge into something broken (currently working on this PR #5449 to fix master, almost done). If you'd like to merge now, then we can do so.

@mmaietta mmaietta changed the title Apple Silicon builds (arm64) feat:(mac): Apple Silicon builds (arm64) Dec 2, 2020
@elliottkember
Copy link
Contributor

elliottkember commented Dec 6, 2020

Just in case someone else hits this, one thing I've found is that I get an error if I run electron-builder with native arm64 python:

  ⨯ Exit code: 1. Command failed: /usr/bin/python /Users/elliott/appname/.yalc/dmg-builder/vendor/dmgbuild/core.py
Traceback (most recent call last):
  File "/Users/elliott/appname/.yalc/dmg-builder/vendor/dmgbuild/core.py", line 25, in <module>
    from mac_alias import *
  File "/Users/elliott/appname/.yalc/dmg-builder/vendor/mac_alias/__init__.py", line 1, in <module>
    from .alias import *
  File "/Users/elliott/appname/.yalc/dmg-builder/vendor/mac_alias/alias.py", line 16, in <module>
    from . import osx
  File "/Users/elliott/appname/.yalc/dmg-builder/vendor/mac_alias/osx.py", line 424, in <module>
    _statfs = libc['statfs$INODE64']
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 384, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(0x100ed1690, statfs$INODE64): symbol not found

I think the reason for this is that the python running these python commands is arm64 and doesn't like statfs$INODE64 - I'll add an issue to the mac_alias repo.

From reading this link - I think this has something to do with the $INODE64 suffix. Perhaps it isn't needed on ARM python.

Anyway, running the command with arch -x86_64 worked and built for both x86 and arm64.

@elliottkember
Copy link
Contributor

elliottkember commented Dec 7, 2020

I think there's a bug with the findFile function, which will need to determine which architecture to download.

The current findFile seems to use the first matching-suffix file it finds. So both arm64 and x86 will download whichever is listed first in the files array.

Because x86 isn't included in the .zip filename, we have:

  • MyApp-2.0.89-arm64-mac.zip
  • MyApp-2.0.89-mac.zip

They're both .zip and whichever one is listed first will be downloaded. We can't rely on getArchSuffix because x86 is "" and they'll both match an empty string. What about something like this?

    diff --git a/packages/electron-updater/src/MacUpdater.ts b/packages/electron-updater/src/MacUpdater.ts
    index 55071d26..ba6f9cbc 100644
    --- a/packages/electron-updater/src/MacUpdater.ts
    +++ b/packages/electron-updater/src/MacUpdater.ts
    @@ -32,6 +32,7 @@ export class MacUpdater extends AppUpdater {
        this.updateInfoForPendingUpdateDownloadedEvent = null
    
        const files = downloadUpdateOptions.updateInfoAndProvider.provider.resolveFiles(downloadUpdateOptions.updateInfoAndProvider.info)
    +      .filter(file => (process.arch == 'arm64') == (file.url.pathname.includes('arm64')));
        const zipFileInfo = findFile(files, "zip", ["pkg", "dmg"])
        if (zipFileInfo == null) {
          throw newError(`ZIP file not provided: ${safeStringifyJson(files)}`, "ERR_UPDATER_ZIP_FILE_NOT_FOUND")

Or do we need a MacUpdateInfo interface?

@@ -16,7 +16,7 @@ test.ifMac.ifAll("two-package", () => assertPack("test-app", {
electronLanguages: ["bn", "en"]
},
//tslint:disable-next-line:no-invalid-template-strings
artifactName: "${name}-${version}-${os}.${ext}",
artifactName: "${name}-${version}-${os}-${arch}.${ext}",
Copy link
Contributor

@elliottkember elliottkember Dec 7, 2020

Choose a reason for hiding this comment

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

From my testing I think this is:

artifactName: "${name}-${version}- ${arch}-${os} .${ext}",

Seems to be generated in https://github.com/electron-userland/electron-builder/blob/master/packages/app-builder-lib/src/targets/ArchiveTarget.ts#L28

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hmm, that is true if an artifactName template is not provided in the build config. I assumed this test was also validating artifactName as opposed to using the defaultPattern you linked in ArchiveTarget.ts.
I updated this test to have the ${arch} template explicitly specified as otherwise, the dmg/zip will overwrite itself when building for multiple targets.

Copy link
Contributor

@elliottkember elliottkember Dec 9, 2020

Choose a reason for hiding this comment

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

Ah, maybe so.

I do think I've been seeing something like this. When I'm exporting and uploading DMGs, the -arm64 DMGs don't get published - it's weird. It doesn't seem to happen every time, but I can't figure out what's causing it to happen.

@mmaietta
Copy link
Collaborator Author

mmaietta commented Dec 8, 2020

I think there's a bug with the findFile function, which will need to determine which architecture to download.

The current findFile seems to use the first matching-suffix file it finds. So both arm64 and x86 will download whichever is listed first in the files array.

Because x86 isn't included in the .zip filename, we have:

  • MyApp-2.0.89-arm64-mac.zip
  • MyApp-2.0.89-mac.zip

They're both .zip and whichever one is listed first will be downloaded. We can't rely on getArchSuffix because x86 is "" and they'll both match an empty string.

Nice callout. I see findFiles is provided Array<ResolvedUpdateFileInfo>, which contains UpdateInfo::url string and PackageFileInfo::path and I belieeve should already have identified the correct file assets, so we may need to process the arch further upstream as you hinted at. I think we could rename WindowsUpdateInfo to MultiArchUpdateInfo and reuse a packages[process.arch] || packages[process.platform == 'darwin' ? 'x64' : 'ia32' approach. It already rewrites result[0] which is what findFiles will utilize.

const packages = (updateInfo as WindowsUpdateInfo).packages
const packageInfo = packages == null ? null : (packages[process.arch] || packages.ia32)
if (packageInfo != null) {
(result[0] as any).packageInfo = {

My worry is if/how we need to migrate between electron-updater schema versions? What are your thoughts?
I'm really not familiar with how electron-updater works as my team doesn't use it.

@elliottkember
Copy link
Contributor

elliottkember commented Dec 8, 2020

That sounds good. Might also be nice to refactor the overwriting results[0] thing to just return a single file.

What about if we patched MacUpdater with the .filter here, then do the MultiArchUpdateInfo refactor in a separate PR? With the electron-updater fix, which I'm currently using from my own fork, it all seems to be working nicely on my end. Proposing this because it'd be great to get it released so people can test without jumping through yalc hoops!

My worry is if/how we need to migrate between electron-updater schema versions? What are your thoughts?

Sorry, I don't really know what you mean by this. I don't use it very much either (I just use and enjoy electron-builder) but I'm sure we could deal with that if/when it comes up. What's the concern?

…64 does not have a bitness prefix to filter by)
@mmaietta
Copy link
Collaborator Author

mmaietta commented Dec 9, 2020

What about if we patched MacUpdater with the .filter here, then do the MultiArchUpdateInfo refactor in a separate PR? With the electron-updater fix, which I'm currently using from my own fork, it all seems to be working nicely on my end. Proposing this because it'd be great to get it released so people can test without jumping through yalc hoops!

Completely agreed. Updated the PR accordingly.

Sorry, I don't really know what you mean by this. I don't use it very much either (I just use and enjoy electron-builder) but I'm sure we could deal with that if/when it comes up. What's the concern?

I have no idea how to handle universal binaries as the build process is outside of electron-builder, so I have no idea how it'll integrate with electron-updater. It should be outside the scope of this PR though since that would require an entirely new npm module integrated
https://github.com/electron/universal

Hopefully we can get a pre-release cut first :)

@quanglam2807
Copy link
Contributor

From my perspective: universal binary simply combines x64 and arm64 .app files into a single one. So technically, when a user runs the app, they still runs the same individual x64 or arm64 binary. Because of this, it wouldn’t break electron-updater as it still relies on arch-specific builds to update.

@elliottkember
Copy link
Contributor

elliottkember commented Dec 9, 2020

I'm having trouble with DMG filenames. I'm running them locally, as well as in a GH Action to publish. Sometimes they come out the same, without the ${arch}, sometimes they don't. It feels like a weird race condition, or maybe I've forgotten a command somewhere.

It seems to happen consistently on GH Actions, where I'm using yalc to link the electron-builder modules from this PR.

Update: I figured it out. I was using samuelmeuli/action-electron-builder and the action was doing something weird. Using electron-builder manually in the action fixed it.

@elliottkember
Copy link
Contributor

My 2c on universal electron binaries is that they'll be HUGE. It might just be easier to have two download buttons, at least for now?

@lutzroeder
Copy link
Contributor

@elliottkember all 3 options should be supported: arm64, x86_64 and universal. The bits might be larger but another consideration is the complexity of choosing the right architecture. For some apps users shouldn't be exposed to this even if it means larger binaries. As discussed already auto-update is another aspect. Not so much now, but in the future when Intel is phased out apps might have to keep the -arm64 suffix to keep update going. Universal makes this more seamless and there should be a choice for app authors to go either way. Obviously large 500 MB apps should think carefully before moving to a 1 GB download, but for smaller apps 50 MB vs. 100 MB might be bearable for a while.

@elliottkember
Copy link
Contributor

elliottkember commented Dec 9, 2020

@lutzroeder That's a good point. I'm working with a 500MB app and it's easy to forget that there are many smaller apps around now. Universal is definitely preferable.

@quanglam2807
Copy link
Contributor

quanglam2807 commented Dec 17, 2020

@quanglam2807 @mmaietta have you successfully built a .dmg using a signed .app with 22.10.3?

Everything is working correctly for dmg :)

@lutzroeder
Copy link
Contributor

@quanglam2807 @mmaietta have you successfully built a .dmg using a signed .app with 22.10.3?
Everything is working correctly for dmg :)

Are you running on Big Sur or Catalina, does Terminal have full disk access? See #5322.

@quanglam2807
Copy link
Contributor

@quanglam2807 @mmaietta have you successfully built a .dmg using a signed .app with 22.10.3?
Everything is working correctly for dmg :)

Are you running on Big Sur or Catalina, does Terminal have full disk access? See #5322.

I build using GitHub Actions, it's probably Catalina.

@quanglam2807
Copy link
Contributor

@mmaietta Found it:

const artifactName = this.expandArtifactNamePattern(masOptions, "pkg")

@castroCrea
Copy link

castroCrea commented Dec 17, 2020

I renew my comment here #5484

Did you check that it will work with electron-updater ?

@larrywalters
Copy link

larrywalters commented Dec 17, 2020

Has anyone confirmed that the ${arch} variable works when building for both x64 and arm64? In the config file, I use something like: "artifactName": "App-${version}-BUILD-${os}-${arch}.${ext}", but nothing gets substituted for the variable. All the other variables work though. This is for building a pkg on Mac.

@lutzroeder
Copy link
Contributor

@mmaietta is there a fix for the Travis CI failure in macPackagerTest:two-package?

@mmaietta
Copy link
Collaborator Author

@lutzroeder unfortunately, I'm not too sure. Oddly, all 3 of my PRs had all tests passing prior to merging.
Running tests locally pass as well for me. AFAICT, it's simply the ordering of assets being built, which seems to be async enough that they're not matching depending on the node building it.

@lutzroeder
Copy link
Contributor

@mmaietta Makes sense. Previously this was x64 only. Maybe the ordering issue was added by adding arm64 support? Is it possible to add sorting to the test code before matching?

@mmaietta
Copy link
Collaborator Author

mmaietta commented Dec 18, 2020

Yeah, that's most likely. Oddly, it seems that it's already trying to:
https://github.com/electron-userland/electron-builder/blob/master/test/src/helpers/packTester.ts#L194

The test that is broken in your PR (macPackagerTest:two-package) though is different than the one that is being reported broken on master branch (macArchiveTest:pkg).
Master branch just needs "LSRequiresNativeExecution": true, added to the pkg test snap; I have no idea how that was never part of the electron 11 upgrade PR while tests still passed 🤷‍♂️

@lutzroeder
Copy link
Contributor

lutzroeder commented Dec 18, 2020

Yeah, that's most likely. Oddly, it seems that it's already trying to:

The sorting happens at the ArtifactCreated level, the mismatch is under fileContent.files?

It is also failing on "blank" PRs like #5488.

@davej
Copy link
Contributor

davej commented Dec 22, 2020

Has anyone confirmed that the ${arch} variable works when building for both x64 and arm64? In the config file, I use something like: "artifactName": "App-${version}-BUILD-${os}-${arch}.${ext}", but nothing gets substituted for the variable. All the other variables work though. This is for building a pkg on Mac.

@larrywalters I'm seeing the same issue, my DMG artifact name is: "${productName} ${version}-${arch}.${ext}" but the output filename is "ProductName 1.0.0.dmg". This seems to be a long-standing issue and pre-dates this PR though.

Would be interesting to know if others are experiencing similar and if this is a known issue.

Not difficult to rename the file after Electron Builder has done its magic but I don't want to do anything if this will be "fixed" later.

@davej
Copy link
Contributor

davej commented Dec 22, 2020

@develar @mmaietta @lutzroeder @quanglam2807 I'm happy to try and PR for the issue above (broken artifact names for DMG) but before I jump in, could you verify that:

  1. It is an issue that you can reproduce.
  2. This is not "by design" and is actually a bug that you want fixed.

1 similar comment
@davej
Copy link
Contributor

davej commented Dec 22, 2020

@develar @mmaietta @lutzroeder @quanglam2807 I'm happy to try and PR for the issue above (broken artifact names for DMG) but before I jump in, could you verify that:

  1. It is an issue that you can reproduce.
  2. This is not "by design" and is actually a bug that you want fixed.

@mmaietta mmaietta deleted the Feature/AppleSiliconARM64 branch December 22, 2020 17:00
@larrywalters
Copy link

@davej Thanks for sharing, that's interesting because when I tried it with DMG it worked fine. In fact, it also seemed to work fine for all the zipped formats I tried, but not for PKG. Therefore, I concluded it was an issue specifically with PKG. In looking at the code, I see that the call to expandArtifactNamePattern when using PKG does not pass the architecture. I think that should be added to fix this. The architecture is passed in most other places where this function is called.
https://github.com/mmaietta/electron-builder/blob/07ff09503457fe10c84da8989e8d5da94aade803/packages/app-builder-lib/src/targets/pkg.ts#L37
So I don't know why it wouldn't be working for DMG.

@davej
Copy link
Contributor

davej commented Dec 22, 2020

@larrywalters Interesting. The zip outputs work fine for me too and I haven't tried pkg.
What does your config look like? Here's the relevant part of my config:

{
  "dmg": {
    "artifactName": "${productName} ${version}-${arch}.${ext}"
  },
  "mac": {
    "artifactName": "${productName} ${version}-${arch}-${os}-update.${ext}",
    // ...
    "target": [
      {
        "target": "zip",
        "arch": [
          "x64",
          "arm64"
        ]
      },
      {
        "target": "dmg",
        "arch": [
          "x64",
          "arm64"
        ]
      }
    ],
  }
}

And my terminal output looks like this:

  • building        target=macOS zip arch=arm64 file=/var/folders/6y/gy9gggt14379c_k39vwb50lc0000gn/T/2001112vht2b9h7/dist/App 1.5.0-arm64-mac-update.zip
  • building        target=DMG arch=arm64 file=/var/folders/6y/gy9gggt14379c_k39vwb50lc0000gn/T/2001112vht2b9h7/dist/App 1.5.0.dmg
  • building block map  blockMapFile=/var/folders/6y/gy9gggt14379c_k39vwb50lc0000gn/T/2001112vht2b9h7/dist/App 1.5.0.dmg.blockmap
  • building embedded block map  file=/var/folders/6y/gy9gggt14379c_k39vwb50lc0000gn/T/2001112vht2b9h7/dist/App 1.5.0-arm64-mac-update.zip

@lutzroeder
Copy link
Contributor

Thank you, @mmaietta. It works. What about artificateName for mas builds (pkg)? The filenames don't have arch.

@mmaietta @quanglam2807 looks like pkg.ts changes are not included?

@quanglam2807
Copy link
Contributor

Thank you, @mmaietta. It works. What about artificateName for mas builds (pkg)? The filenames don't have arch.

@mmaietta @quanglam2807 looks like pkg.ts changes are not included?

mas-related changes are here: #5484. It works fine for me (using it in production).

@larrywalters
Copy link

larrywalters commented Jan 11, 2021

@davej Please pardon the delay. I tried it for example with this configuration. It works for all the formats there except pkg. I have tried other zip formats in the past successfully too.

"artifactName": "Name-${version}-BUILD-${os}-${arch}.${ext}"
...
"mac": {
  "target": [
    {
      "target": "pkg",
      "arch": [
        "x64",
        "arm64"
      ]
    },
    {
      "target": "dmg",
      "arch": [
         "x64",
         "arm64"
      ]
    },
    {
      "target": "tar.gz",
      "arch": [
        "x64",
        "arm64"
      ]
    },
    {
      "target": "7z",
      "arch": [
        "x64",
        "arm64"
      ]
    }
  ]
}

The output was like below; only one pkg file appeared and it wrapped the arm64 version, I think suspect means one architecture overwrote the other.

Name-1.2.3-alpha.0-BUILD-mac.pkg
Name-1.2.3-alpha.0-BUILD-mac.tar.gz
Name-1.2.3-alpha.0-BUILD-mac-arm64.tar.gz
Name-1.2.3-alpha.0-BUILD-mac.dmg
Name-1.2.3-alpha.0-BUILD-mac-arm64.dmg
Name-1.2.3-alpha.0-BUILD-mac.7z
Name-1.2.3-alpha.0-BUILD-mac-arm64.7z

So I think we need that pkg.ts change I mentioned.

undergroundwires added a commit to undergroundwires/privacy.sexy that referenced this pull request May 16, 2024
This commit introduces a universal binary format in the distributed MDG
files for macOS, improving support for both Apple Silicon (ARM) and
Intel (x64) architectures.

It uses `electron-builder` to package both architectures into a single
executable, ensuring the application can natively on any macOS hardware
without depending on the GitHub runners' architecture. It fixes the
issue related to prior releases that supported only the architecture of
the build environment itself, which is subject to change.

Changes:

- Update DMG distribution to include both ARM64 and x64 architectures.
- Enhance system requirements documentation to reflect support for both
  architectures.
- Modify CI/CD workflows to check desktop runtime errors for both ARM64
  and x64 versions on macOS.

Resolves:

- Issue #348: Initial request for Apple Silicon support.
- Issue #362: Correction of distribution limited to ARM64 in release
  0.13.3.

`electron-builder` support:
- electron-userland/electron-builder#5475
- electron-userland/electron-builder#5689
- electron-userland/electron-builder#5426
undergroundwires added a commit to undergroundwires/privacy.sexy that referenced this pull request May 16, 2024
This commit introduces a universal binary format in the distributed MDG
files for macOS, improving support for both Apple Silicon (ARM) and
Intel (x64) architectures.

It uses `electron-builder` to package both architectures into a single
executable, ensuring the application can natively on any macOS hardware
without depending on the GitHub runners' architecture. It fixes the
issue related to prior releases that supported only the architecture of
the build environment itself, which is subject to change.

Changes:

- Update DMG distribution to include both ARM64 and x64 architectures.
- Enhance system requirements documentation to reflect support for both
  architectures.
- Modify CI/CD workflows to check desktop runtime errors for both ARM64
  and x64 versions on macOS.

Resolves:

- Issue #348: Initial request for Apple Silicon support.
- Issue #362: Correction of distribution limited to ARM64 in release
  0.13.3.

`electron-builder` support:
- electron-userland/electron-builder#5475
- electron-userland/electron-builder#5689
- electron-userland/electron-builder#5426
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.

None yet