wix - Copy an entire directory and all of its contents

坚强是说给别人听的谎言 提交于 2019-12-23 12:34:27

问题


My wix installer needs the contents 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?


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/6816289/wix-copy-an-entire-directory-and-all-of-its-contents

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!