2009-12-09 3 views
0

현재 사내 개발 SDK 용 설치를 작성 중입니다. 이 SDK의 일부는 Visual Studio 2008의 지침 패키지입니다 (Guidance Framework Version : February 2008).WiX : WiX를 사용하여 안내 자동화 패키지 (GAT)를 설치하려면 어떻게해야합니까?

불행하게도 작성한 안내 패키지에 대해 WiX 설치를 쓰는 방법을 모릅니다. 그렇게하는 방법?

기본적으로 Visual Studio의 안내 - 패키지 마법사는 Visual Studio 배포 프로젝트 작성 만 지원합니다. 이것이 유용 할 수 있습니까?

은 이미 무엇을 발견하기 위해 배포 프로젝트를 분석하려고 :

  • 배포 프로젝트는 사용자 지정 작업을 호출합니다. 작업의 SourcePath는 GuidanceInstaller.dll이고 CustomActionData는 /Configuration="[TARGETDIR]Guidance.xml "입니다.
  • GuidanceInstaller.dll은 Visual Studio 패키지 마법사에서 만든 프로젝트의 출력입니다. 프로젝트는 하나의 클래스로만 구성됩니다.

    using Microsoft.Practices.RecipeFramework; 
    
    [System.ComponentModel.ToolboxItem(false)] 
    public class InstallerClass : ManifestInstaller 
    { 
    } 
    

    모든 설치 작업이 ManifestInstaller 클래스에서 숨겨져있는 것처럼 보입니까?

  • Guidance.xml은 DflGuidance 마법사로 만든 XML 파일입니다.

이 정보를 사용하는 동안 WiX installatin을 만드는 방법은 무엇입니까? 대안 아이디어는 환영하지만! (내가 가진 하나의 생각은 할 수 있다는 것입니다, 내 윅스 설치에서 Visual Studio를 배포 프로젝트의 결과 MSI/CAB 파일을 통합하는 것이 었습니다?)

답변

1

전제 조건이

전제 조건은 검사,

  1. Visual Studio 2008 IDE 설치.
  2. Dotnet Framework 2.0 런타임
  3. GAX 설치.

이를 확인하려면 다음 두 개의 DLL 참조 :

  1. WixNetFxExtension을 (주로 C에서 : \ 프로그램 파일 \ Windows Installer를 XML v3의 \ bin에 \ WixNetFxExtension.dll)
  2. WixUIExtension (대부분 C에서 : \ Program Files \ Windows Installer XML v3 \ bin \ WixUIExtension.dll)

다음과 같이 .wxs 파일에 전제 조건을 추가하십시오.

<!-- Dotnet 2.0 framework installation check - START --> 
    <PropertyRef Id="NETFRAMEWORK20" /> 
    <Condition Message="Framework 2.0 is required for the setup to continue."><![CDATA[INSTALLED or NETFRAMEWORK20]]></Condition> 
    <!-- Dotnet 2.0 framework installation check - END --> 

    <!-- VS.NET and VS.C# installation check - START --> 
    <Property Id="VCSHARP"> 
    <RegistrySearch Id="VCShaprp" Root="HKLM" Key="SOFTWARE\Microsoft\VisualStudio\9.0\InstalledProducts\Microsoft Visual C#" Name="Package" Type="raw" /> 
    </Property> 
    <Condition Message="Please install Visual C# with Visual Studio 2008 to continue. Setup will now abort."><![CDATA[INSTALLED or VCSHARP]]></Condition> 
    <!-- VS.NET and VS.C# installation check - END --> 


    <!-- GAX for VS.2008 installation check - START --> 
    <Property Id="GAX"> 
    <RegistrySearch Id="gax" Root="HKLM" Key="SOFTWARE\Microsoft\VisualStudio\9.0\InstalledProducts\RecipeManagerPackage" Name="Package" Type="raw" /> 
    </Property> 
    <Condition Message="Please install Guidance Automation Extension on Visual Studio 2008 to continue. Setup will now abort."><![CDATA[INSTALLED OR GAX]]></Condition> 
    <!-- GAX for VS.2008 installation check - END --> 

    <!-- Pre-requisite check - END --> 

설치 폴더는 시간이 설치 폴더에 설치 프로그램을 실행 정의합니다. 이 link은 모든 "방법"에 답변하는 데 도움이됩니다.

실행 설치

당신은 아래와 같은 InstallerClass을 수정해야합니다. 이 윅스 설치없이

[System.ComponentModel.ToolboxItem(false)] 
    [RunInstaller(true)] 
public class InstallerClass : ManifestInstaller 
{ 
    public InstallerClass() 
     : base() 
    { } 

    public override void Install(System.Collections.IDictionary stateSaver) 
    { 
     base.Install(stateSaver); 
    } 

    public override void Commit(System.Collections.IDictionary savedState) 
    { 
     base.Commit(savedState); 
    } 

    public override void Rollback(System.Collections.IDictionary savedState) 
    { 
     base.Rollback(savedState); 
    } 
} 

는 "RunInstaller"당신이 당신의 설치 클래스를 실행하는 InstallUtil.exe는 실행 WIX 요소 아래에 사용할 수있는이 후

으로 표시됩니다 어떤 클래스를 말하는없는 예외가 발생합니다.

<InstallExecuteSequence> 
    <RemoveExistingProducts After="InstallInitialize" /> 
    <Custom Action="ManagedInstall" After="InstallFinalize" >NOT Installed</Custom> 
    <Custom Action="ManagedUnInstall" After="InstallInitialize">Installed AND NOT UPGRADINGPRODUCTCODE</Custom> 
    </InstallExecuteSequence> 

    <CustomAction Id="ManagedInstall" 
       Directory='INSTALLLOCATION' 
       ExeCommand='"[WindowsFolder]Microsoft.NET\Framework\v2.0.50727\installUtil.exe" /LogToConsole=false /DesignMode /hive=9.0 /Configuration=&quot;[INSTALLLOCATION]Guidance.xml&quot; &quot;[INSTALLLOCATION]PackageInstaller2008.dll&quot;' 
       Return='check' > 
    </CustomAction> 

    <CustomAction Id="ManagedUnInstall" 
       Directory='INSTALLLOCATION' 
       ExeCommand='"[WindowsFolder]Microsoft.NET\Framework\v2.0.50727\installUtil.exe" /u /LogToConsole=false /DesignMode /hive=9.0 /Configuration=&quot;[INSTALLLOCATION]Guidance.xml&quot; &quot;[INSTALLLOCATION]PackageInstaller2008.dll&quot;' 
       Return='check' > 
    </CustomAction> 

희망이 있습니다.

관련 문제