Guide to Updating Plug-ins
Table Of Contents
|
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. This script calls a script
named Run Plug-in Scripts, which calls sub-scripts that check for the required plug-in on both the client and
server computers, collects version numbers of plug-ins that exist in these locations, compares them, and
downloads an updated plug-in from the server, if needed.
To set up plug-in version checking in your database
1. Open your database using FileMaker Pro and enable the Auto Update plug-in in the Preferences dialog
box.
Note Remind the server administrator to turn on Auto Update in FileMaker Server via the Client
Connections Assistant, FileMaker
Server Properties dialog box (Windows), or Configure > Clients
(Mac
OS).
2. Create a layout to contain:
1 fields defined with the global storage option to collect plug-in version information or result codes
1 a button to manually run the script that creates a plug-in version information file for storage on the
server
For an example layout that contains all the fields and the button you need, see the STARTUP layout in
the AutoUpdatePlugin.fp7 sample file.
3. Write a script that uses the FMSAUC_Version function, which returns the name and version of the Auto
Update plug-in available in FileMaker Pro. If the name and version string is not returned, FileMaker Pro
assumes the Auto Update plug-in is missing or isn’t enabled on the client computer.
4. Write a script that uses the YourPlugIn_Version function to check the version of the plug-in on the client
computer and place version information in the global field named Local_Version in your Auto Update
layout.
For script syntax, see the Local Plug-in Check script in the AutoUpdatePlugin.fp7 sample file.
Information about the
YourPlugIn_Version function should be included in the third-party plug-in
documentation.
5. Write a script that uses the FMSAUC_FindPlugIn function to check the version of the plug-in on the
server computer and place version information in the global field named Remote_Version in your Auto
Update layout.
For script syntax, see the Remote Plug-in Check script in the AutoUpdatePlugin.fp7 sample file. For
information about the FMSAUC_FindPlugIn function, see
“FMSAUC_ FindPlugIn” on page 11.
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.