WiX 可配置目录是什么意思? [英] What is the meaning of WiX configurable directory?

查看:27
本文介绍了WiX 可配置目录是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个测试安装程序,它有 2 个功能 A 和 B.A 有 2 个文件 a1 和 a2,B 也有 2 个文件 b1 和 b2(每个文件属于单个组件).

I have a test installer that has 2 features A and B. A has 2 files a1 and a2, B has also 2 files b1 and b2(Each file belongs to individual component).

Feature A = {a1, a2}
Feature B = {b1, b2}

而且每个文件的安装位置如下(有点混):

And the installation location for each file is as follows(somewhat mixed):

[ProgramFilesFolder]
    MyApp\
        Dir1\
            a1
            b1
        Dir2\
            a2
            b2

我将特性 A 的可配置目录设置为 Dir1,特性 B 设置为 Dir2.

I set feature A's configurable directory to Dir1 and feature B's to Dir2.

当我启动安装程序功能树对话框时,功能 A 的安装位置是 [ProgramFilesFolder]\MyApp\Dir1,功能 B 的安装位置是 [ProgramFilesFolder]\MyApp\Dir2,就像意思是 a1、a2(功能 A)安装到Dir1 和 b1、b2(特征 B)进入 Dir2.

When I launch the installer feature tree dialog says feature A's install location is [ProgramFilesFolder]\MyApp\Dir1 and feature B's install location is [ProgramFilesFolder]\MyApp\Dir2, like meaning a1, a2(feature A) are installed into Dir1 and b1, b2(featuer B) into Dir2.

但实际安装结果是a1、b1安装到Dir1,a2、b2安装到Dir2.当然,与我的源代码相比,这是非常正常的行为,但我不明白在这种情况下可配置目录的含义.

But actual installation result is that a1, b1 are installed into Dir1 and a2, b2 are installed into Dir2. Of course, this is very normal behavior compared to my source code, but I don't get what the configurable diretory means in this situation.

推荐答案

这是用于自定义设置对话框上的功能选择树和浏览按钮.您可以将目录与功能关联,以便用户可以选择功能所在的目录.

This is for the feature selection tree and browse button on a custom setup dialog. You can associate a directory to the feature so that the user can select which directory the feature goes to.

现实情况是,大多数应用程序的所有功能(如果它们首先有多个功能)都使用相同的可配置目录.(比如 WiX 的 INSTALLLOCATION,VDPROJ 的 TARGETDIR 或 InstallShield 的 INSTALLDIR )尽管组件实际上可以拥有它们目标所需的任何目录,因此更改功能的目标实际上并不意味着该功能中的每个组件都将转到该目录.有些可能需要转到 SystemFolder 之类的地方.

The reality is most applications have all features (if they have more then one in the first place) all use the same configurable directory. ( Say INSTALLLOCATION for WiX, TARGETDIR for VDPROJ or INSTALLDIR for InstallShield ) Even then though components can actually have whatever directory they need for their destination so changing the destination for a feature doesn't actually mean every component in that feature will go to that directory. Some might need to go to places like SystemFolder.

在更高级的场景中,您可能将功能细分为 Windows 应用、Windows 服务、WebUI,并且您可能希望选择每个功能在机器上的位置.

In the more advanced scenarios you might have features broken out into say Windows App, Windows Service, WebUI and you might want to select where each of those go on the machine.

有意义吗?

这篇关于WiX 可配置目录是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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