将模块文件合并到不同的位置 [英] Merge module files into different locations

查看:25
本文介绍了将模块文件合并到不同的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将合并模块文件解析到两个不同的位置.可能吗?

I'd like to parse merge module files into two different locations. Is it possible?

    <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="MergeRedirectFolder">

        <Component Id="LoggerClient" Guid="*">
          <File Id="log4net" Name="log4net.dll" Source="..\..\_Release\log4net.dll" KeyPath='yes' />
          <File Id="LoggerLibrary" Name="LoggerLibrary.dll" Source="..\..\_$(var.Configuration)\LoggerLibrary.dll" />
          <File Id="app.config" Name="app.config.xml" Source="..\..\_Release\app.config.xml" />
          <File Id="msvcr110.dll" Name="msvcr110.dll" Source="c:\windows\sysWoW64\msvcr110.dll" />
        </Component>

  </Directory>
    </Directory>
</Module>



<Merge Id ="MergeModule.msm" Language ="!(loc.Lang)" SourceFile ="_$(var.Configuration)\MergeModule.msm" DiskId ="1" />

我希望将第二个文件复制到与其他文件不同的文件夹.

I want the second file to copy to a different folder than the other files.

推荐答案

有一个概念,叫做 可重定向合并模块.我避免使用它 - 这个概念对我来说似乎不正确.我还没有尝试用 Wix 制作一个.

There is a concept for that, it is called a retargetable merge module. I have avoided used it - the concept doesn't seem right to me. I have not tried to make one with Wix.

我认为您可以结合一个 Wix 包含文件(简单示例) 使用新的自动生成的组件 guid 通过在适当的地方添加 Include 语句来可靠地部署此类重复文件.在这种情况下,您不能对 guid 进行硬编码,而是让它们由 Wix 编译器和链接器自动生成.

I think you could combine a Wix include file (simple sample) with the new auto-generated component guids to deploy such duplicated files reliably by adding an Include statement where appropriate. You must not hard code the guids in this case, but let them be auto generated by the Wix compiler and linker.

还可以阅读 WixLibs(Wix 库文件):http://robmensching.com/blog/posts/2008/10/10/what-are-.wixlibs-and-why-你会使用它们/

Also have a read of WixLibs (Wix library files): http://robmensching.com/blog/posts/2008/10/10/what-are-.wixlibs-and-why-would-you-use-them/

Wix 文档;http://wixtoolset.org/documentation/manual/v3/overview/files.html

这篇关于将模块文件合并到不同的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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