Visual Studio Installer项目:安装程序和应用程序图标 [英] Visual Studio Installer Project: Installer and Application Icons

查看:1185
本文介绍了Visual Studio Installer项目:安装程序和应用程序图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序中有一个图标,我已将其嵌入资源文件中,并用作应用程序的主图标。到目前为止一直很好。

I've got an icon for one of my applications, which I've embedded in a resource file and is used as the main icon for the application. So far so good.

但是,我想对安装程序项目使用相同的图标,以及安装程序在开始菜单中放置的快捷方式。我可以设置安装程序包本身的图标,但前提是我在主应用程序文件夹中将图标添加为.ico文件。

However, I want to use the same icon for the installer project, and for the shortcut that the installer places in the Start Menu. I can set the icon for the installer package itself, but only if I add the icon as an .ico file in the main application folder.

在资源文件中嵌入图标的重点是,我没有在Program Files中浮动的ICO文件。我无法从安装程序项目中的主项目访问资源文件 - 是否有一些我不知道的技巧?

The whole point of embedded the icon in a resource file is so that I don't have an ICO file floating around in Program Files. I can't access the resource file from the main project in the installer project - is there some trick that I am missing?

其次,即使我包含一个图标主文件夹,如果我将菜单快捷方式设置为使用它,则不会 - 在安装程序后,它会在IDE和菜单中显示标准快捷方式图标。再次,我在这里错过了一个技巧吗?

Secondly, even if I include an icon in the main folder, if I set the menu short cut to use it, it doesn't - it shows the standard shortcut icon both in the IDE and in the menu after the program has been installed. Again, am I missing a trick here?

推荐答案

我现在没时间测试它,但是当你浏览图标时您将看到一个对话框,可让您选择将在目标计算机上的项目。在对话框的底部有一个下拉列表,可让您选择文件类型。如果选择EXE(或可能是DLL),则会显示主项目输出。选择后,您可以选择项目输出中包含的任何嵌入式图标。

I have no time to test it now, but when you browse for an icon you will be presented with a dialog that lets you choose items that will be on the target computer. At the bottom of the dialog is a dropdown that lets you select the file type. If you choose EXE (or possibly DLL), then you primary project output(s) will show. Once you select that you can chose any embedded icon that your project output contains.

(我没有测试的内容:如果图标实际显示在您安装软件后测试计算机。)

(What I did not test: If the icons actually show after you installed your software on a test computer.)

这篇关于Visual Studio Installer项目:安装程序和应用程序图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