2012-01-26 3 views
24

WiX 3.6 설치 스크립트의 실제 예제를 만들려고했습니다. 현재 WiX 3.5를 사용 중이므로 product.wxs 스크립트에서 생성하는 MSI 파일의 사전 요구 사항으로 .NET 4 Client Profile framework을 설치하고자합니다. WiX 3.6이 앞으로 나아갈 수있는 가장 좋은 방법 인 것 같습니다..NET 4 클라이언트 프로파일을 부트 스트랩하는 완전한 WiX 3.6 번들 예제

WiX 3.6에서이 작업을 수행하는 방법의 예가 있습니까? 당신은 별도의 윅스 부트 스트 래퍼 프로젝트를 만들 필요가

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

    <!-- Version change handling --> 
    <?define UpgradeCode="###############################"?> 
    <?ifdef env.BUILD_NUMBER ?> 
    <?define ProductVersion="2.6.$(env.BUILD_NUMBER).0"?> 
    <?else ?> 
    <?define ProductVersion="2.6.0.0"?> 
    <?endif ?> 

    <Product Id="*" Name="###############################" Language="1033" Version="$(var.ProductVersion)" Manufacturer="###############################" UpgradeCode="$(var.UpgradeCode)"> 
     <Package InstallerVersion="200" Compressed="yes" /> 

     <!-- Custom actions for this installer --> 
     <Binary Id="###############################.dll" SourceFile="..\..\Libraries\###############################.CA.dll" /> 

     <!-- Kill ##### before installation begins --> 
     <CustomAction Id="Kill#####ActionId" BinaryKey="###############################.dll" DllEntry="Kill#####Action" Execute="immediate" Impersonate="yes" Return="check" /> 
     <InstallExecuteSequence> 
      <Custom Action="Kill#####ActionId" Before="InstallInitialize" /> 
     </InstallExecuteSequence> 

     <!-- ADD/REMOVE Programs icon --> 
     <Icon Id="##############.ico" SourceFile="D:\##############\Input_WIX\NonHeat\##############.exe" /> 
     <Property Id="ARPPRODUCTICON" Value="##############.ico" /> 
     <Property Id="ARPHELPLINK" Value="http://##############" /> 

     <!-- EULA agreement --> 
     <WixVariable Id="WixUILicenseRtf" Value="D:\##############\Input_WIX\Heat\License.rtf" /> 

     <!-- Installer images --> 
     <WixVariable Id="WixUIBannerBmp" Value="InstallerTopImage.rle" /> 
     <WixVariable Id="WixUIDialogBmp" Value="InstallerSideImage.rle" /> 
     <UIRef Id="WixUI_Minimal" /> 
     <Upgrade Id="$(var.UpgradeCode)"> 
      <UpgradeVersion Minimum="1.0.0.0" Maximum="99.0.0.0" Property="PREVIOUSVERSIONSINSTALLED" IncludeMinimum="yes" IncludeMaximum="no" /> 
     </Upgrade> 

     <!-- Require ##### to be installed --> 
     <Property Id="#####4.INSTALLPATH"> 
      <RegistrySearch Id="RegistryFoundInstallPath" Key="SOFTWARE\McNeel\#####ceros\4.0" Root="HKLM" Name="InstallPath" Type="directory" /> 
     </Property> 
     <Property Id="#####4.RECENT"> 
      <RegistrySearch Id="RegistryFoundMostRecent" Key="SOFTWARE\McNeel\#####ceros\4.0" Root="HKLM" Name="MostRecent" Type="raw" /> 
     </Property> 
     <Property Id="VRAYCOMMONDIR"> 
      <RegistrySearch Id="ReigstryVRayCommon" Key="Software\ASGvis" Root="HKLM" Name="Common_dir" Type="raw" /> 
     </Property> 
     <Condition Message="##### 4 required before install"> 
      #####4.RECENT 
     </Condition> 

     <!-- Require administrator priveleges --> 
     <Condition Message="You need to be an administrator to install this product."> 
      Privileged</Condition> 

     <!-- Require .NET 3.5 SP1 to install --> 
     <PropertyRef Id="NETFRAMEWORK35_SP_LEVEL" /> 
     <Condition Message='This setup requires the .NET Framework 3.5 with Service Pack 1 be installed.'> 
      <![CDATA[Installed OR (NETFRAMEWORK35_SP_LEVEL AND NETFRAMEWORK35_SP_LEVEL = "#1")]]> 
     </Condition> 

     <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" /> 

     <Directory Id="TARGETDIR" Name="SourceDir"> 
      <Directory Id="#####4.INSTALLPATH"> 
       <Directory Id="#####4.SYSTEM" Name="System"></Directory> 
      </Directory> 

      <Directory Id="ProgramFilesFolder"> 
       <Directory Id="INSTALLLOCATION" Name="##############"></Directory> 
       <Directory Id="DesktopFolder" Name="Desktop" /> 
       <Directory Id="ProgramMenuFolder"> 
        <Directory Id="ProgramMenuDir" Name="##############" /> 
       </Directory> 
      </Directory> 

      <!-- Set FULL permissions to our shared folders --> 
      <Directory Id="CommonAppDataFolder"> 
       <Directory Id="CommonApp##############" Name="##############"> 
        <Directory Id="MODELLIBPATH" Name="##############"> 
         <Component Id="##############UserPermissions" Guid="##############"> 
          <CreateFolder> 
           <util:PermissionEx GenericRead="yes" GenericWrite="yes" GenericExecute="yes" Delete="yes" DeleteChild="yes" User="Users" Domain="[MachineName]" /> 
          </CreateFolder> 
         </Component> 
        </Directory> 
        <Directory Id="APPDATAPATH" Name="#####"> 
         <Component Id="##############UserPermissions" Guid="FC4BF85F-E7A4-45DE-B25C-8F9419E75307"> 
          <CreateFolder> 
           <util:PermissionEx GenericRead="yes" GenericWrite="yes" GenericExecute="yes" Delete="yes" DeleteChild="yes" User="Users" Domain="[MachineName]" /> 
          </CreateFolder> 
         </Component> 
        </Directory> 
       </Directory> 
      </Directory> 

      <Directory Id="FontsFolder"></Directory> 
      <Component Id="##############RegistryKeys" Guid="17A55BEA-605D-425a-AAEE-F35EC8C1061E" DiskId="1" KeyPath="yes"> 
       <RegistryValue Id="##############RegInstallDir" Root="HKLM" Key="Software\##############\##############" Name="InstallPath" Action="write" Type="string" Value="[INSTALLLOCATION]" /> 
       <RegistryValue Id="##############RegLibraryPath" Root="HKLM" Key="Software\##############\##############" Name="LibraryPath" Action="write" Type="string" Value="[INSTALLLOCATION]Library" /> 
       <RegistryValue Id="##############RegModelLibraryPath" Root="HKLM" Key="Software\##############\##############" Name="ModelLibraryPath" Action="write" Type="string" Value="[MODELLIBPATH]" /> 
       <RegistryKey Id="##############Reg#####PluginKey" Root="HKLM" Key="Software\McNeel\#####ceros\4.0\[#####4.RECENT]\Plug-ins\FCAF502A-1572-42a9-A2C3-F25D7953B1A5\PlugIn" Action="create" /> 
       <RegistryValue Id="##############RegName#####4" Root="HKLM" Key="Software\McNeel\#####ceros\4.0\[#####4.RECENT]\Plug-ins\FCAF502A-1572-42a9-A2C3-F25D7953B1A5" Name="Name" Action="write" Type="string" Value="##############Server" /> 
       <RegistryValue Id="##############Reg#####4" Root="HKLM" Key="Software\McNeel\#####ceros\4.0\[#####4.RECENT]\Plug-ins\FCAF502A-1572-42a9-A2C3-F25D7953B1A5" Name="FileName" Action="write" Type="string" Value="[INSTALLLOCATION]##############\##############Server.rhp" /> 
       <RemoveRegistryKey Id="##############Skin" Root="HKLM" Key="Software\McNeel\#####ceros\4.0\Scheme: ##############" Action="removeOnInstall" /> 
      </Component> 
      <Component Id="VRayKeys" Guid="{96E9EBAC-48B4-4517-9409-F921BE92B3AA}" DiskId="1" KeyPath="yes" NeverOverwrite="yes"> 
       <RegistryValue Id="VRayKey" Root="HKLM" Key="Software\##############\Data" Name="Data" Action="write" Type="string" Value="FFFAAA" /> 
      </Component> 
      <Component Id="VRayRegistryKeys" Guid="{4D8815FA-85E2-421f-8BF9-F7F5A4133E96}" DiskId="1" KeyPath="yes" NeverOverwrite="yes" Permanent="yes"> 
       <Condition> 
        NOT VRAYCOMMONDIR 
       </Condition> 
       <RegistryValue Root="HKLM" Key="Software\ASGvis" Name="common_dir" Action="write" Type="string" Value="[INSTALLLOCATION]VRay\ASGVIS" /> 
      </Component> 
     </Directory> 
     <Feature Id="##############Features" Title="#####" Level="1"> 
      <ComponentGroupRef Id="##############" /> 
      <ComponentRef Id="##############LibraryUserPermissions" /> 
      <ComponentRef Id="##############SharedUserPermissions" /> 
      <ComponentRef Id="##############RegistryKeys" /> 
      <ComponentRef Id="VRayRegistryKeys" /> 
      <ComponentRef Id="VRayKeys" /> 
      <ComponentRef Id="ProgramMenuShortcuts" /> 
      <ComponentRef Id="#####App" /> 
      <ComponentRef Id="WixShortCut" /> 
      <ComponentRef Id="##############ShortCut" /> 
      <ComponentRef Id="TroubleShortCut" /> 
      <ComponentRef Id="DesktopShortcut" /> 
      <ComponentRef Id="VRayAuth" /> 
      <ComponentRef Id="Fonts" /> 
     </Feature> 
     <InstallExecuteSequence> 
      <RemoveExistingProducts Before="InstallInitialize" /> 
     </InstallExecuteSequence> 
     <UI /> 
    </Product> 

    <Fragment> 
     <Icon Id="ShortCutIcon" SourceFile="D:\##############Stage\Input_WIX\NonHeat\##############.exe" /> 
     <Icon Id="TroubleShooterIcon" SourceFile="D:\##############Stage\Input_WIX\Heat\TroubleShooter\TroubleShooter.exe" /> 
     <Icon Id="TeamViewerIcon" SourceFile="D:\##############Stage\Input_WIX\Heat\support.exe" /> 
     <DirectoryRef Id="ProgramFilesFolder"> 
      <Component Id="ProgramMenuShortcuts" Guid="881BD571-4FAF-4aa4-AB6E-15BB1629BE06"> 
       <CreateFolder Directory="ProgramMenuDir" /> 
       <RemoveFolder Id="RemoveMenuShortcuts" Directory="ProgramMenuDir" On="uninstall" /> 
       <RegistryValue Root="HKCU" Key="Software\##############\##############ShortCut" Name="InstalledStartMenuShortcuts" Type="integer" Value="1" /> 
      </Component> 
     </DirectoryRef> 
     <!-- This file is not Heat'ed, so we need this to install the executable --> 
     <DirectoryRef Id="INSTALLLOCATION" FileSource="Files"> 
      <Component Id="##############App" Guid="FA41A015-7D80-4e50-A909-94BBA4D7546A"> 
       <File Id="#####_Executable" Vital="yes" Source="D:\##############Stage\Input_WIX\NonHeat\##############.exe" /> 
      </Component> 
     </DirectoryRef> 
     <DirectoryRef Id="INSTALLLOCATION" FileSource="Files"> 
      <Component Id="WixShortCut" Guid="{8F2596B8-B7EC-4f40-AD64-DFC182A9353A}"> 
       <RegistryKey Root="HKCU" Key="Software\##############\##############ShortCut" Action="create"> 
        <RegistryValue Name="ShortCut" Value="1" Type="integer" KeyPath="yes" /> 
       </RegistryKey> 
       <Shortcut Id="ProgramMenuApplicationShortcut" Name="##############" Target="[###############_Executable]" Directory="ProgramMenuDir" Show="normal" Icon="ShortCutIcon" /> 
      </Component> 
     </DirectoryRef> 
     <DirectoryRef Id="INSTALLLOCATION"> 
      <Component Id="TroubleShortCut" Guid="{9E960528-8798-41DD-8DEE-9C3336CD3C88}"> 
       <RegistryKey Root="HKCU" Key="Software\#####\#####ShortCut" Action="create"> 
        <RegistryValue Name="ShortCut2" Value="1" Type="integer" KeyPath="yes" /> 
       </RegistryKey> 
       <Shortcut Id="TroubleshooterStartmenuShortcut" Name="Troubleshooter" Target="[INSTALLLOCATION]TroubleShooter\TroubleShooter.exe" Directory="ProgramMenuDir" Icon="TroubleShooterIcon" Show="normal"></Shortcut> 
      </Component> 
     </DirectoryRef> 
     <DirectoryRef Id="INSTALLLOCATION"> 
      <Component Id="TeamViewerShortCut" Guid="{AD99CAC6-E485-444B-B075-2FD8BE4C87A8}"> 
       <RegistryKey Root="HKCU" Key="Software\#####\#####ShortCut" Action="create"> 
        <RegistryValue Name="ShortCut3" Value="1" Type="integer" KeyPath="yes" /> 
       </RegistryKey> 
       <Shortcut Id="TeamviewerStartmenuShortcut" Name="Remote Assistance" Target="[INSTALLLOCATION]support.exe" Directory="ProgramMenuDir" Icon="TeamViewerIcon" /> 
      </Component> 
     </DirectoryRef> 
     <DirectoryRef Id="INSTALLLOCATION" FileSource="Files"> 
      <Component Id="DesktopShortcut" Guid="{EA9632D1-08ED-4257-A78F-B2373A65A5CF}"> 
       <RegistryKey Root="HKCU" Key="Software\#####\##############ShortCut" Action="createAndRemoveOnUninstall"> 
        <RegistryValue Name="desktopShortcut" Value="1" Type="integer" KeyPath="yes" /> 
       </RegistryKey> 
       <Shortcut Id="DesktopShortcut" Directory="DesktopFolder" Name="#####" Icon="ShortCutIcon" Target="[######_Executable]" /> 
      </Component> 
     </DirectoryRef> 
     <DirectoryRef Id="FontsFolder"> 
      <Component Id="Fonts" Guid="{8C8EE16C-92B6-4926-A41C-55B79429071C}" NeverOverwrite="yes"> 
       <File Id="bradley" Source="Fonts\bradhitc.ttf" TrueType="yes" /> 
      </Component> 
     </DirectoryRef> 
    </Fragment> 
    <Fragment> 
     <DirectoryRef Id="#####4.SYSTEM"> 
      <Component Id="VRayAuth" Guid="{ABED80D1-6EBA-48db-83E0-7CF48B0A55E8}"> 
       <File Id="VRayAuthFile" KeyPath="yes" Source="..\..\Libraries\VRayAuth.dll" /> 
      </Component> 
     </DirectoryRef> 
    </Fragment> 
