Native on M1 and M2?

We build our plugins as “universal builds”. But recently when a customer installed our plugin, macOs asked him to install Rosetta. The customer was on an M2. But I assume that should not matter? If I build something for M1, it should be native on M2, too?
Wonder why it would ask for Rosetta. Hmmm… maybe our installer is using Rosetta. We are using Packages version 1.2.10.

1 Like

From the Packages documentation:

hostArchitectures: Defines the architectures supported by the distribution.

If your solution works natively on both Intel and Apple Silicon architectures and you want to remove the Rosetta alert during the installation, set this value to ‘i386 arm64’. If you are using Packages 1.2.10 or later, in most cases, you don’t have to set this value. It will be computed automatically during the build process.

Perhaps, you defined a value for hostArchitectures?

Thanks, interesting.
I’ll have to check that :slight_smile:

Are you building with CMake or the Projucer?

I am building from the Projucer.
Would that make a difference?

No

I had some interactions with people trying to be rosetta free…

TL;DR

If you’re without packages, so just make sure you xml file contains the hostArchitectures with arm64…

Eg:

<options ... hostArchitectures="x86_64,arm64"></options>

How can you test if you already installed Rosetta? (with an Apple silicon mac…)

  • ensure no Installer is open
  • open your Installer pkg
  • under Activity Monitor, look for Installer
  • it should show under the Architecture Kind column Apple and not Intel.

Thanks everyone for the help!
@ttg I activated the hostArchitectures, through the Packages UI. Now it has “arm64” listed as host architecture. For some reason its setting “i386” for Intel though, instead of “x86_64”, which you had. But still installs fine on Intel Macs.

I’ll send the customer a new version of the packages installer. I’ll report back what he says.

Just wanted to report back that adding “arm64” to hostArchitectures has solved it for our customer. Our installer no longer asks him to install Rosetta.
Thanks for the help everyone!

FYI, I believe the below definition of hostArchitectures applies here (as it relates to x86/x64).

hostArchitectures Optional. A comma-separated list of supported architecture codes. Valid codes are i386 , x86_64 , and ppc . Note that i386 matches both 32-bit and 64-bit systems, but x86_64 matches only 64-bit systems.

Another follow-up, I’ve update my original message.
Apperantly, Installer.app is sensitive to spaces.
So you must use comma-separated but avoid spaces (or it’ll parse only the first arch)