[英]How to copy folder/files1..to..files5 during the installation of wix installer
I have created my installer project using WIX.I have folders and files under the project directory.I need to copy the folders and files to the installation path during the installation. 我使用WIX创建了安装程序项目,在项目目录下有文件夹和文件,在安装过程中需要将文件夹和文件复制到安装路径。
The two directory structure are 1.somefolder/file1..to file5 2.some folder/subfolder/subfile1..tosubfile5
.These two directory are inside my project directory.I need to copy the same directory inside my installation folder during the installation like this Program Files/InstallationFolder/subfolder/subfile1..tosubfile5
. 这两个目录结构是1.somefolder/file1..to file5 2.some folder/subfolder/subfile1..tosubfile5
这两个目录都在我的项目目录中。在安装过程中,我需要在安装文件夹中复制相同的目录,例如此Program Files/InstallationFolder/subfolder/subfile1..tosubfile5
。
How to copy directory from project path to installation path during the installation. 在安装过程中如何将目录从项目路径复制到安装路径。
This is a rather simple question with a complicated answer... 这是一个相当简单的问题,答案很复杂。
Do you have your features defined? 您定义了功能吗? Do you have your components defined? 您是否定义了组件? Do you have your Directory structure defined? 您是否定义了目录结构?
Here is what I would suggest... 这是我的建议...
<Feature id="FilesFeature" Level="1" AllowAdvertise="no">
<ComponentRef Id="C__File1_exe"/>
<ComponentRef ID="C__File2_dll"/>
....
</Feature>
<DirectoryRef ID="TARGETDIR"> //This is the director you defined somewhere else that is where you want to install to
<Component Id="C__File1_exe" Guid={SOME_UNIQUE_GUID}">
<File Id="__File1_exe" Name="File1.exe" KeyPath="yes" Source="{PATH_TO_YOUR_FILE}"/>
</Component>
<Component Id="C__File2_dll" Guid={SOME_UNIQUE_GUID}">
<File Id="__File2_dll" Name="File2.dll" KeyPath="yes" Source="{PATH_TO_YOUR_FILE}"/>
</Component>
....
</DirectoryRef>
The definitive source for information on this: http://wixtoolset.org/documentation/manual/v3/howtos/files_and_registry/add_a_file.html 有关此信息的权威来源: http : //wixtoolset.org/documentation/manual/v3/howtos/files_and_registry/add_a_file.html
A good WiX tutorials on how to do this: http://wix.tramontana.co.hu/tutorial 关于如何执行此操作的优秀WiX教程: http : //wix.tramontana.co.hu/tutorial
Specifically for the files and how to handle them: http://wix.tramontana.co.hu/tutorial/getting-started/the-files-inside 专门针对文件及其处理方式: http : //wix.tramontana.co.hu/tutorial/getting-started/the-files-inside
EDIT: You will want to have a directory structure defined something like this: 编辑:您将需要具有这样定义的目录结构:
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="SOMEFOLDER" Name="SomeFolder>
<Directory Id="SUBFOLDER" Name="SubFolder">
</Directory>
</Directory>
</Directory>
Please read: http://wixtoolset.org/documentation/manual/v3/howtos/files_and_registry/add_a_file.html 请阅读: http : //wixtoolset.org/documentation/manual/v3/howtos/files_and_registry/add_a_file.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.