简体   繁体   English

如何在nsis安装程序中动态插入自定义页面

[英]how to dynamically insert custom pages in nsis installer

I have installer_type variable which will have either desktop or server as its value. 我有installer_type变量,它将以desktopserver作为其值。

If the value is server then page1 should get inserted in the installer and page2 should be hidden for this installer and vice versa. 如果值为server,则应该在安装程序中插入page1,并且应该为该安装程序隐藏page2,反之亦然。

StrCmp installer_type "server" 0 +3
Page custom page1 page1Leave
Goto Done
Page custom page2 page2Leave
Done: 

Please let me know how to achieve this in .nsi file 请让我知道如何在.nsi文件中实现此目标

页面数在编译时是固定的,但是您可以在页面预回调函数中调用Abort指令以跳过页面

just insert when you want see it 只需在您想要看到它时插入

http://nsis.sourceforge.net/Docs/Chapter2.html#2.3.2 http://nsis.sourceforge.net/Docs/Chapter2.html#2.3.2

example

if you want to see directory then license: 如果您想查看目录,然后许可:

Page directory
Page license

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

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