Shoutout: DMGCanvas
-
Hi everybody,
I'm currently in the process of rebuilding the HISE installer build process and I found a very neat option for macOS: DMGCanvas
https://www.araelium.com/dmgcanvas
Not sure if you're aware of that, but it allows you to create DMG images that you can use to ship your installer. The nice thing is that this comes very close to the native macOS installation procedure and handles all the code signing and notarization stuff for you with an UX that cannot be simpler (so the days of weirding around in the terminal are gone). It's not a free app, but it's the best 25 bucks you will spend in a while.
I'm using it in combination with an installer that I made with the multipage creator (and added a bunch of functions there to make this a match made in heaven). The installer itself does not contain any files (this is a bit annoying on macOS because embedding binaries in another binary will untick the exectutable permission when you extract it, along with other annoyances). So here's how I ended up doing this:
- Create the installer in the multipage creator, but don't embed any assets in there.
- Use the
RelativePathLoader
action that is set to the DMG root and theCopySiblingFile
action that copies the files to wherever you want them to end up. - Add all files that you want to copy into the DMG Canvas project, but set everything to invisible, except for the installer that you build with the multipage creator. The DMG will then show up only the single icon of the installer and behind the scenes, it just copies the hidden files.
This lets you combine the flexibility of the multipage creator installer with the convenience of the DMG image I think that this might be the best solution for building installers on macOS so far.
On Windows I'm using the same installer project, but it needs to embed the binaries into the installer because there is no concept like DMG on Windows.
-
@Christoph-Hart What's the difference between DMG and PKG?
-
@d-healey A DMG file is more like a USB Stick where you need to drag over the app to your applications folder. It is very easy and simple but AFAIK it only supports installing to the /Applications folder and not a custom directory like /Library/Audio/Plug-Ins/...
a .pkg is a pack of files with instructions where every file should be placed on the system with additional steps.
The nicer UX is the DMG installer but it only works for standalone apps.
-
@d-healey pkg is a self contained installer that you can build with Whitebox Packages (or some other tool, but here we're all using Packages)
.dmg is a virtual disk image that can be mounted and is an alternative way to ship installers. You could also wrap a .pkg into a .dmg. The important thing is that .dmg images can also be notarized, so you don't need to use .pkg anymore.
This was the last missing piece to get a nice installation UX on macOS for me.
-
AFAIK it only supports installing to the /Applications folder and not a custom directory like /Library/Audio/Plug-Ins/...
Yes this is the case if you only use DMG, but you can combine it with the multipage creator installer to implement any functionality you need:
- copy plugin to the plugin folder
- copy additional files to the AppData
- extract HLAC archives
- write the LinkOSX file
- download sample content
- run the activation procedure of the ScriptUnlocker
-
-
@Matt_SF said in Shoutout: DMGCanvas:
@oskarsh @d-healey not quite. The DMG format is named 'disk image'. See it like a virtual external drive, but it's basically a good-looking container. It can contain anything, applications that can be dragged into the App folder indeed, but any kind of files including PKG installers.
..so @Christoph-Hart can you explain to me why I wouldn't just zip up my pkg, someone somewhere needs to be notartized and code-signed - how is this thing helping with that process (given I can attach my cert to Packages and it does that bit automatically for me...)???
-
@Lindon why would you ever zip the pkg?
-
@Lindon I've found a few shortcomings of the Package solution:
- you cannot write to the user and global domain at the same time
- you cannot create a link file unless you use a script that works in 80% of all cases
- you still need to manually notarize the pkg using the command line. You can attach a certificate, but this won't notarize it
The DMG image will manage all the signing stuff that Apple throws at you and for the installation UX you are now completely free to do whatever you like with the multipage creator.
If the Packages solution works for you, then keep using it - there's no need to change a running system, but I found myself always coming back to hacking around for every project I did, so this is why I'm trying to create a solution for installers that are particularly tailored for HISE projects and DMG Canvas plays a big role here on the macOS side for this.
-
@Christoph-Hart said in Shoutout: DMGCanvas:
@Lindon I've found a few shortcomings of the Package solution:
- you cannot write to the user and global domain at the same time
- you cannot create a link file unless you use a script that works in 80% of all cases
- you still need to manually notarize the pkg using the command line. You can attach a certificate, but this won't notarize it
The DMG image will manage all the signing stuff that Apple throws at you and for the installation UX you are now completely free to do whatever you like with the multipage creator.
If the Packages solution works for you, then keep using it - there's no need to change a running system, but I found myself always coming back to hacking around for every project I did, so this is why I'm trying to create a solution for installers that are particularly tailored for HISE projects and DMG Canvas plays a big role here on the macOS side for this.
Ok yep I get it.. I guess I'm in a slightly different space. My plugin does most of the heavy lifting (downloading samples and meta data, unpacking all this to the correct locations, setting up the Link file etc.) , so all I want from an installer is the ability to put the plugin in the System folder - the user then runs the plugin and it takes over all the set up process. But yes I need to notarize the pkg from the command line.
-
So here is the DMG that I've build for HISE.
Everything is built with a bash script but the final DMG is created from within DMGCanvas (this could also be automated, but it's a one-click operation and I would have to hack around to avoid my credentials in the public repo).
Note: This is not the official HISE 4.0.0 Release
It'll take a few more days for more cleanup etc, but you can run the installer and see how this works. It should be fully notarized and also downloads and extracts the HISE source code as optional step, but any feedback here is welcome.
Oh and have I mentioned that this is not the official HISE 4.0.0 release?
-
@Christoph-Hart said in Shoutout: DMGCanvas:
It'll take a few more days for more cleanup etc, but you can run the installer and see how this works. It should be fully notarized and also downloads and extracts the HISE source code as optional step, but any feedback here is welcome.
The EULA pops twice, once at DMG open and then again in the installer.
What about uninstalling? I'm still not clear as to what the average Mac user thinks about uninstalling and what the base approach would be to uninstalling VSTs. For me it's fine to consider it to just be "delete the VST3 file from the PlugIns folder and the Samples folder from wherever you put it"
-
@aaronventure Yes I was overambitious with the EULA, I just wanted to check if the feature works with the DMG, but I'll probably remove it at one or the other location.
macOS users don't care about uninstalling - there is no uninstalling concept on macOS at all so I wouldn't bother with it.
-
@Christoph-Hart What is the multipage creator? (If there's a post or docs I've missed, pls just point me.) Cheers.
-
@clevername27 It's the new thing I'm working on for the last few months - it's basically a separate app that allows you to create multipage form dialogs and can be used to build installers (when it's ready) that are customary tailored to the use case of HISE.
I'm also using it to create dialogs in HISE going forward - the snippet browser is made with it and the Broadcaster Wizard too.
It's not ready for public use yet, which is why it's flying under your radar...
-
@Christoph-Hart You had me at "wizards".
-
@Christoph-Hart waiting on the Multipage Creator