将页面添加到安装程序-Wix Toolset [英] Add pages to installer -Wix Toolset

查看:55
本文介绍了将页面添加到安装程序-Wix Toolset的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种通过自己的界面向安装程序添加新页面的方法.最终,我希望安装程序依次执行许多操作,使用户可以转到下一页并检查或设置后续配置.

I'm looking for a way to add new pages to installer with its own interface. Ultimately, I would like my installer to do many things in turn, enabling the user to go to the next pages and check or set subsequent configurations.

但是目前,我正在寻找如何添加一个在安装之前运行的附加页面,并检查计算机是否具有安装该应用程序所需的程序.我想将我准备好的代码附加到c#上,以检查这些程序是否已安装在给定的计算机上.

But at the moment I'm looking for how to add an additional page that would run before installation and check if the computer has the required programs to install the application. I would like to attach my ready code to c # to check if these programs are installed on the given computer.

通过使用本教程: https://www.youtube.com/watch?v=6Yf-eDsRrnM& t = 7195s 我创建了安装程序的基本版本.在本教程中,我们使用 WixUI_Minimal 创建安装程序.

By using this tutorial: https://www.youtube.com/watch?v=6Yf-eDsRrnM&t=7195s I created the basic version of the installer. In the tutorial we create installer by using WixUI_Minimal.

我仔细阅读了文档,发现可以创建自己的页面,但找不到任何地方.例如那里 https://wixtoolset.org/documentation/manual/v3/wixui/是自定义内置WixUI对话框集",但未显示如何执行此操作.

I have looked through the documentation and it is written that you can create your own pages, but I can't find anywhere. For example there https://wixtoolset.org/documentation/manual/v3/wixui/ is Customizing Built-in WixUI Dialog Sets but they dont show how do that.

推荐答案

2020年4月21日更新

我创建了一个公开的 GitHub Gist ,其中解释了步骤,甚至包括自定义的对话框 PrerequisitesDlg.wxs 最多包含 5 个先决条件,可以将其配置为WiX属性(文本和条件).整个序列包装在 WixUI_KargWareFeatureTree.wxs 中.

Update 21th April 2020

I have created a public GitHub Gist, which explains the steps and even include a customized Dialog PrerequisitesDlg.wxs with up to 5 Prerequisites, which can be configured as WiX Properties (text and condition). The whole sequence is wrapped in WixUI_KargWareFeatureTree.wxs.

您需要的元素是 UIRef元素,Wix Toolset v3文档.

Wix Toolset是一个开源项目,因此您可以在 GitHub,Wix Toolset v3 上进行查看.

Wix Toolset is an open source project, so you can review it on GitHub, Wix Toolset v3.

此处列出了嵌入在Wix工具集中的对话框,

The dialoges which are embed in Wix Toolset are listed here, Source Code of the Default UI-Dialoges of Wix ToolSet. I would use the WixUI_Advanced one, but you can pick all others or start even from scratch.

  1. 下载 WixUI_Advanced.wxs 来自GitHub
  2. wxs 文件复制到您的msi-project的根目录(放置* .wixproj os的位置),并将其命名为例如 MyWixToolsetPages.wxs
  3. MyWixToolsetPages.wxs (在第50行附近)内编辑UI xml元素的 name ()
  4. MyWixToolsetPages.wxs 添加到您的wixproject
  5. product.wxs 中的 UIRef 参考元素替换或添加到< UIRef Id =" WixUI_MyWixToolsetPages"/>
  6. 将您的新对话框添加为< DialogRef Id =" myNewPage" ;;/>
  7. 使用 Control 下一步/返回和事件 NewDialog
  8. 自定义页面顺序
  9. 请注意在两个方向(下一个,下一个,下一个,结束)和(结束,后退,后退,后退)两个方向上测试您的序列
  1. Download the WixUI_Advanced.wxs from GitHub
  2. Copy the wxs file to the root of your msi-project (where the *.wixproj os placed) and name it to e.g. MyWixToolsetPages.wxs
  3. Edit the name of the UI xml element inside MyWixToolsetPages.wxs (near to line 50)
  4. Add the MyWixToolsetPages.wxs to your wixproject
  5. Replace or add the UIRef reference element in the product.wxs to <UIRef Id="WixUI_MyWixToolsetPages"/>
  6. Add your new dialog as <DialogRef Id="myNewPage" />
  7. Customize the order of the pages with Control Next / Back and Event NewDialog
  8. Be aware to test your sequence in both directions (next, next, next, end) and (end, back, back, back)

MyWixToolsetPages.wxs (从原始 WixUI_Advanced.wxs 复制)

...
<UI Id="WixUI_MyWixToolsetPages">
...

替换 product.wxs

...
<UIRef Id="WixUI_MyWixToolsetPages"/>
...

这篇关于将页面添加到安装程序-Wix Toolset的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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