fixed bug #1786899 - MUI_PAGE_WELCOME error when use SimpChinese Lang

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5284 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2007-09-28 17:38:31 +00:00
parent 2f1b0451d5
commit bca4b12aef

View file

@ -5,6 +5,8 @@ Macros and conversion functions for InstallOptions
*/ */
!include LogicLib.nsh
!macro INSTALLOPTIONS_FUNCTION_READ_CONVERT !macro INSTALLOPTIONS_FUNCTION_READ_CONVERT
!insertmacro INSTALLOPTIONS_FUNCTION_IO2NSIS "" !insertmacro INSTALLOPTIONS_FUNCTION_IO2NSIS ""
!macroend !macroend
@ -34,29 +36,30 @@ Macros and conversion functions for InstallOptions
Exch $0 ; The source Exch $0 ; The source
Push $1 ; The output Push $1 ; The output
Push $2 ; Temporary char Push $2 ; Temporary char
Push $3 ; Length
Push $4 ; Loop index
StrCpy $1 "" ; Initialise the output StrCpy $1 "" ; Initialise the output
loop: StrLen $3 $0
StrCpy $2 $0 1 ; Get the next source char IntOp $3 $3 - 1
StrCmp $2 "" done ; Abort when none left
StrCpy $0 $0 "" 1 ; Remove it from the source ${For} $4 0 $3
StrCmp $2 "\" "" +3 ; Back-slash? StrCpy $2 $0 1 $4
StrCpy $1 "$1\\" ${If} $2 == '\'
Goto loop StrCpy $2 '\\'
StrCmp $2 "$\r" "" +3 ; Carriage return? ${ElseIf} $2 == '$\r'
StrCpy $1 "$1\r" StrCpy $2 '\r'
Goto loop ${ElseIf} $2 == '$\n'
StrCmp $2 "$\n" "" +3 ; Line feed? StrCpy $2 '\n'
StrCpy $1 "$1\n" ${ElseIf} $2 == '$\t'
Goto loop StrCpy $2 '\t'
StrCmp $2 "$\t" "" +3 ; Tab? ${EndIf}
StrCpy $1 "$1\t" StrCpy $1 $1$2
Goto loop ${Next}
StrCpy $1 "$1$2" ; Anything else
Goto loop
done:
StrCpy $0 $1 StrCpy $0 $1
Pop $4
Pop $3
Pop $2 Pop $2
Pop $1 Pop $1
Exch $0 Exch $0
@ -78,39 +81,40 @@ Macros and conversion functions for InstallOptions
Exch $0 ; The source Exch $0 ; The source
Push $1 ; The output Push $1 ; The output
Push $2 ; Temporary char Push $2 ; Temporary char
Push $3 ; Length
Push $4 ; Loop index
StrCpy $1 "" ; Initialise the output StrCpy $1 "" ; Initialise the output
loop: StrLen $3 $0
StrCpy $2 $0 1 ; Get the next source char IntOp $3 $3 - 1
StrCmp $2 "" done ; Abort when none left
StrCpy $0 $0 "" 1 ; Remove it from the source ${For} $4 0 $3
StrCmp $2 "\" +3 ; Escape character? StrCpy $2 $0 2 $4
StrCpy $1 "$1$2" ; If not just output ${If} $2 == '\\'
Goto loop StrCpy $2 '\'
StrCpy $2 $0 1 ; Get the next source char IntOp $4 $4 + 1
StrCpy $0 $0 "" 1 ; Remove it from the source ${ElseIf} $2 == '\r'
StrCmp $2 "\" "" +3 ; Back-slash? StrCpy $2 '$\r'
StrCpy $1 "$1\" IntOp $4 $4 + 1
Goto loop ${ElseIf} $2 == '\n'
StrCmp $2 "r" "" +3 ; Carriage return? StrCpy $2 '$\n'
StrCpy $1 "$1$\r" IntOp $4 $4 + 1
Goto loop ${ElseIf} $2 == '\t'
StrCmp $2 "n" "" +3 ; Line feed? StrCpy $2 '$\t'
StrCpy $1 "$1$\n" IntOp $4 $4 + 1
Goto loop ${EndIf}
StrCmp $2 "t" "" +3 ; Tab? StrCpy $2 $2 1
StrCpy $1 "$1$\t" StrCpy $1 $1$2
Goto loop ${Next}
StrCpy $1 "$1$2" ; Anything else (should never get here)
Goto loop
done:
StrCpy $0 $1 StrCpy $0 $1
Pop $4
Pop $3
Pop $2 Pop $2
Pop $1 Pop $1
Exch $0 Exch $0
FunctionEnd FunctionEnd
!macroend !macroend