【问题标题】:automated build inno setup error自动构建 inno 设置错误
【发布时间】:2011-10-11 19:30:08
【问题描述】:

这个问题是关于直接从程序集中获取版本。我已按照this post的指示进行操作

我的脚本如下所示。

#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)

但是在编译脚本时会抛出以下错误

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.**

我在这里缺少什么?

【问题讨论】:

  • 您在此处的脚本摘录和您链接到的问题的公认答案都没有在第 12 行引用 VerStr。您可以发布您正在使用的完整脚本吗?

标签: installation inno-setup


【解决方案1】:

GetFileVersion() 正在返回一个空白字符串,因为它找不到 SrcApp 路径。 尝试指定一个完全限定的路径或使用:

#define SrcApp AddBackslash(SourcePath) + "Keyboard Trader.exe"

【讨论】:

  • 非常感谢。有效。顺便问一下,您是如何意识到它返回空字符串的?
  • 我运行它并给它一个有效的文件名进行测试,它工作。删除路径会导致同样的错误。
  • 很抱歉再次打扰您,但是您如何调试脚本?我在那里有一个断点,但我根本无法获取变量值。因为当引擎在断点处停止时,评估常量仍然被禁用。
  • 您不能调试/单步调试 ISPP,因为它在任何编译之前就已完成。 Inno IDE 只能调试运行时[Code]
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-11-25
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多