Sign in to follow this  
Source

Keeping your application current?

Recommended Posts

This is a question not directly related to games, but to all applications which may need the occasional patch or update. Is there a neat way to parcel some files into an executable which will then extract those files onto a target machine? In essence, how do I create my own version of the Winzip self-extractor, and a parent application which creates the self-extracting executable? Any help would be much appreciated.

Share this post


Link to post
Share on other sites
Another way is to realize that you don't need to do this. If you're on Windows, just use the Windows Installer. Visual Studio comes with "deployment" project templates that build installer packages for you. There's a Windows Installer API that allows you to install and update components based on packages, in the background, if you want.

Don't re-invent the wheel.

Share this post


Link to post
Share on other sites
First off, thank you both for your answers.

Kuphryn, could you please elaborate slightly? I really need to produce an application which creates the distributable from a simple UI - and compress the files - is this possible using your method?

Hplus, yes I use windows installer for the application itself, but I need to be able to have more control over the updates, including checking little version numbers and searching a target machine for an install directory automagically.

Share this post


Link to post
Share on other sites
Try this then: PatchMaker

There is both a freeware and a comercial version avaliable and it'll do pretty much exactly what your after. Its pretty simple to use and can create patches from multiple version to the current one. Just setup your directories with each version, tell it which versions are old and which is current, click go ... it'll diff them, figure out which files have changed and what todo with them. Way simpler than writing it yourself, and it also can check regitery keys or ini files for install dirs or whatever.

Share this post


Link to post
Share on other sites
Thanks for the link, Kuphryn - it is exactly the kind of thing I need.

The problem is that I really want to learn how to code this kind of thing myself - even if it is reinventing the wheel a little.

Share this post


Link to post
Share on other sites
I'm not "Kuphryn" :P

As for doing it yourself I've never tried but you'd probably want to create some kind of diff app that outputs the difference between directories and saves all the changed files into a .zip. Then put that into the resources of your patcher app and have it unzip then overwrite the originals into the target dir. But it'd be a decent amount of work to make it look good and take care of all the possible special cases (ie. you don't want your updater patching someone's saved preferences or data).

Share this post


Link to post
Share on other sites
Sorry about that :)

Its going to be much simpler than that - all I need is a UI which lets me add files from a browser, then packages the whole thing neatly into an executable with the files in some kind of compression.

The part I cannot currently do is the combining of files into an application.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this