nsis中的复合字符串比较

nsis中的复合字符串比较,nsis,Nsis,如何在NSIS中进行复合字符串比较 基本上类似于:if(str1==”| | str2==”)… strcpy $1 "c:\foo" strcpy $2 "d:\bar" ${if} strcmp $1 "" ${orif} strcmp $2 "" MessageBox MB_OK "one or both are empty" ${else} messagebox mb_ok "both are not" ${endif} SectionEnd StrCmp是NSIS字符串

如何在NSIS中进行复合字符串比较

基本上类似于:
if(str1==”| | str2==”)…

strcpy $1 "c:\foo"
strcpy $2 "d:\bar"

${if} strcmp $1 ""
${orif} strcmp $2 ""
   MessageBox MB_OK "one or both are empty"
${else}
   messagebox mb_ok "both are not"
${endif}
SectionEnd

StrCmp
是NSIS字符串比较的核心底层指令,但在使用LogicLib时,必须使用正确的运算符:
==
=
S==
S=(它们都列在LogicLib.nsh的顶部,不区分大小写的操作符在内部使用
StrCmp

!include LogicLib.nsh
Section
StrCpy $1 "c:\foo"
StrCpy $2 "d:\bar"

${If} $1 == ""
${OrIf} $2 == ""
   MessageBox MB_OK "one or both are empty"
${Else}
   MessageBox MB_OK "both are not"
${EndIf}
SectionEnd