VPatch 3.0

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4271 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2005-09-17 09:25:44 +00:00
parent 9929eb7120
commit 4bf6509225
53 changed files with 3918 additions and 1782 deletions

View file

@ -19,8 +19,27 @@ DirText "Choose a folder in which to install the VPatch Test!"
ShowInstDetails show
;--------------------------------
; The normal way to use VPatch
;--------------------------------
!include "VPatchLib.nsh"
Section ""
Section "Update file"
; Set output path to the installation directory
SetOutPath $INSTDIR
; Extract the old file under name 'updatefile.txt'
File /oname=updatefile.txt oldfile.txt
; Update the file - it will be replaced with the new version
DetailPrint "Updating updatefile.txt using patch..."
!insertmacro VPatchFile "patch.pat" "$INSTDIR\updatefile.txt" "$INSTDIR\temporaryfile.txt"
SectionEnd
;-------------------------------
; The hard way to use VPatch
;-------------------------------
Section "New version in separate file"
; Set output path to the installation directory
SetOutPath $INSTDIR
@ -33,7 +52,7 @@ Section ""
File /oname=$PLUGINSDIR\patch.pat patch.pat
; Update the old file to the new file using the patch
DetailPrint "Updating oldfile.txt using patch..."
DetailPrint "Updating oldfile.txt using patch to newfile.txt..."
vpatch::vpatchfile "$PLUGINSDIR\patch.pat" "$INSTDIR\oldfile.txt" "$INSTDIR\newfile.txt"
; Show result