[App detail]
app name=Program extra info
version=6.0.1.3499
date=2014.08.11
compressed=1
url=http://www.xxx.xom/update/prj/ver/app.zip
size=4852465 --> I used lnet http, I can not get file size, this is for gauages
[files]
count=1 --> maybe dll or other files can be need upgrade
[file1]
url=
version=0.0.0.0
descrip=
compressed=0 --> maybe no need compress, small ini files etc.
filesize=0
I used lnet, for ftp protocol, need username and password. http and port:80 is easy way my idea...Good Idea. I'll try to implement something similar.
if I were you, for "NewVersionAvailable" control, add OnVersionCheck TNotify event. so programer can change version check rule. Examp: Just Update if "0.0.x.0" x is greater NewVersionAvailable := True;
regards
Did LazAutoUpdate work for you?No, 'cos I'm on kubuntu 14.04 x64
I've got your component installed and I love the idea, just want I was looking for. I have one small question concerning its usage. Where does the component read the application versioning info from to compare against the versions.ini file?When dropped into an application, it should read the Version info (set in Project/Options/Version Info)
So, in essence, until you release an update, LazAutoUpdate no longer works because of a change in Sourceforge. Just curious, do you have an idea as to when you might have your update ready?I'm hoping by next week. It's quite a substantial refactor. Ironically I'm currently working in a GUI to configure updating packages.
client.AddHeader('User-Agent','Mozilla/5.0 (compatible; fpweb)');
Has this been fixed yet so that it is usable? I really want to include the ability to look for an update in my project and I don't want to reinvent the wheel.Like a lot of people with families, I expect to be away from the coding keyboard over Christmas/New Year.
Has this been fixed yet so that it is usable? I really want to include the ability to look for an update in my project and I don't want to reinvent the wheel.
Just curious, how are we looking on getting LazAutoUpdate working again?I've started this and so far results are encouraging. Sourceforge downloads are working fine, and the code is a lot cleaner.
Hi minesadorada,OK Will do. I'd assumed that OPM would only been used/seen by Laz 1.8/fpc3.11+ users.
I attempted to add v0.2.0.0 as default to the main repository, but with Lazarus Trunk/FPC 3.0.0 it won't compile. It's the same issue we discussed before:
Basically you have to move(unit versionsuport.pas) LCLVersion to the interface uses, then add {$IF (lcl_major > 0) and (lcl_minor > 6)} LCLPlatformDef {$ENDIF}; to the implementation uses. You can also test with other combination Laz 1.6/1.6.2 but it should work.
Hi minesadorada,Recompiled to V0.2.1.0.
I attempted to add v0.2.0.0 as default to the main repository, but with Lazarus Trunk/FPC 3.0.0 it won't compile. It's the same issue we discussed before:
Basically you have to move(unit versionsuport.pas) LCLVersion to the interface uses, then add {$IF (lcl_major > 0) and (lcl_minor > 6)} LCLPlatformDef {$ENDIF}; to the implementation uses. You can also test with other combination Laz 1.6/1.6.2 but it should work.
I think you uploaded the wrong zip. I'm downloading from here: https://svn.code.sf.net/p/lazarus-ccr/svn/components/lazautoupdate/latest_stable/updates/lazautoupdate.zip (https://svn.code.sf.net/p/lazarus-ccr/svn/components/lazautoupdate/latest_stable/updates/lazautoupdate.zip) . The package version is 0.2.1.0, but unit versionsuport.pas is the same. Still does not compile with lazarus trunk.Very strange. I just unzipped lazautoupdate.zip into a new folder, opened Laz1.62/fpc3.0.0 and loaded lazupdate.lpk and clicked 'Compile'. No errors (see screenshot)
And then with Laz1.7/fpc3.1.1. No errors (see screenshot) My copy of 'trunk is Rev:53588M - maybe changes since then?Yes. LCLPlatformDef was added in Lazarus revision 53711(Dec 8. 2016).
OK. All updated now. I put in a ForceNotify, but that will be removed on the next Version change.No need for ForceNotify. I will add 0.2.1.0 directly to the main repository. It will be the latest version.
I'll have to update my copy of Trunk and see the new stuff. I don't do it often because of the faff of rebuilding the cross-compilers.Yes, this is understandable.
If you work with me, we can probably get it working with releases. My problem is lack of a test GitHub platform. I have an old account with just a 'master' repository for testing :(
@minesadorada, @lainzHi GetMem, V0.2.2.0 is still an alpha - I have to add better errorchecking/exception handling in the new code to make it a proper beta.
After you're done with testing and a stable version is ready, I will add it to OPM as default.
Did your \bin\updates\ folder contain the exe and whatsnew.txt?Yes.
Did the \bin folder contain newTestLazAutoUpdate.ini and whatsnew.txt?Yes.
Not sure what you mean. The method SilentUpdate is for use by a trayapp updater. I haven't integrated that yet.
re releases: I'll add it as an option to the ProjectType for consistency with the GitHubReleaseName property. (assuming the download URL works OK)
Yes I forgot about those. I'll figure out a way to download them (like fpcup) or put them into the distribution or something.You can always download those dll's from the main repository like this(feel free to modify a few variables according to your needs).
Just a thing: When the application runs the .exe updater it runs minimized, there's a reason for that? I need it normal to display correctly the 'you want to run this application' if the application needs to run as administrator. If no needs to run as administrator it has sense to keep it minimized of course.The console updater window is shelled in admin mode in Windows (using 'runas') Windows 10 requires it to be shelled that way, so I don't have the control that TAsyncProcess properties bring.
You have UAC disabled or configured in a lower setting?First thing I did when 'upgrading' to Windows 10.
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?
I couldn't see any way to make a tag in the GitHub web interface (you can make a release). How is it done?
Hi Thaddy,Then check the manifest for Lazarus...
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 :) ==
@ThaddyWhat Lazarus? The update is performed by a user who has no knowledge about Lazarus or package AutoUpdate.
Then check the manifest for Lazarus..
Update V0.2.6.0: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.
Thanks for updating this. However I sometimes get the error I talked about some days ago, it downloads but doesn't update.. then a memory leak window is shown. I have no idea on how to debug it.Hi Lainz: Set DebugMode=TRUE then log the OnDebugEvent http://wiki.freepascal.org/LazAutoUpdater#Debugging (http://wiki.freepascal.org/LazAutoUpdater#Debugging)
Hi, i have permission's problem on linux, because i made a .deb, wich install on /opt/ directory, and when my application run the binary "updatehm", this binary, need permission on the /opt/myapplicacion for make the replacement.This is a Linux permissions question, of which I am far from expert. How do other Linux apps update themselves - do they install into a different directory?
Any idea how resolve this?
LazAutoUpdate is very conservative when it comes to permissions. As an open-source component that downloads and installs executables from the internet, I don't want it used for nefarious purposes.
This is a Linux permissions question, of which I am far from expert. How do other Linux apps update themselves - do they install into a different directory?
LazAutoUpdate is very conservative when it comes to permissions. As an open-source component that downloads and installs executables from the internet, I don't want it used for nefarious purposes.
LOL, I've seen his application personally, is a POS software.QuoteThis is a Linux permissions question, of which I am far from expert. How do other Linux apps update themselves - do they install into a different directory?
It depends on how you install it, if you do via the app manager it get's updated automatically by the OS. But since we're talking here for a commercial application it can't be updated this way.
LazAutoUpdate needs to prompt the user for permission as it does under Windows.
My answer is, if anybody deal with this problem before, or suggestions, because i think this is a common problem, in this scenario.Am I right in thinking the console updater needs elevated permissions? Surely that would be up to whatever app installer is used to deploy it - if the app installer grants permissions to the updater, is there a problem then?
I'd appreciate any ideas on how the console updater can ask permission in Linux to do its stuff. It is launched as an AsyncProcess from the component code. I just don't have the requisite Linux knowledge to do it.Just set the execution permission for the console updater with the chmod command. Chmod will ask for credentials when needed. Like this:
I'd like to know how to determine if the console updater has enough rights under the current useraccount (which seems to be the issue) to overwrite an executable
Update to V0.3.4.0
* Added functions to make and delete a desktop shortcut (Linux implementation not yet functional)
* This is to help using LAU as an installer/updater
@Getmem - please use V0.3.6.0 for the repository base - it is the most stable version.Done. Now the default version is V0.3.6.0.
Hi @minesadoradaHi @mdbs99,
Why we have 2 options to get the sources?
1. https://sourceforge.net/projects/lazautoupdate/
2. https://svn.code.sf.net/p/lazarus-ccr/svn/components/lazautoupdate/latest_stable
Which one is official?
Thanks.
Ok, I already have CCR sources so, I'll use it.Take a look at the wiki page:
I didn't install yet, but I have one question (forgive me if is a dumb question).
I would like to use LazAutoUpdate (LAU) this way:
I will put my binaries in my server and configure LAU to check the binaries in the program initialization. If my server has a new version, the program should advise the user (I need to configure my own message) and abort. I mean, the user is not allow to use a old version, for secure reasons.
Is it possible to use like that?
Thank you.
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.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)
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).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.
I will test in Linux Mint in the next couple of days. Watch this space.