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:
parent
0cb1253452
commit
b3451dc30e
1 changed files with 27 additions and 8 deletions
|
@ -32,10 +32,33 @@
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
!include LogicLib.nsh
|
!include LogicLib.nsh
|
||||||
!include FileFunc.nsh
|
|
||||||
|
|
||||||
!insertmacro GetParent
|
### GetParent macro, don't pass $1 or $2 as INTPUT or OUTPUT
|
||||||
!insertmacro un.GetParent
|
!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)
|
### Initialize session id (GUID)
|
||||||
!macro __InstallLib_Helper_InitSession
|
!macro __InstallLib_Helper_InitSession
|
||||||
|
@ -694,11 +717,7 @@
|
||||||
Delete $R0
|
Delete $R0
|
||||||
|
|
||||||
# Try moving to directory containing the file.
|
# Try moving to directory containing the file.
|
||||||
!ifndef __UNINSTALL__
|
!insertmacro __InstallLib_Helper_GetParent $R1 $R0
|
||||||
${GetParent} $R1 $R0
|
|
||||||
!else
|
|
||||||
${un.GetParent} $R1 $R0
|
|
||||||
!endif
|
|
||||||
GetTempFileName $R0 $R0
|
GetTempFileName $R0 $R0
|
||||||
Delete $R0
|
Delete $R0
|
||||||
Rename $R1 $R0
|
Rename $R1 $R0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue