AppVersion 未显示在 InnoSetup window 标题栏上
AppVersion not showing on InnoSetup window title bar
我正在研究一种将应用程序版本号放在我的 InnoSetup 安装程序 window 标题上的方法,我发现了这个问题:Add Version to SetupWindowTitle of Inno Setup。
在问题的评论部分,@MartinPrikryl 表示:
The %1 in SetupWindowTitle is replaced with AppVerName, which defaults
to "AppName version AppVersion". So SetupWindowTitle actually contains
AppVersion. You must have something wrong in your script.
但在我的例子中,AppVersion
属性 始终已设置,版本号从未出现在 window 标题中。我以为和我使用的语言包有关(Languages\BrazilianPortuguese.isl) 但事实证明不是。
我制作了一个简单的测试脚本来重现该行为:
[Setup]
AppName=Test
AppVersion=1.0
VersionInfoVersion=1.0
DefaultDirName=C:\Test\
我正在使用 Inno Script Studio 版本 2.2.2.32 和 Inno Setup 编译器版本 5.5.9。
当我编译那个简单的测试时,我得到了这个结果:
window 标题上没有 AppVersion
,只有 AppName
。
它可以是什么?
事实证明这只是一个 InnoSetup 版本问题(感谢@MartinPrikryl comment!)。我使用的是 InnoSetup 编译器版本 5.5.9,但当前的 6.0.5 版本可以正常工作。
实际上,这个功能是在5.6.0版本(2018-06-08)上添加的:
Inno Setup 5.6 Revision History
Change in default behavior: If [Setup] section directive DisableWelcomePage
is set to yes
(which it is by default), then the title of the wizard now includes AppVerName
instead of AppName
, in other words: it now includes the version number of the application. If WindowVisible
is set to yes
this applies to the background window instead.
无论如何,就我而言,我对结果并不完全满意,因为我的安装程序管理着其他安装程序,它被称为“Setup Manager”。使用新的 InnoSetup 版本,安装程序 window 标题变为“Setup - Setup Manager version 1.0.0.5”。
来自 'Default.isl' 文件,默认为英语:
[Messages]
SetupWindowTitle=Setup - %1
实际上我使用的是葡萄牙语,真正的安装程序名称是“Instalador MyCompany”,所以 window 标题上的文字变成了“Instalador MyCompany versão 1.0.0.5 - Instalador'.
来自 'Languages\BrazilianPortuguese.isl' 文件,巴西葡萄牙语:
[Messages]
SetupWindowTitle=%1 - Instalador
在这两种语言场景中,附加词(“Setup”或“Instalador”)太多了,因此,我将 SetupWindowTitle
属性 仅更改为 %1
:
[Messages]
SetupWindowTitle=%1
现在好了:
其他来源:
Is it possible to change the window title bar of your installer using Inno Setup?
我正在研究一种将应用程序版本号放在我的 InnoSetup 安装程序 window 标题上的方法,我发现了这个问题:Add Version to SetupWindowTitle of Inno Setup。
在问题的评论部分,@MartinPrikryl 表示:
The %1 in SetupWindowTitle is replaced with AppVerName, which defaults to "AppName version AppVersion". So SetupWindowTitle actually contains AppVersion. You must have something wrong in your script.
但在我的例子中,AppVersion
属性 始终已设置,版本号从未出现在 window 标题中。我以为和我使用的语言包有关(Languages\BrazilianPortuguese.isl) 但事实证明不是。
我制作了一个简单的测试脚本来重现该行为:
[Setup]
AppName=Test
AppVersion=1.0
VersionInfoVersion=1.0
DefaultDirName=C:\Test\
我正在使用 Inno Script Studio 版本 2.2.2.32 和 Inno Setup 编译器版本 5.5.9。
当我编译那个简单的测试时,我得到了这个结果:
window 标题上没有 AppVersion
,只有 AppName
。
它可以是什么?
事实证明这只是一个 InnoSetup 版本问题(感谢@MartinPrikryl comment!)。我使用的是 InnoSetup 编译器版本 5.5.9,但当前的 6.0.5 版本可以正常工作。
实际上,这个功能是在5.6.0版本(2018-06-08)上添加的:
Inno Setup 5.6 Revision History
Change in default behavior: If [Setup] section directive
DisableWelcomePage
is set toyes
(which it is by default), then the title of the wizard now includesAppVerName
instead ofAppName
, in other words: it now includes the version number of the application. IfWindowVisible
is set toyes
this applies to the background window instead.
无论如何,就我而言,我对结果并不完全满意,因为我的安装程序管理着其他安装程序,它被称为“Setup Manager”。使用新的 InnoSetup 版本,安装程序 window 标题变为“Setup - Setup Manager version 1.0.0.5”。
来自 'Default.isl' 文件,默认为英语:
[Messages]
SetupWindowTitle=Setup - %1
实际上我使用的是葡萄牙语,真正的安装程序名称是“Instalador MyCompany”,所以 window 标题上的文字变成了“Instalador MyCompany versão 1.0.0.5 - Instalador'.
来自 'Languages\BrazilianPortuguese.isl' 文件,巴西葡萄牙语:
[Messages]
SetupWindowTitle=%1 - Instalador
在这两种语言场景中,附加词(“Setup”或“Instalador”)太多了,因此,我将 SetupWindowTitle
属性 仅更改为 %1
:
[Messages]
SetupWindowTitle=%1
现在好了:
其他来源:
Is it possible to change the window title bar of your installer using Inno Setup?