I’m trying to make life easier for Archi users who install official Archi Plug-ins but differences in Operating Systems are making things tricky. A plug-in consists of either a single “jar” file or a directory containing several files which need to be placed in the “plugins” folder of the Archi installation. This could be done manually by the user, but I want to make it possible from inside Archi, and certainly for Mac users it’s a pain to have to right-click on the app, select “Show Package Contents”, and then copy it to the “plugins” folder in the app bundle.
So I’ve added a menu item in the Help menu to “Install Archi Plug-in”. This lets the user select the bundled plug-in zip file from a dialog box and install it one simple operation. The installer checks that it is a valid Archi plug-in and then copies the contents to the target “plugins” folder and asks the user whether they want to re-start the app now or later. Simple.
Except it’s not so simple for the following cases:
- On the Windows version that has been installed with the Inno installer
- On Mac OS X 10.12 and later
For (1), Archi needs to have administrator write access to the “plugins” folder. With Windows 32-bit, this can be circumvented by the VirtualStore mechanism, but this doesn’t work on 64-bit Windows. So, the installer will ask the user to restart Archi with the “Run as administrator” option and try again. This grants the app the rights to copy the plug-in to the installation folder.
For (2) Apple’s implementation of translocation for unsigned apps means that Archi can’t write to the “plugins” folder for a different reason. Archi is an unsigned app so OS X copies it to a read-only area and executes it from there. To stop this happening, the user needs to move the Archi app to a different location from where it was saved when downloaded (for example, move it from the “Applications” folder to “Desktop” or vice-versa.)
This is how it works for now. Maybe there’s a better way. If you downloaded the portable zip version on Windows or Linux you won’t have this problem, provided it’s unzipped to a writeable location.
(This post is one in a series of “boring as f*** but I’ll put it here anyway”)