【问题标题】:Inno Setup setup file name append AppVersionInno Setup 安装文件名追加 AppVersion
【发布时间】:2018-03-20 07:14:43
【问题描述】:

如何将AppVersion 附加到setup.exe 文件中?

也就是说,如何将输出文件名设为sample-setup-1.4.2.0.exe

[Setup]
AppName= {#GetStringFileInfo("Sample.exe", "ProductName")}
AppVersion= {#GetStringFileInfo("Sample.exe", "FileVersion")}

OutputBaseFilename=setup

【问题讨论】:

    标签: inno-setup


    【解决方案1】:

    两个宝贵的经验是;

    1. Lesson 1:内联函数应该用作{#FunctionName(...)}
    2. Lesson 2:使用SetupSetting函数调用[Setup]字段中的变量。

    有了以上信息,我们就可以把sample-setup-1.0.0.0写成下面的样子了;

    OutputBaseFilename=sample-setup-{#SetupSetting("AppVersion")}
    

    同样,我们可以附加日期时间;

    OutputBaseFilename=sample-setup-{#SetupSetting("AppVersion") + GetDateTimeString('dd-mm-yyyy hh-nn-ss', '-', ':')}
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-04-21
      • 2013-03-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多