How can I let the compiled script depend on something dynamic

本文详细介绍了如何使用/DNAME=value和/X nsiscommand 参数编译脚本,通过实例如ExecWait makensis.exe/DVERSION=1.2 myscript.nsi,演示了在编译过程中设置变量版本号的方法,并强调了这些标志必须在makensis命令行之前指定。

Compile your script with /DNAME=value or /X"nsis command" passed on to makensis.exe as command line arguments. The /D switch of the compiler will define NAME as value in the script. The /X switch will add "nsis command" to the top of the script.

Example:

In the compiling script:

ExecWait "makensis.exe /DVERSION=1.2 myscript.nsi"

In the compiled dynamic script:

OutFile myprog${VERSION}.exe

Note - These flags *must* be specified on a makensis command line before you specify the script name. If you have "makensis.exe myscript.nsi /DVERSION=1.2 " then VERSION will not be set.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值