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:
parent
9929eb7120
commit
4bf6509225
53 changed files with 3918 additions and 1782 deletions
22
Contrib/VPatch/VPatchLib.nsh
Normal file
22
Contrib/VPatch/VPatchLib.nsh
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue