如何跳过 NSIS“组件”?页?
我正在使用 NSIS 为只有一个可安装组件的 Java 应用程序创建安装程序(使用“现代”UI)。在这种情况下向用户显示“组件”页面似乎很愚蠢。我怎样才能隐藏该页面?我尝试在我的脚本中将其注释掉,如下所示:
...
!insertmacro MUI_PAGE_LICENSE "..\..\..\src\main\nsis\Readme.txt"
;!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
...
但这导致了各种可怕的警告(尽管安装程序似乎确实有效):
[MAKENSIS] warning: unknown variable/constant "mui.ComponentsPage.DescriptionText" detected, ignoring (macro:MUI_DESCRIPTION_BEGIN:4)
[MAKENSIS] warning: unknown variable/constant "mui.ComponentsPage.DescriptionText" detected, ignoring (macro:MUI_DESCRIPTION_BEGIN:5)
[MAKENSIS] warning: unknown variable/constant "mui.ComponentsPage.DescriptionText.Info" detected, ignoring (macro:MUI_DESCRIPTION_BEGIN:6)
[MAKENSIS] warning: unknown variable/constant "mui.ComponentsPage.DescriptionText" detected, ignoring (macro:MUI_DESCRIPTION_BEGIN:6)
[MAKENSIS] warning: unknown variable/constant "mui.ComponentsPage.DescriptionText" detected, ignoring (macro:MUI_DESCRIPTION_TEXT:6)
[MAKENSIS] warning: unknown variable/constant "mui.ComponentsPage.DescriptionText" detected, ignoring (macro:MUI_DESCRIPTION_TEXT:7)
[MAKENSIS] warning: unknown variable/constant "mui.ComponentsPage.DescriptionText" detected, ignoring (macro:MUI_DESCRIPTION_TEXT:8)
我发现了一个 关于跳过页面的 NSIS wiki 条目,但无法弄清楚它的头尾。
I'm using NSIS to create the installer (with the "Modern" UI) for a Java application that only has one installable component. It seems silly to show the user the "components" page in this scenario. How can I suppress that page? I tried commenting it out in my script as follows:
...
!insertmacro MUI_PAGE_LICENSE "..\..\..\src\main\nsis\Readme.txt"
;!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
...
But that led to all sorts of scary warnings (although the installer does seem to work):
[MAKENSIS] warning: unknown variable/constant "mui.ComponentsPage.DescriptionText" detected, ignoring (macro:MUI_DESCRIPTION_BEGIN:4)
[MAKENSIS] warning: unknown variable/constant "mui.ComponentsPage.DescriptionText" detected, ignoring (macro:MUI_DESCRIPTION_BEGIN:5)
[MAKENSIS] warning: unknown variable/constant "mui.ComponentsPage.DescriptionText.Info" detected, ignoring (macro:MUI_DESCRIPTION_BEGIN:6)
[MAKENSIS] warning: unknown variable/constant "mui.ComponentsPage.DescriptionText" detected, ignoring (macro:MUI_DESCRIPTION_BEGIN:6)
[MAKENSIS] warning: unknown variable/constant "mui.ComponentsPage.DescriptionText" detected, ignoring (macro:MUI_DESCRIPTION_TEXT:6)
[MAKENSIS] warning: unknown variable/constant "mui.ComponentsPage.DescriptionText" detected, ignoring (macro:MUI_DESCRIPTION_TEXT:7)
[MAKENSIS] warning: unknown variable/constant "mui.ComponentsPage.DescriptionText" detected, ignoring (macro:MUI_DESCRIPTION_TEXT:8)
I found an NSIS wiki entry about skipping pages, but couldn't make head nor tail of it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要从脚本中删除组件描述宏(MUI_FUNCTION_DESCRIPTION_BEGIN、MUI_DESCRIPTION_TEXT、MUI_FUNCTION_DESCRIPTION_END)
You need to remove the component description macro's from your script (MUI_FUNCTION_DESCRIPTION_BEGIN, MUI_DESCRIPTION_TEXT, MUI_FUNCTION_DESCRIPTION_END)