C ++可再发行组件包WIX [英] C++ Redistributable package with WIX

查看:279
本文介绍了C ++可再发行组件包WIX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我写了一个code使用了一些微软的SQL Server的DLL,这些DLL取决于一些C ++库。最初,code是不工作的客户机上,但是当我安装的C ++再发行组件包它能正常工作。

So, I wrote a code which uses some Microsoft Sql server dlls, these dlls depends on some C++ libraries. Initially the code was not working on the client's machine but when I installed C++ Redistributable Package it worked fine.

我的问题是我怎么才能安装这些依赖关系以及我的code。我使用WIX安装软件。

My question is how can I install these dependencies along with my code. I am using WIX to install the software.

谢谢, 阿里

推荐答案

做到这一点:

首先获得C ++可再发行的合并模块(MSM文件)。通常他们是合并模块文件夹内( C:\程序文件\ Common Files文件\合并模块)(为Win 64 C:\ Program Files文件(x86)的\ Common Files文件\合并模块)。他们的名字是基于架构(32/64位)和VC ++版本。

First get the merge modules of C++ redistributables (MSM files). Usually they are inside the Merge Modules folder (c:\ProgramFiles\Common Files\Merge Modules) (for win x64 C:\Program Files (x86)\Common Files\Merge Modules). Their name is based on architecture (32/64 bit) and VC++ version.

< D​​irectoryRef> 标记为你的目标目录中添加<合并> 节点,这些属性

In the <DirectoryRef> tag for your target directory add a <Merge> node with these attributes:

<DirectoryRef>
    <Merge
        Id="MSVCRedist" DiskId="1" Language="0"
        SourceFile="Microsoft_VC90_CRT_x86.msm"/>
</DirectoryRef>

添加&LT;特征&GT;

<Feature
    Id="VCRedist" AllowAdvertise="no" Display="hidden" Level="1"
    Title="Visual C++ 9.0 Runtime"/>

添加引用&LT; MergeRef&GT; 至previous加入&LT;合并&GT; 部分内&LT;特征&GT; 定义:

Add the reference <MergeRef> to the previous added <Merge> section inside the <Feature> definition:

<MergeRef Id="MSVCRedist"/>

这个例子已提取从这里

这篇关于C ++可再发行组件包WIX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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