简体   繁体   English

将许可证信息添加到NSIS安装程序

[英]Adding License information to NSIS installer

We distribute the software created by my group via Windows installers generated via NSIS. 我们通过NSIS生成的Windows安装程序分发由我的小组创建的软件。 We generate our NSIS configuration files from a python script written by a developer who no longer works with us, so we currently do not have anyone on staff who knows how to write NSIS config files. 我们是从不再与我们合作的开发人员编写的python脚本生成NSIS配置文件的,因此我们目前没有任何人知道如何编写NSIS配置文件。 I have been tasked with modifying this script to add a section to the installer that displays our licensing information prior to performing the actual install. 我的任务是修改此脚本,以在安装程序中添加一个部分,以在执行实际安装之前显示我们的许可信息。

What would such a section in a NSIS config file look like? NSIS配置文件中的此类部分是什么样的?

Depends on how the installer is structured and what NSIS functionality it uses. 取决于安装程序的结构和使用的NSIS功能。

For example, if it uses MUI ("modern user interface") macros, then it could be as simple as adding 例如,如果它使用MUI(“现代用户界面”)宏,则它就像添加

!insertmacro MUI_PAGE_LICENSE "License.txt"

Somewhere in the text. 文字中的某处。 Most likely between some other pages in MUI_PAGE stuff. 最有可能在MUI_PAGE其他页面之间。 For example, one installer I'm working on at the moment has this: 例如,我目前正在使用的一个安装程序具有以下功能:

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "..\..\Licenses\License.txt"
!insertmacro MUI_PAGE_DIRECTORY

This results in welcome page, followed by license page, followed by "choose directory" page. 结果是出现欢迎页面,然后是许可证页面,然后是“选择目录”页面。

For more options, read NSIS MUI documentation. 有关更多选项,请阅读NSIS MUI文档。

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

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