Recent

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

minesadorada

  • Sr. Member
  • ****
  • Posts: 453
  • Retired
Re: Laz AutoUpdate component - beta
« Reply #75 on: January 16, 2017, 12:36:19 pm »
GitHub branches working.
ToDo: Tags
ToDo: UAC

V0.2.4.0 in OPM
« Last Edit: January 16, 2017, 01:10:48 pm by minesadorada »
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

minesadorada

  • Sr. Member
  • ****
  • Posts: 453
  • Retired
Re: Laz AutoUpdate component - beta
« Reply #76 on: January 16, 2017, 01:23:47 pm »
Well, I enabled Windows 10 UAC and did a lazautoupdate.
As expected, it asked me if I wanted to run the update console app via an annoying modal dialog, and when I said 'OK' it ran it but minimized, just as Lainz posted earlier.

It did update OK though, and it didn't look weird.

re GitHub tags: I need to figure out what they are and how to make them before proceeding.  I'm not sure tag functionality is useful when designing an app with updates.  Wouldn't any new versions of apps go into a branch?
« Last Edit: January 16, 2017, 01:26:19 pm by minesadorada »
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

Rayvenhaus

  • Jr. Member
  • **
  • Posts: 70
Re: Laz AutoUpdate component - beta
« Reply #77 on: January 16, 2017, 01:43:12 pm »
Little bit of a hiccup with OPM and LazUpdate.

When I launched OPM it said there were no updates to LazUpdate package. Clicking on the Update link (JSON) caused it to reload and it showed an update for 0.2.4.0. I updated and rebuilt Lazarus. Now OPM shows that I have 0.2.4.0 installed, repository is 0.2.1.0 and Update is 0.2.4.0 and it's telling me that there is a new update to 0.2.4.0 available.

See attached image

minesadorada

  • Sr. Member
  • ****
  • Posts: 453
  • Retired
Re: Laz AutoUpdate component - beta
« Reply #78 on: January 16, 2017, 01:56:13 pm »
All is good.  If I publish an update, but don't increase the version number OPM recognises that.
If you click 'Update' the 'New' notification will go away. Current version is 0.2.4.0.

Have you tested LazautoUpdate yet?
It's still under development, but will do it's basic job of updating apps from Sourceforge or GitHub OK AFAIK.

=edit= I've turned the notification off.  Only new version numbers will trigger OPM's 'New'
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

Rayvenhaus

  • Jr. Member
  • **
  • Posts: 70
Re: Laz AutoUpdate component - beta
« Reply #79 on: January 16, 2017, 01:59:07 pm »
I did update Laz AutoUpdate from OPM and that was the image after the update. The "NEW' notification stays there. Not a big issue.

As far as testing it in the real world, I will do so with my next release of my application.

minesadorada

  • Sr. Member
  • ****
  • Posts: 453
  • Retired
Re: Laz AutoUpdate component - beta
« Reply #80 on: January 16, 2017, 02:14:41 pm »
Good news - with some trepidation I booted into 64-bit Linux, and ran the TestApp which updates from a GitHub release.  I haven't done this since the rewrite.

All good!  The console app doesn't show, which is OK - the update goes quickly and smoothly.

