Patch Failed to Apply to c:\blah

Sorry for posting multiple times in close succession.

I managed to work around the problem with huge patches by finding and disabling the setting to create a catch-all patch. It's far from ideal that I should have to disable this, but WyUpdate seems incapable of selecting the right download unless I do.

So I managed to get a patch from 0.80 to 0.81 up on the website. So everything's good, right? No. Now it downloads the patch and tries to run it, but stops dead with the error:

Patch failed to apply to c:\program files\blah\blah\Interfaces.pak

At first I thought it might have happened because the program was running and the file could have been open. I seemed to remember reading that WyUpdate shut down the program if necessary, but I figured maybe it couldn't determine that the file was open or didn't realize that the exe was to blame. So I tried running WyUpdate standalone instead, and it still can't update it. I can't really provide a more helpful error message because that's the only error message I have.

I've been scouring the forum to see if there's any more information I can provide that might be helpful.

I'm an Admin user on the test machine.The file(s) is/are not hidden.The file(s) is/are not read-only.The file and path that it says it cannot patch is present and correct.

I can't think of anything else.

Oh, I thought of one more thing. The pak file is a zip archive, if that makes any difference.

Ok, in your 0.80 tab in wyBuild get the filename for the "Interfaces.pak" file you're trying to update. (Click the file in wyBuild and it should list a "Local path" like "C:\Your Original Versions\0.80\Interfaces.pak".)

Go to that exact file and copy & paste it into some folder you can go back to. Rename the copied file to "a.pak"

Now, for the working version that you're trying to update: Get the Interfaces.pak file and paste it in the same folder as "a.pak". Rename the newly copied file to "b.pak".

Now if these files are small enough (20 Mb or so) send them to me at wyatt@wyday.com. Otherwise you'll need to do a bit more work.

If the files are bigger than 20 Meg: A bit more work

Download & install Winmerge: http://winmerge.org/ . Select & right click the two pak files (a.pak & b.pak). Click the Winmerge menu item:

[attachment=2]winmerge.png[/attachment]

If the 2 files are identical then you'll see two columns of white in the Winmerge window (see left hand side)

[attachment=0]winm.same.png[/attachment]

If the 2 files are different then you'll see two columns of yellow in the Winmerge Window:

[attachment=1]winm.diff.png[/attachment]

They should be the same

The files should be identical, so if you're seeing even a little bit of yellow in the Winmerge window it means that you're trying to update a "corrupted" version of the Interface.pak file. This means you need to make sure the version you're distributing to your users is identical to the version of which you're basing the patch files.

If the files are the same, then this means that something messed up in either the patch-creation or the patching algorithm. In this case we will definitely need the files.

I've been scouring the forum to see if there's any more information I can provide that might be helpful.

I'm an Admin user on the test machine.The file(s) is/are not hidden.The file(s) is/are not read-only.The file and path that it says it cannot patch is present and correct.

I can't think of anything else.

Let me address a few of these. The hidden & read-only problems were corrected in version 2.0 of wyBuild & wyUpdate. You should no longer have any problems related to read-only or hidden files or folders.

And if it was a problem that the user wasn't elevated as an Admin, then wyUpdate would try to elevate you to an admin, and if it failed to do that it would say something along the lines "Couldn't run wyUpdate as Administrator".

Let me update those of you following this topic. There was a bug in wyUpdate that prevented certain edge-case files from being patched. This is fixed in the latest wyBuild & wyUpdate - v2.5.8.

So, as always, update to the latest & greatest version.