Recent

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

mdbs99

  • Full Member
  • ***
  • Posts: 121
  • Software Engineer. Husband. Trader.
    • website
Re: Laz AutoUpdate component - beta
« Reply #120 on: May 22, 2017, 06:03:45 pm »
Ok, looks great!

Thank you.

lainz

  • Hero Member
  • *****
  • Posts: 4449
    • https://lainz.github.io/
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).

minesadorada

  • Sr. Member
  • ****
  • Posts: 452
  • 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: 4449
    • https://lainz.github.io/
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.

minesadorada

  • Sr. Member
  • ****
  • Posts: 452
  • 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: 4449
    • https://lainz.github.io/
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...

minesadorada

  • Sr. Member
  • ****
  • Posts: 452
  • 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: 4449
    • https://lainz.github.io/
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 »

devEric69

  • Hero Member
  • *****
  • Posts: 648
Re: Laz AutoUpdate component - beta
« Reply #128 on: September 09, 2021, 12:06:09 pm »
Hello,

I've questions about TLazAutoUpdate (I don't know its history). I'm looking for something to create an automatic update (from an "About form") of the latest version (from a Linux PC, for the moment). In this context, I just looked at TLazAutoUpdate and its demos. It works fine on a Linux machine with the required openSSL dependency (this is verified with the Bash cmd >openssl version -a). However, I have few questions:
- do any of you use it?
- is it still maintained with a GitHub, or something else (I've found https://github.com/lazarusccr/TestApp; nothing like  https://github.com/lazarusccr/LazAutoUpdate)?
- i saw that it uses its own lazautoupdate_httpclient.TfpCustomHTTPClient component (Huh??!) i.e. not the "official" from fcl\fpWeb (fphttpclient.TfpCustomHTTPClient): is this normal? Did some people try to replace this component (lazautoupdate_httpclient.TfpHTTPClient) with the one from fcl\fpWeb? With other words, does anyone know if lazautoupdate_httpclient.TfpCustomHTTPClient is a "future-proof" solution?
- any advice?
« Last Edit: September 09, 2021, 12:43:20 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.

devEric69

  • Hero Member
  • *****
  • Posts: 648
Re: Laz AutoUpdate component - beta
« Reply #129 on: September 09, 2021, 12:39:40 pm »
Okay,

the big difference is well annotated there (in lazautoupdate_httpclient.TfpCustomHTTPClient) compared to fcl-web in fpc 3.0.4...:
Code: Pascal  [Select][+][-]
  1. + {
  2. +   TFPHTTPClient does not implement a timeout/aborting mechanism(2016.10.01), which
  3. +   is useful when downloading a large file for example. opkman_httpclient and opkman_downloader
  4. +   fix this issue.
  5. + }
  6.  
  7.   {$mode objfpc}{$H+}
  8.  
  9. + {$IF FPC_VERSION = 3}
  10. +   {$IF FPC_RELEASE > 0}
  11. +    {$IF FPC_PATCH > 0}
  12. +      {$DEFINE FPC311}
  13. +     {$ENDIF}
  14. +   {$ENDIF}
  15. + {$ENDIF}

...and it looks like that the timeout (for large files downloading) now exists in fphttpclient.TfpCustomHTTPClient too, with a FIOTimeout field management.
So, I would say that fphttpclient.TfpCustomHTTPClient has been updated in order to take this problem into account now. And that therefore, lazautoupdate_httpclient.TfpCustomHTTPClient is deprecated and could safely be replaced by
fphttpclient.TfpCustomHTTPClient. Can anyone confirm?




Edit: For information, I've opened a ticket in order to suggest a patch (AFAIK fphttpclient.TfpCustomHTTPClient fixes the lazautoupdate_httpclient.TfpCustomHTTPClient patch named {$DEFINE FPC311} starting with the release-version fpc 3.0.2 (Cf.  https://sourceforge.net/p/lazautoupdate/tickets/12/ ).
« Last Edit: September 09, 2021, 05:07:22 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.

dalfy

  • New Member
  • *
  • Posts: 10
Re: Laz AutoUpdate component - beta
« Reply #130 on: February 21, 2022, 07:31:55 pm »
Hello.
I compile your "testapp" example - and it doesn't update anything...  Does he work for anyone?
Windows 32 bit, Lazarus 2.2.0, Github

cris75

  • Jr. Member
  • **
  • Posts: 59
Re: Laz AutoUpdate component - beta
« Reply #131 on: June 06, 2022, 04:16:18 pm »
Hi,
I have been trying this component for a few days now but I'm having some troubles using it;  %)
I started a topic a cuople of days ago to ask about this package (before posting here I closed it marking it "solved");
since then I made no steps forward  :'(

my guess is that I misunderstood the way it works, considering the fact that usually all the packages I install from OPM does work properly (but maybe this time it's not the case?), so I have some questions (if anybody knows and want to help me):

from the wiki i read that "..when ProjectType is set to auOther, LazAutoUpdate will use these properties for all the Method.."
does this mean that it can be used in a "third way"? (I mean no SourceForge or GitHub use, but instead a personal hosting/ftp server on the internet)

another question, when I set ProjectType to "auOther" and the properties auOtherSourceFilename and auOtherSourceURL these are lost even if I save the project.. I don't know why.. it's my fault?
Anyway, I tried to set the properties in the code but then I get an exception that says "Cannot create a X509 cert without SSL support", my auOtherSourceURL is in the form "https://aaa.bbb/cc/" I think it's correct this way, right?

Last question, does someone use (currently) this package in some project(s)?
Thank you :)
Lazarus: 3.0 / FPC: 3.2.2
[x86_64-win64-win32/win64]
OS IDE: Win10 64bit

 

TinyPortal © 2005-2018