[Lazarus] Updating an app "on the fly"

Mark Morgan Lloyd markMLl.lazarus at telemetry.co.uk
Wed Jun 16 09:57:27 CEST 2010


Alexsander Rosa wrote:
> My ERP has an auto-update feature in the main application (called 
> "rnge2.exe"). The app does the following steps:
> 
> 1) Check if there's a newer version. The new releases are replicated to 
> each customer's branch.
> 2) If there's a newer version, download, md5sum-check and rename to 
> "rnge2.new"
> 3) Execute an external application to swap the files; the app renames 
> "rnge2.exe" to "rnge2.old", then renames "rnge2.new" to "rnge2.exe" and 
> runs the new version.
> 
> Usually the old version's file is locked, so the external application 
> has to wait for a while until it's released. In my case the app tries a 
> couple times for it.

I was assuming that something like that would be needed for the dll/so, 
but the particular point I'm interested in is whether the main app /has/ 
to be restarted, or if there are hacks that can get around that.

I'm particularly thinking about Michael's earlier comment:

 > > There were several discussions, that when doing a DLL or .so with
 > > Lazarus and using same with a Lazarus project, it's an issue that
 > > the DLL will create it's own LCL "application" instance and thus
 > > you can't easily do "normal" GUI stuff in the DLL/.so.

which suggests that there are limits as to what can go into a dll/so.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]




More information about the Lazarus mailing list