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

@ -0,0 +1,22 @@
; PatchLib v3.0
; =============
;
; Library with macro for use with VPatch (DLL version) in NSIS 2.0.5+
; Created by Koen van de Sande
!macro VPatchFile PATCHDATA SOURCEFILE TEMPFILE
InitPluginsDir
File /oname=$PLUGINSDIR\${PATCHDATA} ${PATCHDATA}
vpatch::vpatchfile "$PLUGINSDIR\${PATCHDATA}" "${SOURCEFILE}" "${TEMPFILE}"
Pop $1
DetailPrint $1
StrCpy $1 $1 2
StrCmp $1 "OK" ok_${SOURCEFILE}
SetErrors
ok_${SOURCEFILE}:
IfFileExists "${TEMPFILE}" +1 end_${SOURCEFILE}
Delete "${SOURCEFILE}"
Rename /REBOOTOK "${TEMPFILE}" "${SOURCEFILE}"
end_${SOURCEFILE}:
Delete "$PLUGINSDIR\${PATCHDATA}"
!macroend