If you already know how to step up a progress bar; then it shouldn't be too hard to be able to increment it every time something is done...
If you're downloading a file in chunks; then you would step the progress bar like this: progress += (int)(operation_number / amount_of_operations) * 100;
I may have gotten the * and / the wrong way round; I do that alot... so forgive me if I have.
Wait, so you want to check if the file has been changed? What are you making, like a Windows version of apt-get?
And if you want to check if the file's been changed... well, the server might store the "date of last modification" (or whatever) information. You could check it against your local copy...
Or you could compare each byte; consider the following pseudo-code:
1. download the server's file
2. open the new copy and the local copy (even if they're zipped files) for reading
3. take a line from each one
4. if the lines aren't equal, delete the old file, rename the new one. Done.
else jump to step 3
5. If you got here that means the files are exactly the same. Delete the new version. Done.
If you regulate the server yourself, it drastically simplifies things. You can probably change the first byte of each zipped file to something like '#' if it's updated or '!' if it isn't.
Well, not a single file, more like 100+ files. So checking every file individually is not an option I think. :\ The server will be ran by someone from the team.
I'm trying to create an auto-updating game launcher. :3
Ahhh... that's good. In this case, make sure the server stores a file somewhere which says which files have been changed. You'd probably have to manage that manually, but you could write a program to do it for you.
Anyway; the updater downloads the file (it'd only be a few kiB at most) and reads it. The file stores links to every new file, and the updater downloads them and moves them to the appropriate directory.
In pseudo-code:
1. connect to the server
2. find and download the update file
3. For each line in the file
connect to the server and download the file pointed by the link found in the update file
4. Delete the update file.
Now only left is the progressbar thingy and updating when the form is visible. :D But how am I going to set minimums and maximums for the progressbar. :\
EDIT #345678: I got it to work now. :3 Thanks for the help all!