2017-07-07 112 views
0
<?xml version="1.0" encoding="utf-8"?> 
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension" 
     xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension" 
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> 
    <Bundle Name="t1bundle" Version="$(var.Version)" Manufacturer="Chanjet Ltd" UpgradeCode="87714fb5-9cdb-4323-af55-821c05974378" Compressed="yes" > 
    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" > 
     <bal:WixStandardBootstrapperApplication LicenseFile="License.rtf" LogoFile="banner.bmp"/> 
    </BootstrapperApplicationRef> 

    <!--<BootstrapperApplicationRef Id="ManagedBootstrapperApplicationHost"> IconSourceFile="$(var.Photoes)diaapp.ico" 
     <bal:WixStandardBootstrapperApplication LicenseFile="$(var.Photoes)license.rtf" LogoFile="$(var.Photoes)scon.ico" /> 
    </BootstrapperApplicationRef>--> 
    <Chain> 
     <!--<PackageGroupRef Id="NetFx40Web" />--> 
     <!--<PackageGroupRef Id="Netfx4Full" />--> 
     <MsiPackage Id="t1plus" SourceFile="$(var.Version)/Sample.msi" Compressed="no" DisplayInternalUI="yes"/> 
    </Chain> 
    </Bundle> 

    <Fragment> 
    <PropertyRef Id="WIX_IS_NETFRAMEWORK_40_OR_LATER_INSTALLED"/> 
    <!--<PackageGroup Id="Netfx4Full"> 
     <ExePackage Id="Netfx4Full" Cache="no" Compressed="no" PerMachine="yes" Permanent="yes" Vital="yes" InstallCommand="/q" 
      SourceFile="$(var.Dia)dotNetFx40_Full_x86_x64.exe" 
      DetectCondition="(Netfx4FullVersion=&quot;4.0.30319&quot;) AND (NOT VersionNT64 OR (Netfx4x64FullVersion=&quot;4.0.30319&quot;))" 
       DownloadUrl="http://go.microsoft.com/fwlink/?LinkId=164193" 
      InstallCondition="(VersionNT >= v5.1 OR VersionNT64 >= v5.1) AND (NOT (Netfx4FullVersion=&quot;4.0.30319&quot; OR Netfx4x64FullVersion=&quot;4.0.30319&quot;))"/> 
    </PackageGroup>--> 
    <util:RegistrySearchRef Id="NETFRAMEWORK40"/> 
    <PackageGroup 
      Id="Netfx4Full"> 
      <ExePackage 
       Id="Netfx4FullExe" 
       Cache="no" 
       Compressed="no" 
       PerMachine="yes" 
       Permanent="yes" 
       Vital="yes" 
       SourceFile="$(var.Version)/dotNetFx40_Full_x86_x64.exe" 
       InstallCommand="/q /norestart " 
       DetectCondition="WIX_IS_NETFRAMEWORK_40_OR_LATER_INSTALLED" 
       DownloadUrl="http://go.microsoft.com/fwlink/?LinkId=164193"/> 
    </PackageGroup> 
    </Fragment> 
</Wix> 

正如您所看到的,我想在安裝MSI之前執行.NET Framework檢查。WiX Bundle不包括MSI包

我用:

light.exe -loc WixUI_zh-cn.wxl -ext WixUIExtension -ext WixNetFxExtension -ext WixUtilExtension -ext WixBalExtension 1.0.0/bundle.wixobj 

但bundle.exe只有567KB。 MSI和dotNetFx40_Full_x86_x64.exe不在軟件包中。

+0

您知道我無法將dotNetFx40_Full_x86_x64.exe和我的msi文件放在一個包中 – qijun

回答

0

更改壓縮爲 「是」

比如你ExePackage屬性:

<ExePackage Id="Netfx4FullExe" 
      Cache="no" 
      Compressed="yes" 
      PerMachine="yes" 
      Permanent="yes" 
      Vital="yes" 
      SourceFile="$(var.Version)/dotNetFx40_Full_x86_x64.exe" 
      InstallCommand="/q /norestart " 
      DetectCondition="WIX_IS_NETFRAMEWORK_40_OR_LATER_INSTALLED" 
      DownloadUrl="http://go.microsoft.com/fwlink/?LinkId=164193"/> 

the Wix documentation