如何跳过 NSIS“组件”?页?

发布于 2024-09-30 13:21:13 字数 1430 浏览 9 评论 0原文

我正在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

骷髅 2024-10-07 13:21:13

您需要从脚本中删除组件描述宏(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)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文