Custom multiple plugin installer for Rhino for Mac

Does anybody have a suggestion on how to write a custom installer for rhino for Mac? I have multiple plugins a want to install with one installation. For windows I used wix with the example files provided by @menno. Anything similar around for MacOs? Has anybody done that yet and can provide me with some example?

@dan is this something you can help with?

Unfortunately, macrhi does not support multiple plugins at once.

There are two common ways that programs get installed on macOS:

  • via a disk image (dmg)
  • via a package (pkg)

As you know, Rhino for Mac uses a disk image (for various reasons). Disk images would not work for plugins however, you would likely want to use a package. Unfortunately, I don’t have much experience with packages, and there is some indication that Apple is phasing out support for packages as well.

That said, this looks like a decent up-to-date-ish primer on packages:

I believe packages will have to be Notarized by Apple.

Hi @dan,
thanks for the link.
I tried it and could not get it to work. But since it seemt to me like a little bit of overerkill for what i was trying to do i found a different solution. Maybe you can give me some feedback on it.
It seems to me that all that is needed, is to copy the .rhp files to the MacPlugIns Folder… so i just wrote a one line bash script to copy the files and than used a little program named “Platypus” to make it a .app package (will all the .rhp files inside).

i wonder what the .macrhi realy does, and how much work it would be to let it copy more than one .rhp file. But i guess there is more going on in the background. Is ther some documentation on .macrhi ?

Hi @seppeldue-

Sorry, I wish I had more experience with pkg installers. There may be other plugin developers in this forum who might be able to help, should you desire to.

It seems to me that all that is needed, is to copy the .rhp files to the MacPlugIns Folder

That is the desired end result, yes, from a technical perspective.

so i just wrote a one line bash script to copy the files and than used a little program named “Platypus”

I believe this should work. Apple will required that this app be Notarized if you want to avoid the Gatekeeper (System Integrity Protection) messages regarding it being potential malware, but that requirement would be in place anyway, so the point is moot.

Maybe you can give me some feedback on it.

Sure. There are some potential downsides - however minor you deem them - that may shed light on the - potentially minor - advantages of .macrhi:

  • the path might change to the plugin folder. Your installer would need to be updated; whereas with a macrhi, we would handle that at install time.
  • there is no association between your installer and Rhino (pkg and dmg have the same disadvantage); whereas with macrhi, that extension is associated with our app so it handles launching and executing.

but those are the only two I can think of off the top of my head. Executing an arbitrary shell script is “less-than-kosher” from a security perspective, but I fully understand that sometimes this is necessary (we’ve done it ourselves to work around certain “limitations” of macOS).

Is ther some documentation on .macrhi ?

No. In fact, I had to look at source to remind myself what it’s really doing and it’s not terribly elaborate. It’s decompressing it, making sure it’s a properly formatted rhp/dll package and moving it to the right location (along with the above advantages).

.macrhi is far from perfect. Someday, we would like to have a cross-platform rhi installer, but we’ve put far more effort into a package manager (which is they way you might want to go in the future anyway.).

fwiw I got so frustrated with .pkg on one project that I wrote a regular .app that had payloads put in its resources dir, and built/executed applescript to do the installs. The applescript asked finder to do the actual job, which put any question of security (say a bug that would try to format the drive or something) back on macos.