FileMaker Server 8 ® Guide to Updating Plug-ins
© 2001-2005 FileMaker, Inc. All Rights Reserved. FileMaker, Inc. 5201 Patrick Henry Drive Santa Clara, California 95054 FileMaker is a trademark of FileMaker, Inc., registered in the U.S. and other countries, and ScriptMaker and the file folder logo are trademarks of FileMaker, Inc. All persons and companies listed in the examples are purely fictitious and any resemblance to existing persons and companies is purely coincidental. FileMaker documentation is copyrighted.
Updating plug-ins This guide describes how to use the Auto Update feature in FileMaker® Server. Auto Update ensures that FileMaker Pro database clients have the most current plug-in software installed on their computers. You can download plug-ins from FileMaker Server by including Auto Update functions in user defined scripts saved with FileMaker Pro database files. The following describes the Auto Update feature, an example script, and the Auto Update functions.
FileMaker Server Guide to Updating Plug-ins For automatic update to work properly, you must: 1 1 1 Install and enable the Auto Update plug-in on each FileMaker Pro client. Set up your database to call the external functions provided by the Auto Update plug-in. These functions verify the existence and version of required plug-ins on both the client and server computers and download plug-ins, if needed.
| How automatic downloading works 5 When the required plug-in is missing from the client computer The client starts FileMaker Pro and attempts to open your database hosted by FileMaker Server. Scripts, which you have defined in your database, run the external functions for Auto Update in the following order: 1. The external function FMSAUC_Version runs, returning the name and version of the Auto Update plugin available on the FileMaker Pro client computer.
FileMaker Server Guide to Updating Plug-ins The following illustration shows how you can use the external functions provided by the Auto Update plugin with a few standard FileMaker Pro functions to check first the client computer and then the server computer (if necessary) for a plug-in required by your database. A client uses FileMaker Pro to open a hosted database containing scripts, fields, and calculations that check client and host plug-in status.
| Where to store plug-ins on FileMaker Server 7 Where to store plug-ins on FileMaker Server You must store plug-ins in the following folders on each platform: The plug-in parent folder must have the same name as the plug-in AutoUpdate folder The subfolder containing the plug-in must have the same name as the plug-in version number Plug-in parent folder Subfolder containing the plug-in file Plug-in Overview of the plug-in folder structure Windows To store plug-in files on a Windows server, create a fo
FileMaker Server Guide to Updating Plug-ins Mac OS To store plug-in files on a Mac OS server, create a folder in the AutoUpdate folder named after the plug-in, and a subfolder for each version of the plug-in. Store the plug-in file in the version subfolder. Examples: /Library/FileMaker Server/Data/Databases/AutoUpdate/FMS_Sample_PlugIn /1.0/ /Library/FileMaker Server/Data/Databases/AutoUpdate/FMS_Sample_PlugIn /1.0/FMS_Sample_PlugIn.
| Setting up Auto Update in your database 9 Overview To set up plug-in version checking in your database, you need to write a few simple script steps that run when a client opens your database. The first directs FileMaker Pro to a start-up layout, which contains global fields that store version information about your database’s plug-in requirements.
FileMaker Server Guide to Updating Plug-ins 7. Write a script to download the plug-in from the server computer, if the version on the client computer doesn’t exist or is outdated. For script syntax, see the Download Plug-In script in the AutoUpdatePlugin.fp7 sample file. For information about the FMSAUC_UpdatePlugIn function, see “FMSAUC_UpdatePlugIn” on page 11. 8.
| External functions 11 FMSAUC_ FindPlugIn Format FMSAUC_FindPlugIn("plug-in-name") Parameters plug-in-name – the name of the plug-in file. The parameter must be enclosed in quotes. Data type returned Text Description This function returns a string listing the plug-in versions located in the FileMaker Server AutoUpdate folder or the default database folder. If the plugin can’t be found, the function returns –1 (negative 1). FileMaker Server looks for the plug-in in two places.
FileMaker Server Guide to Updating Plug-ins Error code Description –1 The file to be downloaded is missing from the temporary folder –2 The Extensions\Saved folder to contain the backup of the outdated plug-in or support file couldn’t be created on the client computer –3 The file to be replaced on the client computer couldn’t be deleted from the Extensions folder –4 The file to be replaced couldn’t be moved to the Extensions\Saved folder –5 The downloaded file can’t be copied to the Extensio