Logfile from TestApp:
[2017-01-16 13:11:22.224 Info] Start of Log
 [2017-01-16 13:11:22.264 Info] Debug Message: (ShowWhatsNewIfAvailable) Unable to locate whatsnew.txt
 [2017-01-16 13:11:30.777 Info] Debug Message: (NewVersionAvailable) URL is https://raw.github.com/lazarusccr/TestApp/TestBranch/updates/testapplinux64.ini
 [2017-01-16 13:11:30.777 Info] Debug Message: (NewVersionAvailable) Target Path /mnt/sde1/lazarusccr/components/lazautoupdate/latest_stable/testapp/compiled/linux64/newtestapplinux64.ini
 [2017-01-16 13:11:30.778 Info] Debug Message: (NewVersionAvailable) Deleted old file /mnt/sde1/lazarusccr/components/lazautoupdate/latest_stable/testapp/compiled/linux64/newtestapplinux64.ini
 [2017-01-16 13:11:30.779 Info] Debug Message: (NewVersionAvailable) ThreadDownloadHTTP return Code was 0
 [2017-01-16 13:11:30.793 Info] Debug Message: (NewVersionAvailable) ThreadDownloadHTTP Last Error was OK
 [2017-01-16 13:11:32.527 Info] Debug Message: (NewVersionAvailable) After Threadfinished: Return Code was 200
 [2017-01-16 13:11:32.528 Info] Debug Message: (NewVersionAvailable) Downloaded /mnt/sde1/lazarusccr/components/lazautoupdate/latest_stable/testapp/compiled/linux64/newtestapplinux64.ini OK
 [2017-01-16 13:11:32.531 Info] Debug Message: (IsSourceForgeVersionNewer) fGUIOnlineVersion=1.1.1.1, fApplicationVersionString=0.0.1.0, szTempXMLPath=/mnt/sde1/lazarusccr/components/lazautoupdate/latest_stable/testapp/compiled/linux64/newtestapplinux64.ini
 [2017-01-16 13:11:32.531 Info] Debug Message: (NewVersionAvailable) Downloaded /mnt/sde1/lazarusccr/components/lazautoupdate/latest_stable/testapp/compiled/linux64/newtestapplinux64.ini: 25 bytes
 [2017-01-16 13:11:32.531 Info] New version available. Online Version is 1.1.1.1
 [2017-01-16 13:11:35.753 Info] Debug Message: (AutoUpdate) Calling NewVersionAvailable
 [2017-01-16 13:11:35.754 Info] Debug Message: (NewVersionAvailable) URL is https://raw.github.com/lazarusccr/TestApp/TestBranch/updates/testapplinux64.ini
 [2017-01-16 13:11:35.754 Info] Debug Message: (NewVersionAvailable) Target Path /mnt/sde1/lazarusccr/components/lazautoupdate/latest_stable/testapp/compiled/linux64/newtestapplinux64.ini
 [2017-01-16 13:11:35.755 Info] Debug Message: (NewVersionAvailable) Deleted old file /mnt/sde1/lazarusccr/components/lazautoupdate/latest_stable/testapp/compiled/linux64/newtestapplinux64.ini
 [2017-01-16 13:11:35.755 Info] Debug Message: (NewVersionAvailable) ThreadDownloadHTTP return Code was 0
 [2017-01-16 13:11:35.756 Info] Debug Message: (NewVersionAvailable) ThreadDownloadHTTP Last Error was OK
 [2017-01-16 13:11:36.927 Info] Debug Message: (NewVersionAvailable) After Threadfinished: Return Code was 200
 [2017-01-16 13:11:36.928 Info] Debug Message: (NewVersionAvailable) Downloaded /mnt/sde1/lazarusccr/components/lazautoupdate/latest_stable/testapp/compiled/linux64/newtestapplinux64.ini OK
 [2017-01-16 13:11:36.931 Info] Debug Message: (IsSourceForgeVersionNewer) fGUIOnlineVersion=1.1.1.1, fApplicationVersionString=0.0.1.0, szTempXMLPath=/mnt/sde1/lazarusccr/components/lazautoupdate/latest_stable/testapp/compiled/linux64/newtestapplinux64.ini
 [2017-01-16 13:11:36.931 Info] Debug Message: (NewVersionAvailable) Downloaded /mnt/sde1/lazarusccr/components/lazautoupdate/latest_stable/testapp/compiled/linux64/newtestapplinux64.ini: 25 bytes
 [2017-01-16 13:11:36.931 Info] New version available. Online Version is 1.1.1.1
 [2017-01-16 13:11:36.931 Info] Debug Message: (AutoUpdate) NewVersionAvailable succeeded
 [2017-01-16 13:11:39.369 Info] Debug Message: (AutoUpdate) Calling DownloadNewVersion
 [2017-01-16 13:11:39.369 Info] Debug Message: (DownloadNewVersion) Download parameters: TargetPath=testapplinux64.zip
