Patching

Just starting out? Need help? Post your questions and find answers here.
Killswitch
Enthusiast
Enthusiast
Posts: 731
Joined: Wed Apr 21, 2004 7:12 pm

Patching

Post by Killswitch »

Its almost inveitable that you'll sooner or later update or change your software after you've released it, but how can you patch it? I've thought about using a simple program that reads the majority of the code from seperate .pb files, but this would be harder to distribute *and* theres the question of piracy.

You could also ask people to down another .exe but with big programs this couldbe a bit to much bother for some people - besides they might not even remember where they got it from.

So is there a way to change the contents of a compiled .exe from version A to version B? Or are there other, better, ways to update your software?
~I see one problem with your reasoning: the fact is thats not a chicken~
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

Well, for patching files that have NOT changed the filesize, a lot of programs are out there. For patching exe and other files wich have changed in size, i only know 2 programs. One i think is RTPatch, very expensive, and clickteam patch maker. Dont ask me how they maked it, but they did. I have tested it, and it includes only necessary data.

Try it out :P

btw, clickteam patch maker is free for commercial and uncommercial use, but it has a little ad saying that the patch is made with clickteam patch maker. But if u buy a license, it wont show it.

http://www.clickteam.com/English/patch_maker.htm
Moonshine
Enthusiast
Enthusiast
Posts: 263
Joined: Tue May 25, 2004 12:13 am
Location: UK

Post by Moonshine »

I asked a similar question not long back, but I might go for the clickteam maker when I need to.
Mark my words, when you least expect it, your uppance will come...
plouf
Enthusiast
Enthusiast
Posts: 281
Joined: Fri Apr 25, 2003 6:35 pm
Location: Athens,Greece

Post by plouf »

you dont have to distribute source
just keep original exe somewhere
then compiler the updated exe and use a
binary file patcher it will create a diffirence file

you have only need then to execute binary file patcher with diif file in user
and it will take original file and change it to uptaded exe its difficult to pirate
since these patchers only create valid exe if they sourced with the exact
exe (every bit) than the original exe

here is a GNU one
http://www.gnu.org/software/patch/patch.html
and there are more
Christos
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

but still its difficult to find one that can handle different sizes of the exe.
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

..

Post by NoahPhense »

thefool wrote:but still its difficult to find one that can handle different sizes of the exe.
That's when you just use a serious encryption algo, and insert your who
exe in the patcher. Then it just overwrites the old exe.. ;)

- np
freedimension
Enthusiast
Enthusiast
Posts: 613
Joined: Tue May 06, 2003 2:50 pm
Location: Germany
Contact:

Post by freedimension »

PatchWise, havn't tried it yet, but looks promising: http://www.hanmen.com/products/pwf3info.php
plouf
Enthusiast
Enthusiast
Posts: 281
Joined: Fri Apr 25, 2003 6:35 pm
Location: Athens,Greece

Post by plouf »

wrong url the abone i posts
http://aminet.net/misc/emu/gpatchwin.zip

no need for same filesize
(btw its not gnu either but its FREE)
Christos
CherokeeStalker
User
User
Posts: 66
Joined: Fri Oct 17, 2003 2:42 am

Patching

Post by CherokeeStalker »

You could write one yourself !
I've written patchers (for both same size and different size files) in a few
languages - Liberty Basic, iBasic, O'Basic, etc. I'm currently working on
translating to PureBasic.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Patching

Post by PB »

> You could also ask people to down another .exe but with big programs this
> could be a bit to much bother for some people

PureBasic exe's aren't that big, even for complicated apps. They're unlikely
to be over 1 MB in most cases -- and that's being extremely generous! :)

I plan to just have an updated exe in a zip file on my site, with the location
clearly mentioned in the docs and "About" box. Just download, delete the
old, run the new. No hassles at all.
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

or just make an sfx'er yourself that overwrites the old exe.
Moonshine
Enthusiast
Enthusiast
Posts: 263
Joined: Tue May 25, 2004 12:13 am
Location: UK

Post by Moonshine »

While PB does make extremely small EXE's it's very inconvenient if someone has to download another 1mb exe if only 10k maybe has changed... on 56k its very awkward...

And if the updates are regular it makes sense to keep themcompact and easy... seperate update files are also more secure
Mark my words, when you least expect it, your uppance will come...
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

@CherokeeStalker:

I have written a byte patcher for non-size changed files. I know its possible to make patchers that can work with changed filesizes, but how? Can you explain the concept? And btw, how lang are you converting it? :D
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

The comparison between the two files sounds like the fiddly bit here.
@}--`--,-- A rose by any other name ..
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> if someone has to download another 1mb exe if only 10k maybe has
> changed... on 56k its very awkward...

It's not that bad. I had a 56k modem for years and used to update all my
stuff by redownloading the entire 3-4 MB setup apps (things like ZoneAlarm,
Winamp, FireFox, and so on). Patching an app feels "dirty" (in my opinion)
because you have one setup file, then lots of little patch files lying around.
I'd prefer to have one single setup of the latest version. It's for this same
reason that I don't use PureBasic's Smart Update feature. Besides, a 1 MB
file to download on a 56k modem takes less than 4 minutes (according to
http://ssmedia.com/Utilities/Calculator/ ). And if your updated exe is only
256k (say after being compressed with UPX) then the 56k download time is
just a mere 56 seconds... :) It's really no big deal, IMO anyway.
Post Reply