将许可证信息添加到NSIS安装程序 [英] Adding License information to NSIS installer

查看:62
本文介绍了将许可证信息添加到NSIS安装程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们通过NSIS生成的Windows安装程序分发由我的小组创建的软件.我们是从不再与我们合作的开发人员编写的python脚本生成NSIS配置文件的,因此我们目前没有任何人知道如何编写NSIS配置文件.我的任务是修改此脚本,以在安装程序中添加一个部分,以在执行实际安装之前显示我们的许可信息.

We distribute the software created by my group via Windows installers generated via NSIS. 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. 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.

NSIS配置文件中的此类部分是什么样的?

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.

例如,如果它使用MUI(现代用户界面")宏,那么它就像添加一样简单

For example, if it uses MUI ("modern user interface") macros, then it could be as simple as adding

!insertmacro MUI_PAGE_LICENSE "License.txt"

文本中的某处.最有可能出现在 MUI_PAGE 内容中的某些其他页面之间.例如,我目前正在使用的一个安装程序具有以下内容:

Somewhere in the text. Most likely between some other pages in MUI_PAGE stuff. 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.

有关更多选项,请阅读NSIS MUI文档.

For more options, read NSIS MUI documentation.

这篇关于将许可证信息添加到NSIS安装程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