[英]NSIS concatenate string with slash
I'm trying to build a string with this expression bla://${foo}/bar
where ${foo} == "hostname"
. 我正在尝试使用此表达式bla://${foo}/bar
构建一个字符串,其中${foo} == "hostname"
。 The expected result is bla://hostname/bar
but I get http://${foo}/bar
instead. 预期的结果是bla://hostname/bar
但我却获得了http://${foo}/bar
。 So I figure there is something special about the combination /$
but I can't figure it out. 因此,我认为/$
组合有一些特殊之处,但我无法弄清楚。
Thanks for your help 谢谢你的帮助
/$
is not special but a define that does not exist ends up as ${definename}
. /$
不是特别的,但不存在的定义最终将是${definename}
。
DetailPrint "${foo}" ; Prints ${foo}
!define foo example.com
DetailPrint "${foo}" ; Prints example.com
All defines are resolved at compile time, if this hostname is something the user could configure on a custom page you need to use a NSIS variable... 所有定义都在编译时解析,如果此主机名是用户可以在自定义页面上配置的名称,则需要使用NSIS变量...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.