如何在使用 WiX 安装期间复制文件夹(不是文件)? [英] How to copy a folder (not a file) during installation with WiX?

查看:32
本文介绍了如何在使用 WiX 安装期间复制文件夹(不是文件)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Wix编写安装代码,我需要将整个文件夹安装到某个位置,然后将该文件夹复制到几个不同的位置,我可以使用代码将这些相同的文件一一安装到这些位置,但该文件夹的大小约为 80 Mb,因此会增加我的 MSI 大小(80 x 3 = 240 Mb).

I'm writing an installation code using Wix, and I need to install an entire folder to a certain location, and then copy that folder to several different locations, I could install those same files to those locations using code one by one, but that folder is about 80 Mb in size, so it would increase my MSI size (80 x 3 = 240 Mb).

我想到的一个解决方案是将文件夹压缩成zip文件,然后使用CopyFile元素复制文件,然后解压三个文件夹,但这样会增加太多安装时间.

One solutions I had thought of was compressing the folder into a zip file, and then use the CopyFile element to copy the file, after that, descompress the three folders, but this increases the installation time too much.

有没有办法使用本机 wix 代码来做到这一点,或者自定义操作是我唯一的解决方案?坦克斯

Is there a way to do this using native wix code, or is Custom Actions my only solution? Tnks

推荐答案

WiX 的smart cabbing"重用文件存储数据的一个实例,即使它在不同目录中多次包含.请参阅 http://robmensching.com/blog/posts/2007/6/1/quotSmart-cabbingquot-Added-to-WiX-toolset.所以你有重复的创作,但没有膨胀 .msi.

WiX's "smart cabbing" reuses one instance of a file's stored data even if it's included multiple times in different directories. See http://robmensching.com/blog/posts/2007/6/1/quotSmart-cabbingquot-added-to-WiX-toolset. So you have duplicate authoring but without bloating the .msi.

这篇关于如何在使用 WiX 安装期间复制文件夹(不是文件)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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