Archive: "Other GenPat error"


"Other GenPat error"
There is a bug in GenPat involving repetition of the source folder name.

nsisPatchGen ver1 ver2


This code, run on the attached data folders produces the following error message:

File Modified: folder_diff.txt
Creating patch file: patchFiles\folder_diff.txt.pat
"..\nsisPatchGen" : "GenPat failed to start"
The (attached) directories ver1 and ver2 each contain a subfolder called "folder_ver1". folder_ver1 contains a file called "diff.txt" that contains different data for each version and therefore requires a generated patch file.

The problem is that the the name "folder_ver1" contains the name of the source root directory ("ver1"), and when GenPat encounters the file, it strips out the root name from the path (hence the log message "Creating patch file: patchFiles\folder_diff.txt.pat" should read "Creating patch file: patchFiles\folder_ver1\diff.txt.pat").

This only occurs if the root name is repeated at the end of a sub-folder name (so "ver1_folder" would work fine).

I'll try and have a look at the GenPat source on Monday, but I thought I'd post up here first and see if anyone has solved the problem already.

Is this the correct place to write bug reports?

I've been having some trouble getting nsisPatchGen to build. More specifically, I can't seem to get QT to link in correctly.

I found a download for QT4.1.4 (http://rebecca-aiml.sourceforge.net/download.htm), and I think I've added the appropriate include directories to the project, but I'm still getting missing declaration errors:

error C2244: 'QMultiMap<Key,T>::insert' : unable to match function definition to an existing declaration

Bug reports usually go in the bug tracker. But it's OK to post in the forums to gather the information first.

I'm not quite sure I understand if the bug is in GenPat or nsisPatchGen. As far as I know GenPat doesn't handle paths to that degree, so it must be nsisPatchGen. You're also looking at QT, so that means you've reached this conclusion as well.

I can say at least "GenPat failed to start" is caused by its failure to find GenPat.exe. It seems to ignore %VPATCH% mentioned in its readme and just call VPatch.exe. I saw no evidence that it looks for %VPATCH% anywhere in its source code. It just looks for it in %PATH% like every other executed program.

As for "Other GenPat error", that can be resolved by appending backslashes to ver1 and ver2 on the command line. It won't solve the real bug, but it's a viable workaround.


Hi kichik,

Thanks for the reply.

Yea, on closer inspection it seems likely that the bug exists in nsisPatchGen.

When I read you post for the first time I couldn't quite figure out why you were referring to a "GenPat failed to start" error that I've never heard of. In my hasty attempt to produce a simplified example of my problem I must have caused another. I cut and paste the "failed to start" error message thinking it was the "Other GenPatch error" I had been experiencing.

Thanks for the backslashes tip, I don't know why I didn't think to try that in the first place. I'll give it a go first thing on Monday. If I have time (and if I can get nsisPatchGen to finally compile) I'll try and put a proper fix in as well.

Thanks again


Sorry - was away working somewhere with really bad internet access. I'll have a look at the bug soon.

As for the build problem - what compiler are you using?


Hey viper,

I'm using VC2005 Express Edition. The backslashes workaround is working though, and I haven't had a chance to try compiling again.


I found the error. You are checking for errors before to wait the execution completion on PatchGenerator.cpp. Please check it out.

I am attaching a diff file I made to make things to work.

When you correct this BUG, please don't forget to update the nsisPatchGen project at SourceForge.

Best Regards,

Guilherme Balena Versiani
ComunIP S/A