Visual C ++可重新分发,而不使用VCRedist_x86.exe [英] Visual C++ Redistributables without using VCRedist_x86.exe

查看:288
本文介绍了Visual C ++可重新分发,而不使用VCRedist_x86.exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在一个受到严格限制的环境中开发,但是开发人员也在严格控制。



VCRedist_x86.exe - 4Mb可重新分发 - 没有乐趣(转移四个小时)。我真的更喜欢重新分发MFC90.dll,msvcm90.dll,msvcp90.dll和msvcr90.dll - 这更像是2Mb。但是,重新分发Visual C ++文件说:


不支持重新分发没有清单构建的C / C ++应用程序。没有清单的C / C ++应用程序不能使用Visual C ++库,将应用程序绑定到这些库。有关详细信息,请参阅选择部署方法


我将原始的DLL复制到程序的工作目录中似乎没有
在这个勇敢的新世界中工作的清单。



我的下一个猜测是将填充文件所需的注册表项自己填充到WinSxS目录并自己填充(而不是使用4 meg程序)



该软件经常更新,因此DLL非常适用于静态链接。 [/ edit]



如何成功分发必要的文件,但保持开销?

解决方案

我们使用这个:如何:部署VC2008应用程序而不安装vcredist_x86.exe



基本上




  • 不要在您的exe文件中嵌入清单。

  • 将C ++ DLL及其清单复制到应用程序的目录中。

  • 从所有清单(您和Microsoft的)中删除publicKeyToken。

  • 如有必要,请更改应用程序的清单文件中的版本信息,以匹配Microsoft清单文件(反之亦然)


I'm developing in an environment that is severely constrained, but the developers also have tight control over.

VCRedist_x86.exe - A 4Mb redistributable - is no fun (four hours to transfer). I'd really prefer to just redistribute MFC90.dll, msvcm90.dll, msvcp90.dll and msvcr90.dll - that's more like 2Mb. However, Redistributing Visual C++ Files says:

It is not supported to redistribute C/C++ applications that are built without a manifest. Visual C++ libraries cannot be used by C/C++ applications without a manifest binding the application to these libraries. For more information, see Choosing a Deployment Method.

My original plan of copying the DLLs into the program's working directory doesn't seem to work in this brave new world of manifests.

My next guess is to bodge up the registry entries required to populate the files into the WinSxS directory and populate it myself (rather than using the 4 meg program).

[edit] The software is frequently updated, so DLLs are strongly preferred to static linking. [/edit]

How can I sucessfully distribute the necessary files but keep the overhead down?

解决方案

We use this: Howto: Deploy VC2008 apps without installing vcredist_x86.exe

Essentially

  • Don't embed a manifest in your exe files.
  • Copy the C++ DLLs and their manifests to your app's directory.
  • Remove the "publicKeyToken" from all manifests (yours and Microsoft's).
  • If necessary, change the version info in your app's manifest files to match the Microsoft manifest files (or vice versa)

这篇关于Visual C ++可重新分发,而不使用VCRedist_x86.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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