summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorOpportunityLiu <[email protected]>2019-07-13 13:31:37 +0800
committerOpportunityLiu <[email protected]>2019-07-13 13:31:37 +0800
commit4cc123809f92db0a32f4fedbcbf4862484406da0 (patch)
tree94be4abac1ef53c44723b0dd29b0d71a5b16638c /scripts
parente8a03485701e33b737bbf942708bfcdf841acaac (diff)
fix colon
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