2011-11-02 3 views
2

WiX 및 굽기에 대한 사용자 지정 UI를 만들려고합니다. 내가 찾은 가이드 중 일부를 따랐으며 지금까지 BootstrapperApplication에서 상속받은 다음과 같은 프로젝트가 있습니다. WiX 사용자 지정 UI 굽기

namespace MyBA 
{ 
    public class TestBA : BootstrapperApplication 
    { 
     protected override void Run() 
     { 
      MessageBox.Show("My BA is running"); 
      this.Engine.Quit(0); 
     } 
    } 
} 

그리고있는 AssemblyInfo.cs에서

:
[assembly: BootstrapperApplication(typeof(TestBA))] 

그런 다음 내 부트 스트 래퍼 프로젝트에 나는 다음 있습니다.

<?xml version="1.0" encoding="UTF-8"?> 
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" 
    xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> 

    <Bundle Name="MyApplication" 
      Version="1.0.0" 
      Manufacturer="Acme Ltd" 
      UpgradeCode="F84A4058-FDF6-4218-BCB5-12C811DA3C99" 
      Condition="NOT ((VersionNT = 600 AND ServicePackLevel >=2) OR (VersionNT >= 601))" 
      IconSourceFile="$(var.MyApplicationInstallerRequiredFiles.ProjectDir)logo.ico" 
      SplashScreenSourceFile="$(var.MyApplicationInstallerRequiredFiles.ProjectDir)Splashscreen.bmp" 
      DisableRepair="no" 
      DisableRemove="no" 
      DisableModify="no"> 

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

     <WixVariable Id="WixStdbaLicenseRtf" 
        Value="$(var.MyApplicationInstallerRequiredFiles.ProjectDir)Licence.en-gb.rtf" /> 
     <WixVariable Id="WixStdbaLogo" 
        Value="$(var.MyApplicationInstallerRequiredFiles.ProjectDir)logoInstallSmall.bmp" /> 

     <BootstrapperApplicationRef Id='ManagedBootstrapperApplicationHost'> 
      <Payload Name='BootstrapperCore.config' 
        SourceFile='$(var.MyApplicationInstallerRequiredFiles.ProjectDir)Bootstrapper\MyBA.BootstrapperCore.config' /> 
      <Payload SourceFile='$(var.MyApplicationInstallerRequiredFiles.ProjectDir)Bootstrapper\MyBA.dll' /> 
     </BootstrapperApplicationRef> 

     <Chain> 
      <PackageGroupRef Id="MyApplicationPackage" /> 
     </Chain> 
    </Bundle> 
</Wix> 

와 내가 부트 스트 래퍼의 Setup.exe를 실행 할 때마다

<?xml version="1.0" encoding="utf-8" ?> 
<configuration> 
    <configSections> 
     <sectionGroup name="wix.bootstrapper" 
         type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.BootstrapperSectionGroup, BootstrapperCore"> 
      <section name="host" 
        type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.HostSection, BootstrapperCore" /> 
     </sectionGroup> 
    </configSections> 
    <startup useLegacyV2RuntimeActivationPolicy="true"> 
     <supportedRuntime version="v4.0" /> 
    </startup> 
    <wix.bootstrapper> 
     <host assemblyName="MyBA"> 
      <supportedFramework version="v4\Full" /> 
      <supportedFramework version="v4\Client" /> 
     </host> 
    </wix.bootstrapper> 
</configuration> 

그러나, 나는되는 SplashScreen가 잠깐 나타 얻을 MyBA.BootstrapperCore.config

을 추가했지만 아무것도. 내가 로그에 % temp %를에 보면 거기 왜 이런 일이 왜 위의 오류가 발생하는

[0A00:0424][2011-11-02T15:52:08]: Burn v3.6.2221.0, path: C:\MyApplication\dev\source\Bootstrapper1\bin\Debug\Setup.exe, cmdline: '' 
[0A00:0424][2011-11-02T15:52:08]: Setting string variable 'WixBundleName' to value 'MyApplication' 
[0A00:0424][2011-11-02T15:52:08]: Setting string variable 'WixBundleLog' to value 'C:\Users\AppData\Local\Temp\MyApplication_20111102155208.log' 
[0A00:0424][2011-11-02T15:52:08]: Condition 'NOT ((VersionNT = 600 AND ServicePackLevel >=2) OR (VersionNT >= 601))' evaluates to true. 
[0A00:0424][2011-11-02T15:52:08]: Setting string variable 'WixBundleOriginalSource' to value 'C:\MyApplication\dev\source\Bootstrapper1\bin\Debug\Setup.exe' 
[0A00:0424][2011-11-02T15:52:08]: Loading managed bootstrapper application. 
[0A00:0424][2011-11-02T15:52:08]: Error 0x80131040: Failed to create the managed bootstrapper application. 
[0A00:0424][2011-11-02T15:52:08]: Error 0x80131040: Failed to create UX. 
[0A00:0424][2011-11-02T15:52:08]: Error 0x80131040: Failed to load UX. 
[0A00:0424][2011-11-02T15:52:08]: Error 0x80131040: Failed while running 
[0A00:0424][2011-11-02T15:52:08]: Error 0x80131040: Failed to run per-user mode. 

다음? 당신이 WixBA에 대한 소스 코드를 보면

답변

7

, 그들은 글로벌 Threading.Dispatcher를 선언하고 재정의 실행() 메소드에 다음 줄이 : 나는 비슷한 문제가 있었다

Threading.Dispatcher.Run(); 

은 마찬가지로 Threading.Dispatcher를 부트 스트 래퍼 응용 프로그램에 추가하면 문제가 해결되었습니다.

또한 부트 스트 래퍼 응용 프로그램이 다른 dll에 종속되어있는 경우 <BootstrapperApplicationRef/> 아래에 <Payload/>으로 포함해야합니다.

관련 문제