Recent

Author Topic: LazAutoUpdate or custom updater?  (Read 1257 times)

Heinz

  • New member
  • *
  • Posts: 9
LazAutoUpdate or custom updater?
« on: October 19, 2021, 02:43:34 pm »
Is LazAutoUpdate a valid plugin to make our application to update or it is better to create custom updater?
Consider that my application is only a little executable, so it is not necessary the installation. Also, the updated exe is reachable in a private network (inside a shared folder).

devEric69

  • Hero Member
  • *****
  • Posts: 644
Re: LazAutoUpdate or custom updater?
« Reply #1 on: October 19, 2021, 04:27:47 pm »
AMHO, it's really well done, and it works very well (multi-threaded downloading feature). That said, it's oriented and thought to install or update\upgrade under MS-Windows. Nevertheless, it can easily be modified in order to support a Linux installation or updating\upgrading (i.e. respecting the Debian's philosophy).
use: Linux 64 bits (Ubuntu 20.04 LTS).
Lazarus version: 2.0.4 (svn revision: 62502M) compiled with fpc 3.0.4 - fpDebug \ Dwarf3.

Heinz

  • New member
  • *
  • Posts: 9
Re: LazAutoUpdate or custom updater?
« Reply #2 on: October 19, 2021, 05:23:12 pm »
Could you please explain a practical tutorial on how to use it with the source of the updated file inside a shared folder?

devEric69

  • Hero Member
  • *****
  • Posts: 644
Re: LazAutoUpdate or custom updater?
« Reply #3 on: October 19, 2021, 05:48:04 pm »
Everything is explained here: https://wiki.freepascal.org/LazAutoUpdater  :) .

Overall, it's a simple network downloader, working like that:
- it will check a "GUI=w.x.y.z" variable (the number of the last software released in a directory on the network) published in a networked *.ini file.
- if the "quatro-string" GUI variable is more recent than the current version of the running client soft, then the client can download a WhatsNew.txt file (i.e. a changelog) from the server of the new release. It will then display it.
- if the user accepts the new version, the running client\main application (say, main.exe) runs another tiny application named updatehm.exe located in the same directory as main.exe, and closes itself.
- updatehm.exe downloads the new zipped software version.
- in updatehm.exe, we can set what to do after having downloaded *.zip package: typically, we unzip it, and replace the old main.exe, the old online help, ...
- then updatehm.exe restarts the new main.exe, and closes itself.
« Last Edit: October 19, 2021, 05:50:52 pm by devEric69 »
use: Linux 64 bits (Ubuntu 20.04 LTS).
Lazarus version: 2.0.4 (svn revision: 62502M) compiled with fpc 3.0.4 - fpDebug \ Dwarf3.

Heinz

  • New member
  • *
  • Posts: 9
Re: LazAutoUpdate or custom updater?
« Reply #4 on: October 19, 2021, 06:13:05 pm »
As source url it accepts //192.168.0.42/main.exe?

devEric69

  • Hero Member
  • *****
  • Posts: 644
Re: LazAutoUpdate or custom updater?
« Reply #5 on: October 19, 2021, 06:18:22 pm »
I don't know: I haven't tried it with an @IP \ LAN. I'm only using it with a real URL \ DNS \ WAN. Sorry.
« Last Edit: October 19, 2021, 06:22:04 pm by devEric69 »
use: Linux 64 bits (Ubuntu 20.04 LTS).
Lazarus version: 2.0.4 (svn revision: 62502M) compiled with fpc 3.0.4 - fpDebug \ Dwarf3.

 

TinyPortal © 2005-2018