如何将 NSIS 与构建系统集成并支持版本控制
我有一个 nsis 脚本来创建 .NET 中工具的安装程序包,并且工作正常。
问题是我想将它集成到我的构建系统中(当前使用 NANT,但正在使用ironruby 迁移到 rake)
该产品的版本存储在一个 txt 文件中,该文件被读取以生成程序集信息,当前构建系统自动更新构建版本号,但主要和次要版本号是手动更改的。
我希望脚本生成一个安装程序可执行文件,其版本号包含在安装程序文件名中,也包含在安装程序屏幕中,但我不知道如何将变量作为参数传递给 NSIS 文件。
我正在考虑的一个解决方案是创建一个带有一些占位符的 NSIS 脚本模板,并使用 ruby(尽管 rake)用适当的版本号更改这些占位符,然后生成安装程序,但对我来说似乎是一个肮脏的黑客。
有人有更好的建议吗?
I have a nsis script to create an installer package of a tool in .NET, and works fine.
The problem is that I want to integrate it in my build system (currently using NANT, but migrating to rake using ironruby)
The version for the product is stored in a txt file which is read to generate the assemblyinfo, currently the build system autoupdates the build version number, but major and minor numbers are changed by hand.
I want the script to generate an installer executable with the version number in the installers filename, and also in the installer screens, but I don't know how to pass variables as arguments to the NSIS file.
A solution I'm considering is create a template of the NSIS script with some placeholders, and using ruby (though rake) to change those place holders with the appropiate version numbers, and then generate the installer, but seems like a dirty hack to me.
Does anyone has a better suggestion?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想说你有两个选择:
I'd say you have two options: