Have any of you written a updater?

Community Forums/General Help/Have any of you written a updater?

AJ00200(Posted 2009) [#1]
I am looking for an updater that will update my games files when a new version is out.
I am rather bad with file reading/writing, so I was wondering if any of you have written one that I can use, or havesome code to work off of.


GaryV(Posted 2009) [#2]
I have not looked, but I would be shocked if a simple online updater was not in the code archives.


AJ00200(Posted 2009) [#3]
I did look last night, but I didn't find anything.
I'll look closer.


AJ00200(Posted 2009) [#4]
Nope. Nothing there.


xlsior(Posted 2009) [#5]
If you do write your own, here's something to keep in mind:
1) A running program can't overwrite itself, so if you wish to be able to update the main executable as well, then you'll need to have your updater as a seperate process so the main .exe won't be locked.
(Either that, or you need to store it under a temporary name after download, and somehow flip/rename the .exe's)
2) Windows Vista's UAC won't let you add files under c:\program files after the fact from outside an installer, so if you have your program stored there you're bound to run into updater issues on some PC's


nrasool(Posted 2009) [#6]
Swampdonkey created a utility which you may like, xpatcher2, see http://www.gothasoft.com/index.php?option=com_content&view=article&id=67%3Asoftware-xpatcher2&catid=20%3Aproducts&Itemid=77


_PJ_(Posted 2009) [#7]
BlitzGet in the code archives essentially provides the functionality.
By which it can be used to read a web-based file, check against the program version, and if necessary, dowwnload a set of files.


AJ00200(Posted 2009) [#8]
Xpatcher2 looks nice, but BlitzGet is Free.
I make free games, so I try to stick with free stuff.
While it is more work, it should be able to do what I need.
I'll keep the UAC in mind.


Blitzplotter(Posted 2009) [#9]
Innosetup can do it for you if you dig deep.


AJ00200(Posted 2009) [#10]
I've written most of it with BlitzGet, so no changing now.