One of the long standing developer gripes with FileMaker Pro and plugins is that they’ve been hard to update or install. In versions 11 and prior, there is a process to update plugins from FileMaker Server, but no process when not using a hosted file. Even with FMS it’s not a simple process and often causes as many issues as it solves.

For non-hosted solutions, often the best way to install a plugin was to run a full installer, which needed to quit FileMaker Pro and re-open your solution after the fact.

A new feature in FileMaker 12

Now, version 12 offers a completely new way to install and update plugins which solves a lot of the previous issues and hopefully allows plugins like our free FileMaker plugin to gain more widespread adoption. You can now query plugin version and install state from within FileMaker, and load plugins directly from container fields.

This is a huge step forward, and this is something we’ll be introducing into all of our plugin using solutions.

A working example

Since we’ve previously published a few articles on plugin updates, I thought I’d update our example file for the new FileMaker Pro 12 functionality.

A sample file is included and can be downloaded below, it uses a few Custom Functions, so will also require FMPA to take advantage of, but could easily be adapted to avoid them if required.

To adapt this to other plugins, you only need to change the three variables at the top. Also you could easily extend this process to multiple plugins by calling the script with each new value, and getting the variables from the parameters instead of setting them directly.

Also if you don’t have, or use a support URL like I’ve set in this example, you might like to adjust the “Show Custom Dialog” script steps to remove that option.

A bonus feature for Server Side scripts

One great bonus feature for server side processing is that you can even update a plugin on the server, from within your server side script. There is a checkbox for this in the Server Admin Tool ( shown below ). So you can write a script once, and call your “Plugin Update” functionality from anywhere and know that it works in Pro or on the Server.

ServerSidePlugins.png

Updating plugins remotely

Because we can also download files from the server using plugins ( and some file types using the new Insert From URL script step), we could, in theory also download updated plugins from a web server, which then can be loaded automatically in FMP. In theory this would give us a completely automated update process.

But there’s always a glitch : you would need to either zip or tar the Mac plugin files in order to download them from the web, however, the Install Plug-In script step doesn’t allow you to install it compressed. The plugin documentation states :

Compressed plug-in files in .zip format or plug-in files in .tar format can’t be installed.

Which is a pain, as .zip or .tar files were the only workable option for the previous update from server functionality in FMP 11 and earlier. Allowing installs from container fields, but not allowing them to be zipped or tar’d seems like two steps forward, one step back. Certainly worth a feature request.

A slightly more complex process can certainly be achieved though, as we can save the files to disk and ask the OS to uncompress them. We may look at doing a sample file for exactly this at some point in the future.