fixed bug #1692761 - Library.nsh warning when not using macro UnInstallLib

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5034 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2007-04-03 10:47:27 +00:00
parent 0cb1253452
commit b3451dc30e

View file

@ -32,10 +32,33 @@
!endif
!include LogicLib.nsh
!include FileFunc.nsh
!insertmacro GetParent
!insertmacro un.GetParent
### GetParent macro, don't pass $1 or $2 as INTPUT or OUTPUT
!macro __InstallLib_Helper_GetParent INPUT OUTPUT
# Copied from FileFunc.nsh
StrCpy ${OUTPUT} ${INPUT}
Push $1
Push $2
StrCpy $2 ${OUTPUT} 1 -1
StrCmp $2 '\' 0 +3
StrCpy ${OUTPUT} ${OUTPUT} -1
goto -3
StrCpy $1 0
IntOp $1 $1 - 1
StrCpy $2 ${OUTPUT} 1 $1
StrCmp $2 '\' +2
StrCmp $2 '' 0 -3
StrCpy ${OUTPUT} ${OUTPUT} $1
Pop $2
Pop $1
!macroend
### Initialize session id (GUID)
!macro __InstallLib_Helper_InitSession
@ -694,11 +717,7 @@
Delete $R0
# Try moving to directory containing the file.
!ifndef __UNINSTALL__
${GetParent} $R1 $R0
!else
${un.GetParent} $R1 $R0
!endif
!insertmacro __InstallLib_Helper_GetParent $R1 $R0
GetTempFileName $R0 $R0
Delete $R0
Rename $R1 $R0