如何安装WiX的安装程序中复制文件夹/ files1..to..files5 [英] How to copy folder/files1..to..files5 during the installation of wix installer

查看:1590
本文介绍了如何安装WiX的安装程序中复制文件夹/ files1..to..files5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用WIX.I有项目directory.I需要在安装过程中的文件夹和文件的安装路径下复制文件夹和文件创建了安装程序的项目。

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.

这两个目录结构 1.somefolder / file1..to file5 2。有些文件夹/子文件夹/ subfile1..tosubfile5 。这些的两个目录是我的项目目录内。我需要这样的程序文件/ InstallationFolder /子/ subfile1..tosubfile5

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.

如何从项目路径在安装过程中复制目录的安装路径。

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?

下面是我建议...

<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>

有关信息最权威的源这样的:
http://wixtoolset.org/documentation/manual/v3/howtos/files_and_registry/add_a_file.html

The definitive source for information on this: http://wixtoolset.org/documentation/manual/v3/howtos/files_and_registry/add_a_file.html

这是如何做到一个很好的WiX的教程:
http://wix.tramontana.co.hu/tutorial

A good WiX tutorials on how to do this: http://wix.tramontana.co.hu/tutorial

以及如何处理它们:
< A HREF =htt​​p://wix.tramontana.co.hu/tutorial/getting-started/the-files-inside相对=nofollow> http://wix.tramontana.co.hu/tutorial/getting-启动/的档案,里面

编辑:
你会希望有一个目录结构定义是这样的:

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>

请阅读:的 http://wixtoolset.org/documentation/manual/v3/howtos/files_and_registry/add_a_file.html

这篇关于如何安装WiX的安装程序中复制文件夹/ files1..to..files5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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