开发者

wix - Copy an entire directory and all of its contents

开发者 https://www.devze.com 2023-03-23 05:27 出处:网络
My wix installer needs the co开发者_开发百科ntents of a directory to be copied to a destination folder. I understand that the Directory element has a FileSource attrib. I tried something like this:

My wix installer needs the co开发者_开发百科ntents of a directory to be copied to a destination folder. I understand that the Directory element has a FileSource attrib. I tried something like this:

<DirectoryRef Id="DIRECTORY" FileSource="{var.Dir}">
  <Component Id="Dir" Guid="*" >
    <CreateFolder/>
  </Component>
</DirectoryRef>

This is not picking up the files or sub-directories from the preprocessor variable.

Are there any alternate ways to achieve this?


No, not unless you use a custom action. WiX likes for every file to be tracked individually. You can use heat to generate the directory listing for you.


Use heat.exe or HeatTask in MSBuild. That's the only way to do things today.

0

精彩评论

暂无评论...
验证码 换一张
取 消