Recent

Author Topic: Laz AutoUpdate component - beta  (Read 49869 times)

mdbs99

  • Full Member
  • ***
  • Posts: 143
    • Github
Re: Laz AutoUpdate component - beta
« Reply #120 on: May 22, 2017, 06:03:45 pm »
Ok, looks great!

Thank you.

lainz

  • Hero Member
  • *****
  • Posts: 3809
  • Leandro Diaz
Re: Laz AutoUpdate component - beta
« Reply #121 on: January 25, 2020, 04:23:22 pm »
Hi, I know this is an old thread, but is linked in the wiki as the official source for discussion, so I will write here.

Questions:

(I'm using FPC 3.3.1 and Lazarus 2.1.0 - trunk - from a week ago)

1) This is cross platform? Testing the latest version of LazAutoUpdate on Linux was not working for me. Also If I remember correctly didn't work as well on macOS, but I don't have a working installation of Lazarus and FPC on mac right now to test.

2) This is still being updated? I look a bit at the sources and it contains an old copy of fphttpclient grabbed originally from Online Package Manager. Looking at OPM sources seems that these are not needed anymore (I can't find the copy in the latest sources).
https://lainz.github.io/
Download LazPaint https://lazpaint.github.io/
Download BGRABitmap and BGRAControls https://github.com/bgrabitmap

minesadorada

  • Hero Member
  • *****
  • Posts: 605
  • Retired
Re: Laz AutoUpdate component - beta
« Reply #122 on: January 26, 2020, 09:39:02 am »
Hi, I know this is an old thread, but is linked in the wiki as the official source for discussion, so I will write here.

Questions:

(I'm using FPC 3.3.1 and Lazarus 2.1.0 - trunk - from a week ago)

1) This is cross platform? Testing the latest version of LazAutoUpdate on Linux was not working for me. Also If I remember correctly didn't work as well on macOS, but I don't have a working installation of Lazarus and FPC on mac right now to test.
It was originally tested on Linux (Mint I think) but never on MacOS.  I rarely boot into Linux, so maybe something changed.  I remember the update was "silent" under Linux (i.e. no command dialog)

2) This is still being updated? I look a bit at the sources and it contains an old copy of fphttpclient grabbed originally from Online Package Manager. Looking at OPM sources seems that these are not needed anymore (I can't find the copy in the latest sources).
I haven't updated the code for a while (don't do much coding these days).  I considered replacing the fphttpclient, but "if it ain't broke, don't fix it"  The downloading facility still works fine on my Windows 10 x64 system.

You are more than welcome to review, refactor and generally improve the code - for instance a download progress dialog would be great.  I think it is quite a useful component to have, and I'm not aware of alternatives.
« Last Edit: January 26, 2020, 09:45:57 am by minesadorada »
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

lainz

  • Hero Member
  • *****
  • Posts: 3809
  • Leandro Diaz
Re: Laz AutoUpdate component - beta
« Reply #123 on: January 26, 2020, 11:14:23 am »
Indeed is a good component. And working fine on Windows, just on Linux was not working (Linux 32 bit).

Thanks, If I can somehow improve it I will for sure share it as you did.
https://lainz.github.io/
Download LazPaint https://lazpaint.github.io/
Download BGRABitmap and BGRAControls https://github.com/bgrabitmap

minesadorada

  • Hero Member
  • *****
  • Posts: 605
  • Retired
Re: Laz AutoUpdate component - beta
« Reply #124 on: January 26, 2020, 04:17:05 pm »
In case you haven't already - det the DebugMode to TRUE and populate the Debug Mode event - it may help you debug the problems in Linux (at least it will tell you what the component is doing)

Code: Pascal  [Select][+][-]
  1. {in Form.Create}LazAutoUpdate1.DebugMode:=TRUE;
  2. {OI Event}procedure Tmainform.LazAutoUpdate1DebugEvent(Sender: TObject; lauMethodName,
  3.   lauMessage: string);
  4. begin
  5.   ShowMessageFmt('Method: %s Message %s',[lauMethodName,lauMessage]);
  6. end;      
« Last Edit: January 26, 2020, 04:18:44 pm by minesadorada »
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

lainz

  • Hero Member
  • *****
  • Posts: 3809
  • Leandro Diaz
Re: Laz AutoUpdate component - beta
« Reply #125 on: January 26, 2020, 04:40:38 pm »
What I finally did was create a code mixing your component and some functions.

Checking the ini file with my code, not saving to file but to memory and reading the version/GUI string. Comparing in the same function. Downloading to file and extracting with your code.

Then I just called DoUpdate or a method called like that from your component, and it works, the problem is that the binary file is not being replaced, I mean the file thats calling the updatehm.

I was reading a bit and seems that the file must be deleted in order to get replaced, at least it didnt work in ubuntu 16, thats one of the latest supporting 32 bit...

Maybe I grab code from your component and make something that fits the app Im updating, but again your code works fine under Windows, and seems that on linux too the replace method, but it saves an empty ini file, dont know why, even using the latest fpcupdeluxe not the shipped one.

Is strange, for that I created the check version and download separated from the component, and let the component update the app.

If I can fix the replace of the binary file is working fully, at least in this hybrid mode...
https://lainz.github.io/
Download LazPaint https://lazpaint.github.io/
Download BGRABitmap and BGRAControls https://github.com/bgrabitmap

minesadorada

  • Hero Member
  • *****
  • Posts: 605
  • Retired
Re: Laz AutoUpdate component - beta
« Reply #126 on: January 26, 2020, 06:33:21 pm »
I will test in Linux Mint in the next couple of days.  Watch this space.
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

lainz

  • Hero Member
  • *****
  • Posts: 3809
  • Leandro Diaz
Re: Laz AutoUpdate component - beta
« Reply #127 on: January 26, 2020, 10:01:32 pm »
I will test in Linux Mint in the next couple of days.  Watch this space.

Thankyou.

For your information if it helps: I'm using the mode auOther, in an http website (not secure) with FPC trunk and Lazarus trunk, on Linux 32 bit.

Maybe the code works for you and not for me in that distro, recently we had problems in some distros and in some other distros don't... So that can be too.
« Last Edit: January 26, 2020, 10:03:56 pm by lainz »
https://lainz.github.io/
Download LazPaint https://lazpaint.github.io/
Download BGRABitmap and BGRAControls https://github.com/bgrabitmap

 

TinyPortal © 2005-2018