InstallShield 2009不同版本的不同快捷方式图标

时间:2021-09-14 05:52:59

I have an InstallShield 2009 MSI project with a couple of shortcuts. I would like to change which icon is used for these shortcuts depending on the release. Each release is for a separate country (and therefore language), and some have a different icon. Is it possible to do this and how?

我有一个带有几个快捷方式的InstallShield 2009 MSI项目。我想根据版本更改哪些图标用于这些快捷方式。每个版本都针对一个单独的国家/地区(因此也就是语言),有些则有不同的图标。是否可以这样做以及如何做?

1 个解决方案

#1


1  

Here are a couple of ideas for approaches; neither is perfect. First, since you indicate different languages, it may be best to separate these shortcuts into a component per language. Then you can use the Languages setting on the component in conjunction with a language selection on each release to filter down to the one you want.

以下是一些方法的想法;既不完美。首先,由于您指明了不同的语言,因此最好将这些快捷方式分成每种语言的组件。然后,您可以将组件上的“语言”设置与每个版本上的语言选择结合使用,以过滤到所需的语言。

The second approach is much looser and is probably unmaintainable without an automated build process. You could carefully tweak the path variable reference used by the shortcut's icon, and override the value used for that path variable in each build. Thus each build would reference a different file.

第二种方法更宽松,如果没有自动构建过程,可能无法维护。您可以仔细调整快捷方式图标使用的路径变量引用,并覆盖每个构建中用于该路径变量的值。因此,每个构建将引用不同的文件。

You may also want to check out the MUI options if you can take on a Windows Installer 4.0/4.5 dependency, but I don't see icon support there. The MUI support lets you specify a resource index into a DLL which will be used to pull the appropriate language's value. But these are just for Display Name and Description equivalents.

如果您可以采用Windows Installer 4.0 / 4.5依赖项,您可能还想查看MUI选项,但我没有看到图标支持。 MUI支持允许您在DLL中指定资源索引,该DLL将用于提取相应语言的值。但这些仅适用于显示名称和描述等效项。

#1


1  

Here are a couple of ideas for approaches; neither is perfect. First, since you indicate different languages, it may be best to separate these shortcuts into a component per language. Then you can use the Languages setting on the component in conjunction with a language selection on each release to filter down to the one you want.

以下是一些方法的想法;既不完美。首先,由于您指明了不同的语言,因此最好将这些快捷方式分成每种语言的组件。然后,您可以将组件上的“语言”设置与每个版本上的语言选择结合使用,以过滤到所需的语言。

The second approach is much looser and is probably unmaintainable without an automated build process. You could carefully tweak the path variable reference used by the shortcut's icon, and override the value used for that path variable in each build. Thus each build would reference a different file.

第二种方法更宽松,如果没有自动构建过程,可能无法维护。您可以仔细调整快捷方式图标使用的路径变量引用,并覆盖每个构建中用于该路径变量的值。因此,每个构建将引用不同的文件。

You may also want to check out the MUI options if you can take on a Windows Installer 4.0/4.5 dependency, but I don't see icon support there. The MUI support lets you specify a resource index into a DLL which will be used to pull the appropriate language's value. But these are just for Display Name and Description equivalents.

如果您可以采用Windows Installer 4.0 / 4.5依赖项,您可能还想查看MUI选项,但我没有看到图标支持。 MUI支持允许您在DLL中指定资源索引,该DLL将用于提取相应语言的值。但这些仅适用于显示名称和描述等效项。