Wix Burn:如果没有 Net Framework 的基本 UI 处理 [英] Wix Burn: Basic UI handling if No Net Framework is there

查看:39
本文介绍了Wix Burn:如果没有 Net Framework 的基本 UI 处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Win-Forms 用 C# 为 Net Framework 2.0 编写了一个 Boostrapper UI.它开始工作正常,设计的表单按预期响应.

I wrote a Boostrapper UI in C# for Net Framework 2.0 using Win-Forms. It started working fine and designed forms are responding as expected.

这是我的 Wix 捆绑代码:

Here is my Wix Bundle Code:

<?define TargetFile=$(var.MyBA.TargetDir)$(var.MyBA.TargetFileName)?>
<?define BootstrapConfigFile=$(var.MyBA.ProjectDir)BootstrapperCore.config?>

    <Bundle Name="Bootstrapper1" Version="1.0.0.0" Manufacturer="Farrukh" UpgradeCode="54c4a4a4-dca8-4ae4-b2f4-5e3f3fd8cb92">

    <BootstrapperApplicationRef Id="ManagedBootstrapperApplicationHost">
      <Payload SourceFile="$(var.BootstrapConfigFile)"/>
      <Payload SourceFile="$(var.TargetFile)"/>
      <Payload SourceFile="$(env.WIX)\SDK\Microsoft.Deployment.WindowsInstaller.dll"/>
    </BootstrapperApplicationRef>

    <WixVariable Id="WixMbaPrereqPackageId" Value="Netfx4Full" />
    <WixVariable Id="WixMbaPrereqLicenseUrl" Value="NetfxLicense.rtf" />

    <Chain>
      <!--<PackageGroupRef Id='Netfx4Full' />-->
      <MsiPackage Id="MyInstaller"
                  Cache="no"
                  Visible="yes"
                  DisplayInternalUI="yes"
                  SourceFile="MyProduct.msi"
      />
    </Chain>
  </Bundle>

如您所见,它不包含 NetFX 包,并且需要 Net-Framework 2.0,我尝试重命名 Net Framework 注册表项:

As you can see that it doesn't include NetFX package and as it requires Net-Framework 2.0, I experimented with renaming the Net Framework registry keys:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup-Renamed

和 32 位

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup-Renamed

这样它就无法检测到它.这导致显示一个非常基本的用户界面:即

so that it won't be able to detect it. This resulted in displaying a very basic UI: i.e.

我相信,这是由于我的捆绑包中的以下标记而显示的,但我不确定

I believe , this was displayed due to following markups in my Bundle, but I'm not sure about that

<WixVariable Id="WixMbaPrereqPackageId" Value="Netfx4Full" />
<WixVariable Id="WixMbaPrereqLicenseUrl" Value="NetfxLicense.rtf" />

然而,当我点击接受并安装"时什么也没有发生,按钮消失了.那可能是因为我没有添加 NetFx 包,也没有任何对 WixNetFxExtension 的引用.(我肯定会添加这些,稍后会看到结果).

However, when I clicked "Accept and Install" nothing happened and buttons just got disappeared. That may be because I added no NetFx Package, neither any reference to WixNetFxExtension. (And I will definitely gonna add these and will see results later).

问题:我想编辑这个基本 UI,所以如果我的用户尝试在 Windows XP(没有 Net Framework)上安装它,他/她将获得我设计的 UI,而不是这个基本的.那么我该如何编辑这个基本的 UI?

Question: I want to edit this basic UI so if my user try to install it on Windows XP (with no Net Framework), he/she would get the UI as I will design, not this basic one. So how can I edit this basic UI?

我觉得,我在这里遗漏了一些基本的东西,但需要一些指导.. 非常感谢任何帮助/指导.

I feel, I'm missing some basic thing here, but need some guidance.. would really appreciate any help/guidance.

问候

推荐答案

我在 Wix 用户的邮件列表上找到了一个线程后解决了这个问题.这是:
自定义主题中的刻录必备 boostrapper 图像

I was able to solve this after finding a thread on Wix User's mailing list. Here it is:
customizing burn prerequisite boostrapper image in theme

所以这个屏幕被称为Burn Prerequisite,它有一个特殊的WixVariable ID.这是来自我的 Bootstrapper 的代码,描述了我自己的自定义主题在 Burn 的 pre-req 屏幕中的使用:

So this screen is known as Burn Prerequisite and it has a special WixVariable ID. Here is code from my Bootstrapper, depicting the use of my own custom theme for Burn's pre-req screen:

<WixVariable Id="PreqbaThemeXml" Value="..\resources\MbaPrereqTheme.xml" />
<WixVariable Id="PreqbaThemeWxl" Value="..\resources\MbaPrereqTheme.wxl" />

您在 MbaPrereqTheme.xml 中引用的任何资源,如 Logo.png、Banner.bmp 和 NetfxLicense.rtf 等,都必须作为有效负载成为 Bootstrapper 的一部分:

And any resources like Logo.png, Banner.bmp and NetfxLicense.rtf etc which you have referenced in MbaPrereqTheme.xml, would have to be part of Bootstrapper as a PayLoad:

<BootstrapperApplicationRef Id="ManagedBootstrapperApplicationHost" >
      <Payload SourceFile="$(var.BootstrapConfigFile)"/>
      <Payload SourceFile="$(var.MyBootstrapDll)"/>
      <Payload SourceFile="$(env.WIX)\SDK\Microsoft.Deployment.WindowsInstaller.dll"/>

<!-- Following are required as payload and to be used by Pre-Req screen.-->      

      <Payload SourceFile="..\resources\logo.png"/>
      <Payload SourceFile="..\resources\Banner.bmp"/>
      <Payload SourceFile="..\resources\NetfxLicense.rtf"/>

    </BootstrapperApplicationRef>

这就像我希望的那样开始工作:)

And this started working just like as I wished :).

问候

这篇关于Wix Burn:如果没有 Net Framework 的基本 UI 处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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