Cross platform plugin installers

Hey now, pay attention to this a little bit: .dmg-based installers are archaic and should be avoided as they are not future-proof (Apple eschews them) and - also - .dmg-based installers require user interaction (to do the drag and drop), whereas .pkg-based installers are preferred because they allow for automated/scripted installs and - most importantly - uninstalls - as well as the ability to add a “post-install” script that can be run to do things such as validate licenses, download additional content, etc…

There has been quite some discussion about this in the JUCE context already, here:

Keep in mind that the fact of .dmg files requiring user interaction means that you can end up with non-intelligent users copying your plugin products all over their filesystems, whereas .pkg-based installers put things in the right place, pretty much 100% of the time …

The best of both worlds: have your custom brand-forward downloader/front-end/portal application (written in JUCE of course) download the .pkg files that the user has selected, then have that app run the PackageInstaller process on the .pkg file, and also give the user the ability to run the PackageUninstaller process on the same .pkg fiiles, lest they decided to uninstall things. Keep the ability to download (but not run) the .pkg files available for those institutions who want to automate the installation of your plugins on a large number of machines. And, just don’t use .dmg.

1 Like

Having trouble finding information about this, could you post a link?

That’s some really valuable insight, @ibisum.

I’m going to look into the JUCE C++ approach, especially regarding the UI part.

A JS-based application would allow me to use production-ready UI and animation libraries without much hassle.

This is in contrast to building everything from scratch to achieve an amazing UI, like @RolandMR did.

I’m not yet aware of any UI modules for JUCE.

Thanks!

I meant a custom app could use dmg/pkg so it’s not because you do a custom installer app that it do not make sense to do actual pkg

Oh ok I got it, make sense now. Thank you for the clarification @otristan

The trick with such a thing is to make it a good experience you want to silently execute the installers … it is a PAIN IN THE ARSE.

it requires system privileges to be granted and apples documentation is a complete shit show.

And you want to be nice and careful on both platforms you aren’t just building a security hole someone could use to execute other software with admin privileges.

Good luck :wink:

Here’s a starting point … it’s marked as deprecated I know!

1 Like

Thanks @jimc
TBH, I didn’t realize this part would be this challenging.
Starting with a deprecated method… guess I’m lucky! :sweat_smile:

1 Like

How do these install managers work in general? Do they just copy paste files? do they silently run the exe/pkg installers? I’ve never looked into this and am very curious about the actual process.

From my understanding of this amazing discussion, the Installer app will download and silently run .pkg files for installation and uninstallation.

@asimilon

$ man pkgutuil

Its more for sysadmins, which is the point of preferring .pkg over .dmg - it allows system administrators to install (remotely) or uninstall packages without user interaction - or sophisticated users can use pkgutil to maintain a clean system as well, or use “Absolute Software InstallEase” as they see fit.

The basic process is:

pkgutil --pkgs | grep yourpackage.bundle.id

Then … for example for our PolarDesigner plugin:

pkgutil --info audio.austrian.software.plugins.polardesigner

And then:

pkgutil --files audio.austrian.software.plugins.polardesigner

… to get a list of all files associated with the .pkg, which can then be deleted, followed by a:

pkgutil --forget audio.austrian.software.plugins.polardesigner

For the non-sysadmins, there is “UninstallPKG”:

The point is, .pkg files support a bit more sophisticated administrative activities than just .dmg drag and drop installs, which can get very messy …

1 Like