简体   繁体   English

如何在NSIS中的MUI_PAGE_INSTFILES上显示自定义文本

[英]How to display a custom text on MUI_PAGE_INSTFILES in NSIS

I am beginner in NSIS, and I want to display the custom text in MUI_PAGE_INSTFILES page as I have two options in Components page 1. Installation and 2. UnInstallation. 我是NSIS的初学者,我想在MUI_PAGE_INSTFILES页面中显示自定义文本,因为在“组件”页面1.安装和2.卸载中有两个选项。

So when I choose Below options I am expecting the corresponding text in MUI_PAGE_INSTFILES page. 因此,当我选择“以下选项”时,我希望在MUI_PAGE_INSTFILES页面中有相应的文本。

  1. For Installation Option the text should be "Installation completed" 对于“安装选项”,文本应为“安装完成”
  2. For UnInstallation Option the text should be "UnInstallation Completed" 对于“卸载选项”,文本应为“卸载完成”

Thanks in advance for your help on this. 在此先感谢您的帮助。

The CompletedText attribute supports variables: CompletedText属性支持变量:

var mycompletedtext
var myfinishsubtext
CompletedText $mycompletedtext

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_COMPONENTS
!define MUI_INSTFILESPAGE_FINISHHEADER_TEXT "$mycompletedtext"
!define MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT "$myfinishsubtext"
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"

Section Installer
StrCpy $mycompletedtext "Installation completed"
StrCpy $myfinishsubtext "Something something"
SectionEnd

Section Uninstaller
StrCpy $mycompletedtext "UnInstallation Completed"
StrCpy $myfinishsubtext "Bye bye"
SectionEnd

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

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