如何将AppVersion
附加到setup.exe
文件?
换句话说,如何输出文件名sample-setup-1.4.2.0.exe
?
[Setup]
AppName= {#GetStringFileInfo("Sample.exe", "ProductName")}
AppVersion= {#GetStringFileInfo("Sample.exe", "FileVersion")}
OutputBaseFilename=setup
答案 0 :(得分:2)
有两个宝贵的经验教训;
{#FunctionName(...)}
[Setup]
函数调用SetupSetting
字段中的变量。根据以上信息,我们可以将sample-setup-1.0.0.0
设为如下;
OutputBaseFilename=sample-setup-{#SetupSetting("AppVersion")}
同样,我们可以附加datetime;
OutputBaseFilename=sample-setup-{#SetupSetting("AppVersion") + GetDateTimeString('dd-mm-yyyy hh-nn-ss', '-', ':')}