Gamesh

AutoUpdate

13 posts in this topic

Hi,

This isn't somekind new grand idea, but never the less would be good to have feature.

An autoupdate function, in many popular software like Spybot or other. Instead of the new version check with a download button witch takes you to the download site, there could be something like this:

You press say update button if the new version is available, then the program connects to the server and downloads the precreated patch, which then is executed, automatically closes the client ant updates it.

This would save you up on the bandwith a bit and would be more comfortable for users. Since the patch stores only the information about the version diffrences and changes the needed parts of the file on execution. Ant the patch itself has a small file size, laike 300KB, which can be downloaded very quickly(now you have to redownload the client witch is 3.8MB of size)

There are many software witch creates the patch for you, and can even close the active program if needed before update. so the only would thing needed to do is to make the patch, place it on the server and make an automated function witch would download that patch ant execute it. From my Point of view it seems not hard to do, but i could be wrong :D

thank you for taking some time and reading this ;) (if you do)

Share this post


Link to post
Share on other sites

Yes, I definitely like it. An example program is HFS server, it is really a masterpiece. ;)

Share this post


Link to post
Share on other sites

genrally with virus software and spyware programs you are only updateing the datebases/signitures not the actual program. if you do have to update the actual program you will find that you will have a large downlod. it is actully quite rare for sorftware companies to patch the binary. they may only update one dll. but it is unlikly that they will do a live patch on a pre built binary, they will just replace the entire bin. sorry i dont think this will be implmented.

edit: just to make sure there is know ambiguity. Apex dose have an auto update facility.

Share this post


Link to post
Share on other sites

Well, I read it, and thanks for your time writing it and explaining yourself well. As for the actual request, I don't think it's a bad one, although I don't mind the bandwidth much. If Crise is willing to do it and sees it as worth while then I don't think it could have any real negative affects, it's just going to take a bit of work. ;)

Nice idea,

Greg

EDIT:

genrally with virus software and spyware programs you are only updateing the datebases/signitures not the actual program. if you do have to update the actual program you will find that you will have a large downlod. it is actully quite rare for sorftware companies to patch the binary. they may only update one dll. but it is unlikly that they will do a live patch on a pre built binary, they will just replace the entire bin. sorry i dont think this will be implmented.

edit: just to make sure there is know ambiguity. Apex dose have an auto update facility.

It would be easier maybe just to not have to open up a webpage and manually download etc though? And it would also mean if there was any need to patch a file or two or something we could do it quickly and easily, without requiring so much time from the user.

Share this post


Link to post
Share on other sites

As far as I don't have unlim internet, I'd prefer downloading a new binary to some folder. So If I need to give it to a friend, I would just copy it. And of course this feature should allow of turning off automatic updates.

Share this post


Link to post
Share on other sites

genrally with virus software and spyware programs you are only updateing the datebases/signitures not the actual program. if you do have to update the actual program you will find that you will have a large downlod. it is actully quite rare for sorftware companies to patch the binary. they may only update one dll. but it is unlikly that they will do a live patch on a pre built binary, they will just replace the entire bin. sorry i dont think this will be implmented.

edit: just to make sure there is know ambiguity. Apex dose have an auto update facility.

Well ok the spyware program wasn't such a good example, but i see you all got the right idea what i was talking about. It is more comman in games actually where you download a patch to update your favorite game to the newest version, take for example well known Counter-strike ;)

or in software like the Zlobomir said the "HFS Server"

:D

As far as I don't have unlim internet, I'd prefer downloading a new binary to some folder. So If I need to give it to a friend, I would just copy it. And of course this feature should allow of turning off automatic updates.

Well i didn't mean it to become something like windows automatic updates, the program just suggest you to update if you don't want you can choose not to do so :) it isn't a nag or smth like that.

the other great thing about ApexDC is that it is a stand alone application. So if your friend needs it you can just copy the executables from your folder and share them with your friend, it doesn't store files in other places so it will work in another computer just as well.

And a good thing about patches is that you can give your friend a patch instead of all the program if he allready has that program that is :) and save some space on your removable device storage

Share this post


Link to post
Share on other sites

As for the actual request, I don't think it's a bad one, although I don't mind the bandwidth much. If Crise is willing to do it and sees it as worth while then I don't think it could have any real negative affects, it's just going to take a bit of work. ;)

are you talking about your bandwith or the [website / server where the update file will be hosted] bandwith? (both might be the same, dunno...)

because IMHO, a whole new .exe at least will need to be hosted somewhere, and transfering it to every ApexDC++ user would take a lot of bandwith.

Share this post


Link to post
Share on other sites

are you talking about your bandwith or the [website / server where the update file will be hosted] bandwith? (both might be the same, dunno...)

because IMHO, a whole new .exe at least will need to be hosted somewhere, and transfering it to every ApexDC++ user would take a lot of bandwith.

Isn't it equal? If the file is much smaller, the saved bandwidth will compensate for the hosting space.

Edited by Zlobomir

Share this post


Link to post
Share on other sites

Isn't it equal? If the file is much smaller, the saved bandwidth will compensate for the hosting space.

it's so true, i didn't think about it... well... good idea, then!

here is how it could be done:

