Archicad + Munki

It's long been a source of frustration for me that CAD software usually doesn't use the OS vendor's provided installers and instead they roll their own. Vect...

It’s long been a source of frustration for me that CAD software usually doesn’t use the OS vendor’s provided installers and instead they roll their own. Vectorworks and Archicad, I’m looking at you. When an application uses an app based installer, it’s often really difficult to import it into your deployment tool of choice, such as Munki. I’ve battled on and off with Archicad for some time - and recently discovered that Robert Percival had written an Autopkg recipe for Archicad 19. I took the postinstall script from it and added it to the Archicad 20 installer after importing it into Munki. The only hitch that I’ve encountered is that it has to be run when someone’s logged in. If it runs at the loginwindow, then it hangs at the end of the installer. If someone (anyone!) is logged in, it seems to install OK and then briefly bounces the Archicad icon in the dock, display a spinner in the middle of the screen for a few seconds and then quit. The script is:

#!/bin/sh JAR=“/tmp/%app_name%/Contents/Resources/Java/archive.jar” darwin_major=`/usr/bin/uname -r | /usr/bin/cut -f 1 -d .` if [ $darwin_major -gt 14 ] then launchctl asuser 0 java -jar “$JAR” -silent -W play.auto=YES exit $? else LWPID=`ps axww | grep loginwindow | grep -v grep | awk ‘{print $1}’` launchctl bsexec $LWPID java -jar “$JAR” -W play.auto=YES -silent exit $? fi

Keep This Useful

Spotted something outdated or unclear?

If a step has changed, a screenshot no longer matches, or something here just does not work the way it should, get in touch and we will take a look.