FileMaker Server 9 ® Guide to Updating Plug-ins
© 2001-2007 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 other trademarks are the property of their respective owners. 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. Install and enable the Auto Update plug-in on each FileMaker Pro client. 2. 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. 3. Remind the server administrator to turn on Auto Update in FileMaker Server.
| Preparing Mac OS plug-ins with resource forks for Auto Update 5 4. The string is searched for the version returned by the YourPlugIn_Version function. If no version information is returned by YourPlugIn_Version, it is probably because the version on the server is greater than the version of the plug-in on the client computer. 5.
FileMaker Server Guide to Updating Plug-ins To manually compress a plug-in containing a resource fork: 1. Use a third-party utility like StuffIt Standard to manually compress the entire Mac OS plug-in into a single file such as a .sitx archive. You can use any utility that compresses files with resource forks, as long as the output file can be automatically decompressed by StuffIt Expander. 2. Rename the compressed file with the .sitx or other extension to end with .tar.
| Where to store plug-ins on FileMaker Server 7 Note When Mac OS plug-ins are stored on a Windows server for use with Mac OS clients, they must be stored in the .tar archive format. For more information about archiving files using this format, launch the Mac OS Terminal application, type man tar at the prompt, and see “Preparing Mac OS plug-ins with resource forks for Auto Update” on page 5.
FileMaker Server Guide to Updating Plug-ins Setting up Auto Update in your database There are several ways to set up Auto Update in your database. This guide describes one way, which uses simple script steps and global fields, and is based on the sample file named AutoUpdatePlugin.fp7 installed with FileMaker Server. This sample file is also available on the FileMaker, Inc. web site.
| External functions 9 6. Write a script that converts version information to number format and places the result in additional global fields in your Auto Update layout. This conversion to number format is required for a comparison of the plug-in version information collected from the client and server computers. For script syntax, see the Get Version Numbers script in the AutoUpdatePlugin.fp7 sample file. For information about the GetAsNumber function, see the FileMaker Pro onscreen Help. 7.
FileMaker Server Guide to Updating Plug-ins 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).
| External functions Error code 11 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 Extensions folder –6 The down