使用Inno设置从旧版本更新图标 [英] Update icon from older version with inno setup
问题描述
我的图标安装为
Name: "{commondesktop}\TestApp {#VERSION}"; Filename: "{app}\TestApp.exe"; WorkingDir: "{app}"; IconFilename: "{app}\TestApp.ico";
如果我更新了工具(在InitializeSetup()中选中),则旧图标在桌面上仍然可用(旧版本号),新图标也可以使用!
and if I update my tool (checked in InitializeSetup()) the old icon is still available on desktop (old version number) and the new one also!
如果工具将被更新而不是未卸载,是否有标记来删除图标?
Is there a flag to remove the icon if the tool will be updated and not uninstalled?
thx
推荐答案
这是通常不应该在图标名称中包含版本号的原因之一.
This is one of the reasons why you should generally not include the version number in your icon names.
但是,您可以告诉Inno在以后的安装中删除它们,如下所示:
You can, however, tell Inno to delete these in a later install like so:
[InstallDelete]
Type: files; Name: "{commondesktop}\TestApp 5.2.lnk"
请注意,最佳做法是单独命名已发布的所有先前版本,而不是使用通配符. (这是因为通配符可能会意外删除用户自己创建的其他图标,他们对此不会感到满意.)
Note that it is best practice to individually name all the previous versions that you have released, instead of using a wildcard. (This is because a wildcard might accidentally delete other icons that the user has created themselves, which they won't be happy about.)
这篇关于使用Inno设置从旧版本更新图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!