Recent

Author Topic: Check for updates and update  (Read 3304 times)

Hobbit1972

  • New Member
  • *
  • Posts: 25
Check for updates and update
« on: June 08, 2023, 03:08:50 pm »
Hi,

I'd like to implement a check fpr updates and update the program - would there be a viable way to do so?

Thx

dseligo

  • Hero Member
  • *****
  • Posts: 1220
Re: Check for updates and update
« Reply #1 on: June 08, 2023, 04:32:22 pm »
For Lazarus there is LazAutoUpdater (https://wiki.freepascal.org/LazAutoUpdater). I don't know if it can work in a pure FPC program.

Thaddy

  • Hero Member
  • *****
  • Posts: 14367
  • Sensorship about opinions does not belong here.
Re: Check for updates and update
« Reply #2 on: June 08, 2023, 04:43:16 pm »
It will probably work, but it has no proper roll-back features:
1. stopping the update while running does not always work (from the zip phase onwards)
2. there is no way to recover from a successfull update, but a non-running updated application
3. frankly there is no roll-back at all

Therefor I can not recommend it in the state I last examined it.
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: Check for updates and update
« Reply #3 on: June 08, 2023, 10:27:12 pm »
Hi,

I'd like to implement a check fpr updates and update the program - would there be a viable way to do so?

Thx

Do as Notepad++. It downloads an installer and runs it, then closes the main process, then you can upgrade with a full installer.

The installer is made with Inno Setup.

Hobbit1972

  • New Member
  • *
  • Posts: 25
Re: Check for updates and update
« Reply #4 on: June 09, 2023, 06:52:33 am »
Thank you for your thoughts!

For Lazarus there is LazAutoUpdater (https://wiki.freepascal.org/LazAutoUpdater). I don't know if it can work in a pure FPC program.

As I'm writing a GUI-program, that would be okay. I'll have a closer look.


It will probably work, but it has no proper roll-back features:
1. stopping the update while running does not always work (from the zip phase onwards)
2. there is no way to recover from a successfull update, but a non-running updated application
3. frankly there is no roll-back at all

Therefor I can not recommend it in the state I last examined it.

I'll ponder this point, too.


Do as Notepad++. It downloads an installer and runs it, then closes the main process, then you can upgrade with a full installer.

The installer is made with Inno Setup.

This sounds interesting - I'll give it a try.

In every case I have to switch from ini-file in program directory to either registry usage or ini-file in appdata  :-X

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2054
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Check for updates and update
« Reply #5 on: June 09, 2023, 07:43:19 am »
In every case I have to switch from ini-file in program directory to either registry usage or ini-file in appdata  :-X
I do not understand why you need that to update your software, I personal never used any pre-made component/code that does do this, I download from internet a small xml file, in that file is the current version written, compare it to installed version, either update or not (depending on my own needs I either create backups for roll-backs first or straight replace files).
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

 

TinyPortal © 2005-2018