tags:

views:

342

answers:

2

I'm able to generate patch files from one version to another using NSIS' Vpatch. Let's say I have mydll.dll version 1, and I have a patch to update it to version 2. Then I have a new version again, thus I generate another patch to update it to version 3.

What bothers me though is, what if user cancels updating to version 2 and so forth. Then my latest version let's say is version 20. User decides to update to version 20. Is there a way to generate a patch that's like accumulative in nature? whereas user can jump from version any old version to the newest version (i.e ver 3 to ver 20) without passing through the versions in between?

I've read this line in vpatch's documentation ---> "if you want to be able to upgrade version 1 and 2 to version 3, you can put a 1 > 3 and 2 > 3 patch in one file." But how do I that?

What if I alread have like 30 versions. Does that mean I have to create a patch whose arguments are old files(versions 1-29) and new file(version20)?

Any help would be appreciated. Thanks...

+1  A: 

VPatch is an open source project in itself so you could ask in their forum. The guy wrote it says you can ask him questions. There is a link from his page to the email form: http://www.tibed.net/vpatch/

David Newcomb
+2  A: 

I'd say you have two options:

  • Every time you have a new version you GENPAT a patch for every previous version to the new version
  • GENPAT just from New-1 to New (Appending to a patch file that already had New-2 to New-1 etc) and keep calling vpatch::vpatchfile at install-time till the return value is "OK, new version already installed" and not just "OK" (You don't need a archive of all old versions for this, but it will take longer for the user to apply the update if they had skipped many updates)
Anders