diff options
| author | OpportunityLiu <[email protected]> | 2019-07-13 13:31:37 +0800 |
|---|---|---|
| committer | OpportunityLiu <[email protected]> | 2019-07-13 13:31:37 +0800 |
| commit | 4cc123809f92db0a32f4fedbcbf4862484406da0 (patch) | |
| tree | 94be4abac1ef53c44723b0dd29b0d71a5b16638c /scripts | |
| parent | e8a03485701e33b737bbf942708bfcdf841acaac (diff) | |
fix colon
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/installer.nsi | 11 |
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
|
