From 4cc123809f92db0a32f4fedbcbf4862484406da0 Mon Sep 17 00:00:00 2001 From: OpportunityLiu Date: Sat, 13 Jul 2019 13:31:37 +0800 Subject: fix colon --- scripts/installer.nsi | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/installer.nsi b/scripts/installer.nsi index 5a5598a29..e05a33dd4 100644 --- a/scripts/installer.nsi +++ b/scripts/installer.nsi @@ -153,6 +153,7 @@ Function TrimQuote Loop: StrCpy $R2 "$R1" 1 + StrCmp "$R2" "'" TrimLeft StrCmp "$R2" "$\"" TrimLeft StrCmp "$R2" "$\r" TrimLeft StrCmp "$R2" "$\n" TrimLeft @@ -165,6 +166,7 @@ TrimLeft: Loop2: StrCpy $R2 "$R1" 1 -1 + StrCmp "$R2" "'" TrimRight StrCmp "$R2" "$\"" TrimRight StrCmp "$R2" "$\r" TrimRight StrCmp "$R2" "$\n" TrimRight @@ -198,7 +200,10 @@ Function .onInit ReadRegStr $R0 ${HKCU} ${RegUninstall} "InstallLocation" ${EndIf} ${If} $R0 != "" - StrCpy $InstDir "$R0" + Push $R0 + Call TrimQuote + Pop $R0 + StrCpy $InstDir $R0 ${EndIf} ${EndIf} ; use default @@ -206,10 +211,6 @@ Function .onInit StrCpy $InstDir ${PROGRAMFILES}\xmake ${EndIf} - Push $InstDir - Call TrimQuote - Pop $InstDir - FunctionEnd Section "XMake (required)" InstallExeutable -- cgit v1.3.1