开发者

How do I concatenate a string with the same string in NSIS?

I need to concatenate a string in NSIS that builds a new string with itself.

In C++ I would do something like this:

   if ( h == 0 )
      cout << "No errors\n\n";
   if ( e > 0 )
      err += e1;
   if ( f > 0 )
      err += e2;
   if ( g > 0 )
      err+= e3;

But in NSIS:

strcpy $1 "$1$2"
strcpy $1 "$1$3开发者_如何学Python"
strcpy $1 "$1$4"

doesn't work.

Any suggestions here would greatly be appreciated.


outfile test.exe
requestexecutionlevel user
page instfiles
section
;init strings
strcpy $1 "Hello: "
strcpy $2 foo
strcpy $3 bar
strcpy $4 baz

strcpy $1 "$1$2"
strcpy $1 "$1$3"
strcpy $1 "$1$4"
DetailPrint $1 ;prints "Hello: foobarbaz"
sectionend
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