简体   繁体   English

如何将Microsoft Visual C ++ 2010 SP1与我的Visual Studio安装程序项目一起打包

[英]How do I package Microsoft Visual C++ 2010 SP1 with my Visual Studio installer project

I'm trying to build a setup installer for my application. 我正在尝试为我的应用程序构建安装程序安装程序。 One of the things that need to be installed is Microsoft Visual C++ 2010 Service Pack 1 to support some of my dlls I use. 需要安装的东西之一是Microsoft Visual C++ 2010 Service Pack 1以支持我使用的某些dll。

Maybe I missing something but with everything I'm reading I need to be using a Merge Module to help me install Microsoft Visual C++ 2010 Service Pack 1 as a dependency. 也许我错过了一些东西,但是我正在阅读的所有东西都需要使用Merge Module来帮助我将Microsoft Visual C++ 2010 Service Pack 1为依赖项。 I read somewhere that I should be using Merge Modules . 我在某处阅读了应该使用合并模块的信息 After trying to add a Merge Module to my setup project I ran into this page telling me that I should NOT use merge modules if I plan on updating dlls and servicing the product... 在尝试将合并模块添加到我的安装项目后,我遇到了这个页面,告诉我如果我打算更新dll和维修产品,则不应该使用合并模块...

Seeing as how I intend to provide updates to this product often I was going to go the route suggested in the aforementioned link we recommend that you install a Visual C++ Redistributable Package . 鉴于我打算经常向该产品提供更新,因此我打算遵循上述链接中we recommend that you install a Visual C++ Redistributable Package的路线, we recommend that you install a Visual C++ Redistributable Package So I have the x86 and x64 redistributable packages, how do I package them with my Visual Studio install project? 因此,我有x86和x64可再发行组件包,如何将它们与Visual Studio安装项目打包在一起?

It depends on the technology you are using to create your installer, but the C++ runtimes are simply a set of two executable (one for each bitness) that you can include as part of your installer. 这取决于您用来创建安装程序的技术,但是C ++运行时只是一组两个可执行文件(每个位一个),您可以将其包含在安装程序中。 You can then start the executable in silent mode using the /quiet parameter as part of your installation process. 然后,可以在安装过程中使用/quiet参数以静默方式启动可执行文件。

Those installers are (mostly) smart enough to only install if the component is not already installed. 这些安装程序(大多数)足够聪明,仅在尚未安装组件的情况下安装。

In a VS setup project these things are usually installed by configuring prerequisites for your setup, so it might be there, at least the base redistributable exe for Visual C++. 在VS安装程序项目中,通常通过配置安装程序的先决条件来安装这些内容,因此它可能就在其中,至少是Visual C ++的基本可再发行文件exe。 However a Visual Studio installer project that ships VC++ runtime redistributables can't predict or supply a service pack version of the prerequisites to install. 但是,附带VC ++运行时可再发行文件的Visual Studio安装程序项目无法预测或提供要安装的必备软件的Service Pack版本。 Sometimes the Windows SDK/Kit will update the prerequisites for your setup project - for example the 8.1A SDK installs \\Bootstrapper\\Packages with product.xml updates for SQL CLR types. 有时Windows SDK / Kit会更新您的安装项目的先决条件-例如8.1A SDK使用SQL CLR类型的product.xml更新安装\\ Bootstrapper \\ Packages。 So you may find updates for C++ runtimes lurking in some of the SDKs, except that Microsoft started deprecating installer projects at that time. 因此,您可能会在某些SDK中找到针对C ++运行时的更新,但Microsoft当时已开始弃用安装程序项目。 That's the history and a long-winded way of saying you may not find anything. 这就是历史,and不休地说你可能什么也找不到。

People have used WiX for this because the WiX bootstrapper has support for detecting and installing many prerequisites like this. 人们之所以使用WiX,是因为WiX引导程序支持检测和安装许多类似的先决条件。 Note that you do not need to build your MSI with WiX, just the bootstrapper that will install prerequisites then your MSI file. 请注意,您不需要使用WiX构建MSI,只需使用引导程序即可安装必备软件,然后再安装MSI文件。 Here's a start: 这是一个开始:

How to include prerequisites with msi/Setup.exe in WIX 如何在WIX中使用msi / Setup.exe包含先决条件

Also, you need one MSI per architecture. 此外,每个架构需要一个MSI。 If your app is all 32-bit then you just need one install for both 32- and 64-bit OS versions. 如果您的应用程序全部为32位,则只需安装32位和64位OS版本即可。 If your app runs native 64-bit you'll need a separate 64-bit install, and you won't package both x86 and x64 redistributables in one install. 如果您的应用运行本机64位,则需要单独进行64位安装,并且一次安装中不会打包x86和x64可再发行组件。

https://blogs.msdn.microsoft.com/heaths/2008/01/15/different-packages-are-required-for-different-processor-architectures/ https://blogs.msdn.microsoft.com/heaths/2008/01/15/different-packages-are-required-for-different-processor-architectures/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM