creepin
24th February 2009 03:27 UTC
how to patch .zip with NSIS and vpatch
Hello!
I just got started with NSIS, but i feel pretty comfortable with the script language.
Now my question was: Is there a way to patch a zip file with only the .pat file in the installer.
and how do i get the .pat file into the installer etc.
Is there a step by step someone could show me, or make one?
That would be awesome, thanks!:)
creepin
24th February 2009 23:17 UTC
anybody? pwease?
Animaether
25th February 2009 00:07 UTC
have you considered the VPatch plugin?
http://nsis.sourceforge.net/VPatch_plug-in
creepin
25th February 2009 00:12 UTC
yeah, i know that.
my question was, how do i use the vpatch plugin? and does it work with .zip files?
Animaether
25th February 2009 00:26 UTC
yes, it works with .zip files (that is to say, it can patch one zip to another..it doesn't patch files within; you'd have to extract those first)
as for how to use it... there's bot documentation...
http://nsis.sourceforge.net/VPatch_plug-in
...and an NSIS code generator (where you just specify the old file, the new file, it generates the patch file -and- NSIS code to patch that file)...
http://sourceforge.net/projects/nsispatchgen
Couldn't be easier, really :o
creepin
25th February 2009 00:32 UTC
well, ok, if i have to include the entire new .zip
then i wont need this anyways, i thought about patching a .zip while only including the additional data in the installer..
Animaether
25th February 2009 04:17 UTC
well you don't have to include the entire new zip.
let's say you have a ZIP file... my_archive.zip
and it contains...
somefile.exe
hello_world.txt
blabla.ini
Now you change something in hello_world.txt, and create a new archive.. my_archive2.zip
Then with vPatch, you can certainly create a patch file for the difference between my_archive.zip and my_archive2.zip , and you would only have to include that tiny .pat file.
vPatch doesn't care whether the file is a ZIP or not, it just checks for file differences.
I think this is what you want, and that should be fine.
What I meant earlier was this..
Say you have a myfile.zip with hello_world.txt, and you have a new hello_world.txt with changes, and you make a patch file for the difference between the two hello_world.txt versions.
Then, with vpatch, you can't adjust the hello_world.txt -inside- myfile.zip with a patch. You'd have to extract that file from the zip first, patch the hello_world.txt with vpatch, and then re-zip it.