繁体   English   中英

insertmacro被调用两次

[英]insertmacro is getting called twice

嗨,我有下面的代码

文件:setup.nsi

Function .onInit
    Call functionXXX
FunctionEnd

档案:Utils.nsh

!define someFunc "!insertmacro someFunc"
!macro someFunc source destination
    MessageBox "${source}, ${destination}"
!macroend 


Function functionXXX
    ${someFunc} "C:\MyApp\test.txt" "C:\MyApp\backup\test.txt"
FunctionEnd

如果我运行脚本,宏被调用了两次,我将看到两次消息框,它们具有相同的值。 为什么会这样呢?

此处张贴的此代码无法将MessageBox两次。

必须有其他一些代码来调用它,尝试:

Function .onInit
    Messagebox mb_ok before
    Call functionXXX
    Messagebox mb_ok after
FunctionEnd

您还应该能够看到编译器输出中的所有步骤...

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM