View Full Version : How do I patch _any_ rev of target binary?
Woofster
09-26-2006, 12:02 AM
Hello!
Visual patch is great stuff....
Question of the day:
I have a new binary, build 900. I have one of the 'old' builds (build 800), but there are three or four builds out there, and I do not have them all on hand.
Right now, my visual patch project works perfectly if build 800 is on the system. But if build 700 is on the system, it fails. This is because I do not have (and cannot have) build 700 on hand to include in my project.
How do I make visual patch just:
a) Check there is a file of that name in the right place
and
b) Put build 800 there, overwriting the existing
Thank you!
Brett
09-26-2006, 08:50 AM
Double-click the file that you want to force installation of and at the bottom of the General tab, check the "Force install" option.
Woofster
09-26-2006, 10:06 AM
Thank you!
I have done that, but it is not working.
Here is the situation:
I have three builds 'out there' of my binary, A B C
My new build is D, this is what I want to distro with Visual Patch.
I only have A on hand, so I built a visual patch project project with:
A and D
I have taken the steps you describe for D
And the patcher works great... if A is on the system.
How do I:
1) Make it work no matter what build is on the system
2) Make it only work if the target file is in fact present on the system (I don't want it putting D there if the target is not present)
Thank you!!!
Brett
09-26-2006, 12:21 PM
The way Visual Patch is designed, it can only patch files and versions that it knows about (versions that you feed it at design time). In your case you might be better off just making an installer with Setup Factory for all of version D and write a script that will validate the existence of versions a-c on the system before installing. Then from version D and onward us a patch.
Lorne
09-26-2006, 12:43 PM
Technically, you could accomplish this by altering the detection part of the On Startup actions. You'll need some way of locating your B and C versions (was the InstallFolder written to a registry key?). And if you want to validate those versions, you'll need to script that behaviour as well (Visual Patch can't automatically validate files it has never seen).
You can locate the detection part of the default startup script by choosing Project > Actions, clicking on the On Startup tab, and scrolling down to this section:
--------------------------------------------------------------
-- Locate installed version
--------------------------------------------------------------
BTW, I would recommend creating two patches, so you don't lose the benefits of binary patching from the older version you do have (A to D).
A to D: binary differencing (very small patch)
B or C to D: "whole file" update (as Brett mentioned, that's really just an installer)
Woofster
09-26-2006, 06:37 PM
Lorne ... THANK YOU!!!
I almost wept when I saw Brett's answer.... (not really, but I did choke up a bit...).
As Lorne suggested, it simply required rewiring the "Locate installed version" function to be a bit more forgiving.
All the other work was cosmetic, modding the screens, etc.
I LOVE Visual Patch. It really works for my needs. I love how high level it is, yet really plastic underneath. It is very nicely architected.
Great Tools Y'All !!!
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.