简体   繁体   English

NSIS MessageBox跳转偏移

[英]NSIS MessageBox jump offset

I'm not able to understand what's wrong with the below code for jumping to particular offset if MessageBox returns IDNO. 如果MessageBox返回IDNO,我无法理解下面的代码跳转到特定偏移量有什么问题。

Below code is to quit installer while IDNO is selected, but it always jumping to Goto endCurrentBlock line 下面的代码是在选择IDNO时退出安装程序,但它总是跳转到Goto endCurrentBlock

    MessageBox MB_YESNO|MB_ICONEXCLAMATION "Would you like to continue installation?" IDNO +3
    !insertmacro ShowStatus "Failed to install software"
    Goto endCurrentBlock
    Quit

If I use a absoule label for jump it's working good. 如果我使用absoule标签进行跳跃,它的效果很好。 What could be the reason? 可能是什么原因?

Jumping by offset skips x number of NSIS instructions but !insertmacro is a preprocessor instruction that might expand to zero, one or several NSIS instructions. 跳过偏移量跳过x个NSIS指令但是!insertmacro是一个预处理器指令,可能会扩展为零,一个或多个NSIS指令。

It is not recommended to combine offset jumps and !insertmacro because it can break your code just by changing the macro... 不建议组合偏移跳转和!insertmacro因为它只是通过更改宏来破坏你的代码......

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

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