</Wix> 

답변

3

:

여기에 오늘날 우리가 사용하는 우리의 3.5 스크립트입니다. WiX 3.6 설명서의 Building Installation Package Bundles을 참조하십시오.

+1

언급 된 BryanJ 문서는 Wix 3.6과 함께 설치되었습니다. Windows 시작 메뉴에서 찾을 수 있습니다. – deerchao

1

, 당신이 할 필요가있다 :

  1. 당신의 부트 스트 래퍼/관리 부트 스트 래퍼 응용 프로그램 프로젝트에 파일 WixNetFxExtension.dll에 대한 참조를 추가합니다.

  2. 체인의 첫 번째 항목으로 다음을 추가하십시오. 그것 뿐이다

    <PackageGroupRef Id="NetFx40Web"/> 
    

. 추가 정보 및 옵션은 the WixNetfxExtension documentation에 있습니다.

+5

그는 체인이 없으므로 이것이 도움이되는 것을 보지 못했습니다. – Jeff

+2

개인적으로 나는 op가 선택한 대답이 체인을 필요로하므로 * 도움이된다고 주장 할 것입니다. 사실 모든 대답은 부트 스트 래퍼와 관련됩니다. 일단 KMoraz의 링크에서 부트 스트 래퍼를 사용하면, 필수 요구 사항을 추가하는 것은 PackageGroupRef 라인을 추가하는 것만 큼 간단합니다. –

+0

까다로운 부분은 참고 자료가 아니라 부트 스트랩입니다. 나는 이것을 용서받는 대답으로 생각하지 않습니다. – LeoPucciBr