开发者

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

开发者 https://www.devze.com 2023-02-09 15:51 出处:网络
I need to concatenate a string in NSIS that builds a new string with itself. In C++ I would do something like this:

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

精彩评论

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

关注公众号