gpt4 book ai didi

inno-setup - 需要最低 Inno Setup 编译器版本

转载 作者:行者123 更新时间:2023-12-04 12:21:54 25 4
gpt4 key购买 nike

我想知道是否可以打印自定义错误消息,以防有人尝试使用不受支持的 Inno Setup 版本编译 .iss 文件。这将比例如让编译器告诉您“WizardStyle 指令未知”(或类似的东西)更有帮助。我检查了文档的“常量”部分,但在那里找不到编译器版本号。

最佳答案

使用 preprocessor和它的 Ver predefined variable #if #error 指令。实际上是 #error 的文档指令准确显示您需要的代码:

#if VER < EncodeVer(5,4,2)
#error A more recent version of Inno Setup is required to compile this script (5.4.2 or newer)
#endif

关于inno-setup - 需要最低 Inno Setup 编译器版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68465051/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com