Wix#:如何将自定义UI决定绑定到实际安装步骤? [英] Wix#: how to bind custom UI decision to actual installation steps?

查看:42
本文介绍了Wix#:如何将自定义UI决定绑定到实际安装步骤?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有两种安装模式:服务和应用程序.

We have two installation modes: service and app.

使用Wix#,我找不到向用户展示此简单的两个单选按钮对话框的方法:

Using Wix#, I couldn't find a way to present this simple two-radio buttons dialog to the user:

Choose your installation:
(*) App [default]
( ) Service

然后选择要相应部署/执行的文件(和操作).

And then choose which files (and action) to deploy/perform accordingly.

我们如何将用户的决定与实际操作绑定在一起?

How do we even bind the user's decision with the actual operation?

我终于找到了解决方法,但是仍然不能使GUI选择影响已部署的文件(尽管bound属性确实发生了变化).这是新的,更详细的问题:

I discovered how to do that, eventually, but still can't make the GUI selection affect the deployed files (although the bound property do change). Here is the new, more detailed question:

属性似乎更改每个用户的选择,但未部署条件文件

推荐答案

安装模式

Installation modes

您可以通过功能来实现.功能具有固定的文件列表,在MSI构建之前已格式化.如果添加了服务应用程序功能,则可以控制将哪些文件添加到目标文件夹中.

You can make it by features. Feature has fixed files list, formatted before MSI build. If you adds Service and Application features you can countrol what's files to add in destination folder.

默认情况下你的文件在完成功能名称,所以你需要添加anothers.这是功能示例:

By default your files are in Complete feature name, so you need to add anothers. Here is feature example:

功能例子

请添加您的服务器,然后使用ADDLOCAL参数设置要部署的内容.只需将其设置为单选按钮,即可:

Please add your ones and set what to deploy with ADDLOCAL parameter. Just set it on radiobutton click:

session["ADDLOCAL"]="Feature1,Feature2,"

警告::要进行更新时,需要设置以前的功能名称.

Warrning: when you will do update you need to set previous features names.

GUI安装流程

如果我需要进行一些拆分的表单流程,我只需在行中添加2个对话框序列,然后将我的JumpTo方法用于ManagedForm:

If i need to make some splitted forms flow i just adds 2 sequences of my dialogs in row and use my JumpTo method for ManagedForm:

/// <summary>
/// Переход к форме определенного типа.
/// </summary>
/// <param name="dialogType">Тип формы.</param>
public bool JumpTo(Type dialogType)
{
    int index = Shell.Dialogs.IndexOf(dialogType);
    if (index < 0)
    {
        return false;
    }

    BeginInvoke(new Action(() => Shell.GoTo(index)));
    return true;
}

之后,我需要控制第一种和最后一种形式的行为,以跳转到正确的对话框.

After, i need to control behavior for first and last one forms for jump to correct dialog.

这篇关于Wix#:如何将自定义UI决定绑定到实际安装步骤?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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