- the new .exe is hosted on a webserver

- ApexDC++ downloads an XML file, where it compares its own version with the .exe's version, which is given in the XML file. timestamps could also be used instead of versions. this new .exe can go to an "Apex.update" file

- ApexDC++ also downloads a small "update.exe"

- every time ApexDC++ starts, it checks whether there is in its directory an "update.exe"; if this file exists:

* if the file "Apex.update" is here, execute update.exe and exit;

* if "Apex.update" doesn't exist, delete "update.exe" and continue loading

- the update.exe file can be a simple command-line prog which tries like 10 times to move Apex.update to the old Apex.exe, if Apex.exe can't be accessed because it hasn't closed yet, pause during 1sec between each try.

once update.exe has finished (either the renaming worked, or it didn't, this doesn't matter), it loads "Apex.exe" and exits.

this is a scheme i use, so i know it works. there might be better, but it's the best i could find to fit to DC++.

Share this post


Link to post
Share on other sites

A feature similar to this is planned. Basically downloading the setup file and upgrading the client within the update check, rather than going to a site.

Share this post


Link to post
Share on other sites

A feature similar to this is planned. Basically downloading the setup file and upgrading the client within the update check, rather than going to a site.

You know if apex dc wasn't consisted of two files like exe and that pdb, instead you would devide some most importat sections of the code and place them in libraries (DLL), the update of the program would be acomplished a alot faster and it would be smaller. For example lets say the program has additional 3 dynamic link libraries, and the updated code is only in two of them, so the automatic update program would only need to update those to files, instead of all the client :)

Share this post


Link to post
Share on other sites

You know if apex dc wasn't consisted of two files like exe and that pdb, instead you would devide some most importat sections of the code and place them in libraries (DLL), the update of the program would be acomplished a alot faster and it would be smaller. For example lets say the program has additional 3 dynamic link libraries, and the updated code is only in two of them, so the automatic update program would only need to update those to files, instead of all the client ;)

AFAIK about programming (nothing :) ), this is good and right way, but I would prefer other features first. And for apreading the program, it's much easier to copy two files, rather than 5 or ten, or clicking on the installer... I would recommend to look at HFS Server and its auto-update function.

Share this post


Link to post
Share on other sites

Some ideas about autoupdate:

For example I'm use FireFox, because I know, how work they autoupdate procedure.

How they work?

1. In folder with firefox exist file 'updater.exe'.

2. On server exist folders with different versions of client, partial patches for update from one to next version (really small file) and for upgrade to any version (big file).

3. When firefox check for update they download 1 small file with information about latest version.

4. Firefox read this file and start to download update. If all right and we have no so old version of firefox they download partial update. If isn't - they download complete update. In some cases it's not-so-good way, but it's work.

5. After downloading needed update they place them into 'updates' folder inside they root folder.

6. They copy 'updater.exe' into 'updates' folder and run them with special parameters. After that ff closing.

7. Updater wait for FF and after they close updater unpack binary patch and apply them to needed files (all information in patch file).

8. After that updater delete patch file, run firefox and close itself.

Where mistakes?

1. User can't manually apply patch... hmm... I'm wrong... User can do this, but it's not so easy. Thay need do all staps, what FF do automatically.

2. Algorithm can't download set of partial patches and apply it automatically one by one. Sometimes it's important. For example I have FF 1.5.0.4 and want to update to 1.5.0.7. What happens if I press update? They download complete patch file (7 Mb)! But if I'm load only differences I'm use only 1-2 Mb!!! It's faster (on work I have really slow internet) and lighter.

3. User can't save patch file to another place. They have chance save patch file only after download and before installing (thanx god FF asking before starting patch process).

How to resolve problems?

1. We need place in folder with latest Apex version link to previous version (and backward to 0.1.0 version) and information about size of patch file.

2. When user trying to download patches apex must download fits file and goes down from version to version before reach they own version (eg. user have 0.2.0 and want to update to 0.2.2. apex already load file with information about new version and start loading information from previous version 0.2.1, in 0.2.1 they, what exists 0.2.0). Until they searching patches they summing size of this patches. If size greater then full archive with latest version - best way download it.

3. After making list of files to download apex must check for this files in predefined folder. If in folder already exist same file they must subtract size of this file from summary size of patches. For checking integrity of existing patches can be used TTH (TTH info must be present in file with information about patch).

4. If Apex see what partial patches smaller then 1 complete patch they must ask user what files to download - many but small or one but BIG.

5. After downloading they must check TTH of all downloaded files and, if broken, reload broken parts.

6. After this step apex must check integrity of existing files. If all OK we can apply patches.

6. After checking integrity apex must install them one by one using external module or other method. I think FF way with updater.exe have one good side - we can update updater.exe. But we need recopy updater after installing every next update...

7. After applying every patch Apex updater must check TTH of every file in project and compare it with information in next patch file. If all OK they can apply next.

8. If something goes wrong apex updater must try to undo path for broken file from backup and reapply patch to them.

9. If it's not help apex updater must report user about it and rollback to working version.

If user can't install partial patch with this algorithm they always can download complete patch and install it (p.4).

Somebody know better way or can add something to this algorithm?

Share this post


Link to post
Share on other sites