summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/installer.nsi11
1 files changed, 6 insertions, 5 deletions
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