URL=https://raw.github.com/lazarusccr/TestApp/TestBranch/updates/testapplinux64.zip
UpdatesFolder=/mnt/sde1/lazarusccr/components/lazautoupdate/latest_stable/testapp/compiled/linux64/updates
 [2017-01-16 13:11:39.372 Info] Debug Message: (DownloadNewVersion) New directory /mnt/sde1/lazarusccr/components/lazautoupdate/latest_stable/testapp/compiled/linux64/updates was created
 [2017-01-16 13:11:39.372 Info] Debug Message: (DownloadNewVersion) szURL=https://raw.github.com/lazarusccr/TestApp/TestBranch/updates/testapplinux64.zip, szTargetPath=/mnt/sde1/lazarusccr/components/lazautoupdate/latest_stable/testapp/compiled/linux64/updates/testapplinux64.zip
 [2017-01-16 13:11:44.455 Info] Debug Message: (DownloadNewVersion) Downloaded testapplinux64.zip: 1051184 bytes
 [2017-01-16 13:11:44.455 Info] Debug Message: (DownloadNewVersion) Downloaded new version 1.1.1.1 sucessfully.
 [2017-01-16 13:11:44.455 Info] Downloaded. StatusCode=200 BytesDownloaded=1051184
 [2017-01-16 13:11:44.455 Info] Debug Message: (AutoUpdate) DownloadNewVersion suceeded
 [2017-01-16 13:11:46.833 Info] Debug Message: (AutoUpdate) Calling UpdateToNewVersion
 [2017-01-16 13:11:46.833 Info] Debug Message: (UpdateToNewVersion) Entering UpdateToNewVersion
 [2017-01-16 13:11:46.856 Info] Debug Message: (UpdateToNewVersion) Executing /mnt/sde1/lazarusccr/components/lazautoupdate/latest_stable/testapp/compiled/linux64/updatehmlinux64
 [2017-01-16 13:11:46.857 Info] Debug Message: (UpdateToNewVersion) Waiting for /mnt/sde1/lazarusccr/components/lazautoupdate/latest_stable/testapp/compiled/linux64/whatsnew.txt
 [2017-01-16 13:11:46.872 Info] Debug Message: (UpdateToNewVersion) Success
 [2017-01-16 13:11:46.872 Info] End of Log
« Last Edit: January 16, 2017, 02:17:31 pm by minesadorada »
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

lainz

  • Hero Member
  • *****
  • Posts: 4742
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: Laz AutoUpdate component - beta
« Reply #81 on: January 16, 2017, 04:53:10 pm »
Quote
re GitHub tags: I need to figure out what they are and how to make them before proceeding.  I'm not sure tag functionality is useful when designing an app with updates.  Wouldn't any new versions of apps go into a branch?

Is usefull, because you use the correct downloads place.

Think about it's a folder. Then you can set up a tag 'updates' like for the master branch, but instead of the master branch it's a tag. So you put the ini and zip under that tag (as release), and each update you delete the old files and upload the new files.

minesadorada

  • Sr. Member
  • ****
  • Posts: 453
  • Retired
Re: Laz AutoUpdate component - beta
« Reply #82 on: January 16, 2017, 05:02:56 pm »
I couldn't see any way to make a tag in the GitHub web interface (you can make a release).  How is it done?
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

lainz

  • Hero Member
  • *****
  • Posts: 4742
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: Laz AutoUpdate component - beta
« Reply #83 on: January 16, 2017, 05:09:46 pm »
I couldn't see any way to make a tag in the GitHub web interface (you can make a release).  How is it done?

Yes is a bit hidden, it was happening to me the first time that I couldn't find that
https://github.com/lazarusccr/TestApp/releases

I've created the 'updates' release. You can click on the edit button and add some files, the ini and the zip.
« Last Edit: January 16, 2017, 09:26:59 pm by lainz »

minesadorada

  • Sr. Member
  • ****
  • Posts: 453
  • Retired
Re: Laz AutoUpdate component - beta
« Reply #84 on: January 17, 2017, 10:32:49 am »
V0.2.5.0 in OPM

