Game Development Community

dev|Pro Game Development Curriculum

Finnally an opensource patcher!!!!!

by Vince Gee · 02/13/2006 (7:07 pm) · 8 comments

Well,

Since I've been getting tired of putting new zips out on the external webserver I decided to take a break from torque and write a patcher using CRC signatures as identification in Visual Studio 2005 and Dot Net 2.0.

And since I don't believe that people should be charged for learning I put together a simple patcher that really can be used for anything, but I'm applying it to patching your torque clients so players don't have to pull down a hugh zip which most likely they have 99 percent of.

So, step one, download my source as mysite.verizon.net/deceptus/PatcherProjects.zip . This has everything in it to recompile the source etc, modify as you want, it's not documented that great but it should be somewhat easy to follow if you know visual basic

In this zip you will find 2 projects. One project is the one to create the crc log and the other which you give to players which reads it and downloads the miss-matched files to their computer.

So, once you compile the patch Generator and run it you will see a form that looks like this mysite.verizon.net/deceptus/Step1.gif
In the protocol box type in either HTTP:// or FTP:// they are the only 2 protocols that I have tested. Be warned that if your using a MS IIS server, the .cs script files will throw errors since it thinks it c#.

The next box is where you type in the url from where they get the updates from. in my case, it's www.geeconsulting.net/client

The source directory is where you have your client sitting which is ready for distribution.
IMPORTANT make sure you log destination is in the same folder as your client and that it is called log.crc

If it isn't then the client patcher won't find it.

Click Generate CRC List, this will inventory every folder and subdirectory in the source directory and put a entry in the log.crc w/ the filename and path as well as it's crc value.

It will generate a text file called crc.log w/

UPDATEPATH	www.geeconsulting.net/client/
PROTOCOL	ftp://
FFFFFFFF9BD91102	\common\main.cs
FFFFFFFF913894AD	\common\main.cs.dso
1428E75E	\common\prefs.cs
FFFFFFFFDB973F6D	\common\TestMap.jpg
189EBD25	\common\client\actionMap.cs
FFFFFFFFB5768022	\common\client\actionMap.cs.dso
415A0F44	\common\client\audio.cs
FFFFFFFFDEA67945	\common\client\audio.cs.dso
7C094DF4	\common\client\canvas.cs
233B2071	\common\client\canvas.cs.dso
2754A4D2	\common\client\cursor.cs
FFFFFFFFAED306AF	\common\client\cursor.cs.dso
1F19F986	\common\client\help.cs


Copy your whole client folder out to a ftp server or web server, and distribute your patcher.

When the client fires up the patcher they will see...

mysite.verizon.net/deceptus/step2.GIF
They type in where their client folder is in the "Path to root" textbox and hit retrieve from crc.

The patcher will then go through their folders updating and creating new files so they only have to grab what has changed.

I hope this helps some people out, I know I could of made it cleaner, but I was in a hurry and it was my first attempt at it.

Oh, btw, it was built using visual studio 2005 and DotNet 2.0 I'm sure it will compile on 1.1

If you improve it, send back a zip of the source to me and I will update my zip for others.

Hope you all enjoy,

Vince

#1
02/13/2006 (7:26 pm)
Great program.. Easy to install and download updates..
Thanks man
#2
02/13/2006 (8:08 pm)
You may want to make this a resource. That way if you ever discontinue or change your isp then the files will be located at GG. I can see use for this, myself, in the future.
#3
02/14/2006 (12:43 am)
Nice work Vince, something a good few people here are going to use no doubt. I'm with Steve, see if you can get it up as another resource, if your happy with it currently that is.

Impressive how quick you work mate, when you start something hell, it's going to get finished eh?
#4
02/14/2006 (4:41 am)
Anyone who wants to rebuild this as a resource for GG is more than welcome to. I'll be cleaning it up for my project but that code most likely be available to the general public.

The purpose of this post is to give any programmer the basic information they need to build a patcher, and this goal I think I have achieved.

Repost the code, modify the code, charge for it, it really doesn't matter to me.


Vince
#5
02/14/2006 (12:53 pm)
6 plans in the last 5 days... Glad to see your getting a lot done, but your not gonna post for every task you get done are you?
#6
02/14/2006 (5:11 pm)
sounds cool, we've been needing something like this. I will point my programmer-type guy here.
#7
04/16/2006 (5:26 pm)
Wow, nice. Puts the piece of **** I was working on a long while back to shame.
#8
02/07/2011 (12:47 pm)
Any way that you could possibly update the link? It says the resource is locked now, and I am unable to download it. Thanks!