Updating plugin in merged client server app

Hi,

I’m using a merged client/server build for the first time and I’m having issues when I need to deploy an update to one of our plugins (Windows, 4D v17 R6).

The only way that I’ve found that will get it to update to the clients is to,

  1. Delete the .4darchive file from the roaming app data for the server, forcing it to generate a new cache of the plugin
  2. Delete the cached plugin from the local app data for the client, forcing it to retrieve the plugin from the server

I’d have thought that 4D Server would detect that the local plugin has changed and update the cache automatically on startup. Likewise for the client. The normal 4D Server / 4D Remote way of doing client/server seems to allow the plugin to update to clients automatically.

Anyone suggestions would be greatly appreciated.

Regards,
Adam

You should use the buildApplication keys https://doc.4d.com/4Dv17/4D/17/CurrentVers.300-3787891.en.htmlCurrentVers> and the 2 others keys RangeVersMin and RangeVersMax.

When you want to make client update you should build with a new version number which is out from this Range to force 4D to update automatically the client (it is true for the client or for all you need to change plugins, files, resources, etc…)

Hi Manuel,

Thank you for the info. I hadn’t tried the CurrentVers key because I thought that was only really relevant when changing versions of 4D and that files stored in the user’s local app data would refresh automatically if the server cache files were newer.

After some more testing I found that my problem isn’t actually on the client side at all. The client will update the plugin without having to increment the CurrentVers key, as long as the server cache files are newer.

So my problem is actually that the server isn’t updating it’s cache of the plugin on startup. Incrementing the CurrentVers on the server didn’t seem to have any effect.

The test that I’m doing is basically as follows:

  1. Quit 4D Server
  2. Add a file to MyPlugin.bundle\Contents\Windows64\
  3. Start 4D Server

The file %APPDATA%\MyApp\MyApp\4D\Plugins\MyPlugin.4darchive should have updated but it hasn’t. If I delete that file before starting 4D Server, it gets recreated and everything is good.

The process above works in our development environment without having to delete the .4darchive file. I haven’t tested a compiled non-merged 4D Server.

Thanks for your help.

Regards,
Adam