Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 4607 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hey there ScriptMaster community. I am posting this here for the benefit of anyone who may come across this issue. I may be the first, but it may also be a known issue.

With FMP12 now installing plugins using the Install Plug-In File [] script step it's much easier to push ScriptMaster built plugins from solutions.

However, there is an issue with how FileMaker deals with version numbers of plugins - at least in my early testing - I think.

For my Theme Studio product I use ScriptMaster to build a plugin named ThemeStudio.fmplugin/fmx

Using Get ( InstalledFMPlugins ) FileMaker returns a list of all plugins, their versions and status. For example.

ThemeStudio;4.133;Enabled




Where 4.133 is the version of ScriptMaster, not your internal version returned by ScriptMaster.



Therefore, my version 2.0 plugin of ThemeStudio (built with SM 4.133) is returned by a call to the internal version function of TSVersion.



When I build a new plugin (still with SM 4.133) and update to 2.1 this cannot be seen by FileMaker.



As far as I can tell, when you push a new plugin using the script step, FileMaker is performing some type of logic where if the version number is the same  - such as following...



ThemeStudio;4.133;Enabled (internal 2.0)

ThemeStudio;4.133;Ignored (internal 2.1)



FileMaker will set the status of the plugin to Ignored and this will force the user to have to re-enable it and restart FileMaker (as was the case prior to FMP 12).



It would be nice if we didn't have to restart FileMaker when updating an SM plugin, but I'm guessing it's this matching version of ScriptMaster that is causing the change in status from Enabled to Ignored.



Of course, I could be wrong because I've not tested with another plugin (such as a Troi or 24U plugin) going from an older version to newer.



If this is the case, then Jesse and crew will hopefully be able set the version of the built plugin to the same as the internal version call.



Otherwise, for right now you have to test for the Ignored status when your solution requires the plugin and you've just pushed out an update.



For those of you using custom ScriptMaster plugins, here's a custom function which will return the details of whether a plugin exists and what its details are.







/**

* =====================================================

* PluginExists ( name )

*

* PURPOSE:

* Return a return delimited list of the values returned by

* Get ( InstalledFMPlugins ) for one specific plugin name.

*

* RETURNS:

* (string) Return delimted list of name, version & status

* or False if the plugin does not exist

*

* EXAMPLES:

* PluginExists ( "SomePlugin" ) = "SomePlugin¶1.12¶Enabled"

* PluginExists ( "MissingPlugin" ) = False

*

* DEPENDENCIES:

* none

*

* NOTES:

* This is convenience function for extracting the values from

* the internal Get ( InstalledFMPlugins ) function

*

* HISTORY:

* RELEASED 2012-06-19 by [email protected]

* =====================================================

*

*/



Let ( [

  ~pluginList = Get ( InstalledFMPlugins );

  ~pluginExists = PatternCount ( ~pluginList ; name & ";" );

  ~pluginStringStart = Position ( ~pluginList ; name ; 1 ; 1 );

  ~pluginStringEnd = Position ( ~pluginList ; ¶ ; ~pluginStringStart ; 1 );

  ~pluginString = Middle ( ~pluginList ; ~pluginStringStart ; ~pluginStringEnd - ~pluginStringStart );

  ~pluginParts = Substitute ( ~pluginString ; ";" ; ¶ )

];

  If ( ~pluginExists ; ~pluginParts ; False )

)

https://github.com/p...uginExists.fmfn

Matt

  • Like 1
Posted

Follow up. I'm now getting a successful install even with the same version of ScriptMaster having been used. It may be something in my code. I'm trying to dig into what the conditions are when the Ignored status is set to a plugin.

I'm pretty sure it would happen if both FMP11 and FMP12 were opened and you tried an update. Obviously, FMP11 would have open file pointers to the plugin. That may have been my situation - stupid developer error.

Regardless of what I find out. You can use the code above and something like.


If [ GetValue ( PluginExists ( "ThemeStudio" ) ; 3 ) = "Ignored" ]

# Take some action here - like show a dialog "You need to re-enable and restart FileMaker"

EndIf

This topic is 4607 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.