我编写了一个应用程序及其WiX安装程序,并使用subversion将其置于版本控制之下.当WiX安装程序构建时,我希望其版本号是应用程序的当前构建版本.我该如何做到这一点?我使用c#来编写应用程序代码.
NB我正在使用ccnet来构建这个项目
我想在我的Inno Setup脚本中从我的application.exe中读取这三个值.
[assembly: AssemblyCompany("My Company")]
[assembly: AssemblyProduct("My Great Application")]
[assembly: AssemblyFileVersion("9.3.2")]
Run Code Online (Sandbox Code Playgroud)
有谁知道如何实现这一目标?
我知道我可以使用GetFileVersion获取最后一个("path/to/greatapp.exe") 前两个有类似的东西吗?
这个问题是关于直接从汇编获取版本.我已按照这篇文章的说明进行操作
我的脚本如下所示.
#define MyAppName "Keyboard Trader"
#define SrcApp "Keyboard Trader.exe"
#define FileVerStr GetFileVersion(SrcApp)
#define StripBuild(str VerStr) Copy(VerStr, 1, RPos(".", VerStr)-1)
#define AppVerStr StripBuild(FileVerStr)
Run Code Online (Sandbox Code Playgroud)
但是在编译脚本时它会抛出Error
Compile started: Tuesday, Oct 11 2011 at 01:15 AM
---
Compiling script with Inno Setup 5.4.2 (a)
---
[ISPP] Preprocessing.
---------------------
Compile Error!
Line: 12
**Error: [ISPP] Actual parameter VerStr is not of the declared type.**
Run Code Online (Sandbox Code Playgroud)
我在这里缺少什么?