I am trying to make a game launcher, and for the auto-update to work, all I need is:
- I want progressbar 1 to fill up while downloading the directory (called Data) from a remote server to C:\ProgramData\TEMP.
- Check the size of/amount of files in that Data directory
- If not matching the Data dir in C:\Program Files\Chronicles, fill up progressbar 2, while updating the files.
I want all of it to be hidden. :P I hope you can help me. :)
Hehe, I am using WinForms. XD So what should I use? :3
Oh and not files apart, but a whole directory at once, without specifying the filenames (their names have to remain the same). I'm using .NET Framework 2.0 btw.
A lot of people keep a simple file in the online directory that holds the current version. They download, compare to current file versions and voila. Unfortunately, users can change their version and if the last client contained a vulnerability, they can exploit it quite easily. Not much you can do about this without taking away from the app itself.
If you want to download a file, you'll need to look into socket programming. http://www.madwizard.org/programming/tutorials/netcpp/
You could also look at the source code of the Windows version of GNU wget, I can't find it right now though.
You can use GTK+ or just Windows API if you want a progress bar; however it would be easier with Visual C++ Windows Forms... although I don't condone the drag and drop interface; as I was able to create a "web browser" in Visual C# (I don't even know C#) and have it load pages and show them... in < twenty minutes.
@Chrisname: Thanks, I'll google that stuff. However, I think you don't really understand my progressbar problem. :P I already got one, but it has to fill up synchronous with the downloading of the dir. :P
@DrChill: No? XD I'm attempting to create a game launcher. XD
Meh, I found the source of Windows WGET, but how to use? :O
Btw, I think the "lang" I'm programming in is called C++/CLI. Just to let you know. :3
Maybe: ClickOnce Deployment for Windows Forms Applications
http://msdn.microsoft.com/en-us/library/wh45kb66.aspx
If not can you make your requirments clearer? It would seem obviouse to me that people do not know what it is that you want to achieve in enough detail to help you. Just BUMPing is not going to help you get a responce.
Hm, maybe that will work. I'll look into it. Thanks. :3
EDIT: Meh, I can't figure it out, they're doing stuff with things I don't have. :S
Anyways, here's the explaination:
- A few friends of mine are creating a game.
- They asked me if I could create an updater/game launcher.
- I have in mind that the updater should connect to the internet and do an md5-sum of the Data dir on a webserver.
- Also do md5-sum on the Data dir in C:\Program Files\Chronicles.
- No match = download remote Data dir.
However, I want this as well:
- When running the md5-sums, fill up a progressbar. So when sums are done, progressbar is full.
- When downloading, fill up another progressbar. So when done downloading, progressbar is full.