* After looking at the windows 10 'permissions' issue, I've come to the conclusion that even if I put 'hacky' code in to enable a non-admin user to update an app 'in-place' it would be a bad idea.  It would make LazAutoUpdate apps into potential malware.
* If a non-admin Windows user runs LazAutoUpdate.AutoUpdate, everything runs smoothly until the actual update is ready, then a dialog shows asking the user to switch to an admin account in order to do the update, and it exits there.
* If in Windows admin mode, and UAC is switched up to maximum, the UAC warning appears, and an admin account can okay it and the update runs.

I believe this is correct behaviour for an updater running under Windows 10.
« Last Edit: January 17, 2017, 11:20:55 am by minesadorada »
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

Thaddy

  • Hero Member
  • *****
  • Posts: 19177
  • Glad to be alive.
Re: Laz AutoUpdate component - beta
« Reply #85 on: January 17, 2017, 10:40:44 am »
Does a properly formatted manifest resource help? Or is that already used? (Didn't look)
If Administrator is needed,afaik as the rights are defined as AsAdmin the dialog won't pop-up.
If the user already has update/install rights, AsInvoker also won't pop-up any dialog.
« Last Edit: January 17, 2017, 10:43:05 am by Thaddy »
objects are fine constructs. You can even initialize them with constructors.

minesadorada

  • Sr. Member
  • ****
  • Posts: 453
  • Retired
Re: Laz AutoUpdate component - beta
« Reply #86 on: January 17, 2017, 10:58:12 am »
Hi Thaddy,
As I understand it, a manifest would apply to an app, not a component.  It's up to the app writer how it does its security.  As the App is the 'invoker' of LazAutoUpdate, I would assume the rights promulgate.

But for reasons explained, I'd rather an update component like LazAutoUpdate didn't try to circumvent Windows 10 security (such that it is).  I actually agree with windows that only admin users should have the security access to overwrite app files in-place from an internet source.

For Linux users and windows admins, it's not an issue.

==edit I've added a non-published boolean public property 'WindowsAdminCheck' (default=true) for devs to override my opinion :) ==
« Last Edit: January 17, 2017, 11:21:42 am by minesadorada »
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

Thaddy

  • Hero Member
  • *****
  • Posts: 19177
  • Glad to be alive.
Re: Laz AutoUpdate component - beta
« Reply #87 on: January 17, 2017, 11:44:22 am »
Hi Thaddy,
As I understand it, a manifest would apply to an app, not a component.  It's up to the app writer how it does its security.  As the App is the 'invoker' of LazAutoUpdate, I would assume the rights promulgate.

But for reasons explained, I'd rather an update component like LazAutoUpdate didn't try to circumvent Windows 10 security (such that it is).  I actually agree with windows that only admin users should have the security access to overwrite app files in-place from an internet source.

For Linux users and windows admins, it's not an issue.

==edit I've added a non-published boolean public property 'WindowsAdminCheck' (default=true) for devs to override my opinion :) ==
Then check the manifest for Lazarus...
objects are fine constructs. You can even initialize them with constructors.

balazsszekely

  • Guest
Re: Laz AutoUpdate component - beta
« Reply #88 on: January 17, 2017, 11:56:49 am »
Quote
@Thaddy
Then check the manifest for Lazarus..
What Lazarus? The update is performed by a user who has no knowledge about Lazarus or package AutoUpdate.

@minesadorada
In my opinion this is the correct behaviour.

minesadorada

  • Sr. Member
  • ****
  • Posts: 453
  • Retired
Re: Laz AutoUpdate component - beta
« Reply #89 on: January 17, 2017, 12:57:54 pm »
I couldn't see any way to make a tag in the GitHub web interface (you can make a release).  How is it done?

Yes is a bit hidden, it was happening to me the first time that I couldn't find that
https://github.com/lazarusccr/TestApp/releases

I've created the 'updates' release. You can click on the edit button and add some files, the ini and the zip.
Update V0.2.6.0:

LazAutoUpdate property GitHubBranchOrTag (default=master)
This will take a Branch name or a Tag name
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

 

TinyPortal © 2005-2018