electron / universal

Create Universal macOS applications from two x64 and arm64 Electron applications
MIT License
112 stars 43 forks source link

How to use this library? #33

Closed nvdai2401 closed 2 years ago

nvdai2401 commented 2 years ago

Thank you for an awesome library!

I want to build a universal application. By reading this article, I know @electron/universal can do this for me. But I cannot find any instructions on how to use this library with electron-builder. Could you please give me an example of how to use @electron/universal with electron-builder?

Nantris commented 2 years ago

Did you resolve this and not share the solution? :(

nvdai2401 commented 2 years ago

@Slapbox You can easily add universal to the build config of your app like this:

    "mac": {
     ...
      "target": [
        "zip",
        {
          "target": "dmg",
          "arch": [
            "x64",
            "universal"
          ]
        }
      ],
      ..
    },
javierguzman commented 1 year ago

Does anyone have an example with electron forge? I have the above snippet but it does not work. I only get the message "[STARTED] Packaging for x64 on darwin" but it it does not make a universal build. My build command is "electron-forge make --platform darwin"

Thank you in advance and regards