重用 WIX 组件来加速烛光/光 [英] Reusing WIX components to speed up candle/light

查看:19
本文介绍了重用 WIX 组件来加速烛光/光的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对 WIX 相当陌生,所以如果我完全错过了这里的船,请原谅我,但我想知道是否可以在 wxs 文件中重用组件(mwm、cab 等)而无需轻重- 每次都链接它们.我正在使用的安装程序有几个可执行文件、dll 和配置文件,这些文件往往会在每次安装之间发生变化.这些文件相当于大约 5 兆的安装程序.我想要重用的部分是价值约 350 兆的图像/地图/数据库文件,这些文件不会经常更改,我不想每次构建安装程序时都必须编译/链接.

I am fairly new to WIX, so forgive me if I'm completly missing the boat here, but I was wondering if it was possible to reuse components (mwm,cab,etc) from within a wxs file without having light re-link them every time. The installer I'm working on has several executables, dlls and config files that tend to change between each install. These files amount to about 5 meg worth of installer. The part I want to reuse is the ~350 meg worth of image/map/database files that do not change very often that I don't want to necessarilly have to compile/link every time the installer is built.

我尝试为地图创建一个 mwm 文件,但是当我在 wxs 中引用它们时,它们会通过灯光链接到主 .msi 文件中.我尝试指定一个非嵌入式 CAB 文件来保存地图:

I've tried creating a mwm file for the maps, but when I reference them within the wxs, they get linked via light into the main .msi file. I've tried specifing a non embedded CAB file to hold the maps:

<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
<Media Id="2" Cabinet="NewRiver.cab" EmbedCab="no" CompressionLevel="none" />
...
<Merge Id="NewRiverDigMap" SourceFile="..OutputNewRiverDigitalMaps.msm" Language="1033" DiskId="2" />

但每次运行 light 时,都会重新生成独立的 CAB 文件 - 这需要一段时间.

But every time light runs, the stand-alone CAB file gets regenerated - which takes a while.

我想创建一个 ZIP 文件与 msi 一起交付,并让安装程序启动 zip 提取,但这对我来说似乎是反 Wix.我希望在不再需要这些文件时将其删除.

I thought about just creating a ZIP file to deliver along with the msi and have the installer just kick off the zip extract, but that seems anti-wix to me. I'd like to have the files be removed when they are no longer needed.

我还缺少其他类似 wix 的操作吗?我读过有关 Fragments 的文章,但这似乎不是我想要的.

Are there any other wix like operations that I'm missing? I've read about fragments, but that doesn't seem to be what I'm looking for.

谢谢,大卫

推荐答案

你的直觉绝对会引导你走向正确的方向.您正在寻找的功能称为cab-cache".您可以通过将以下内容添加到您的 light.exe 命令行来使用它:

Your intuition is absolutely leading you in the right direction. The feature you are looking for is called "cab-cache". You use it by adding the following to your light.exe command-line:

-reusecab -cc path	odirectoryforcabinets

注意:编译(candle.exe)和链接(light.exe 的前半部分)应该很快进行.通常缓慢的是绑定(light.exe 的第二个),因为它实际上涉及所有文件并构建文件柜.机柜建造是最慢的部分,所以希望 cab-cache 能够为您提供足够的速度.

Note: Compiling (candle.exe) and linking (first half of light.exe) should happen very quickly. What is usually slow is the binding (second have of light.exe) because it actually touches all of the files and builds the cabinets. Cabinet building is the slowest part, so hopefully the cab-cache speeds things up sufficiently for you.

P.S.:如果编译需要很长时间,您可以创建.wixlib".使用 lit.exe.我在这里有更多关于 .wixlibs 的信息:http://robmensching.com/blog/posts/2008/10/10/What-are-.wixlibs-and-why-would-you-use-them

P.S.: If compiling is taking much time you can create ".wixlib" with lit.exe. I have more about .wixlibs here: http://robmensching.com/blog/posts/2008/10/10/What-are-.wixlibs-and-why-would-you-use-them

这篇关于重用 WIX 组件来加速烛光/光的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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