2014-05-22 4 views
0

x86 및 x64 모두에 대해 하나의 설치 프로그램 (하나의 MSI 파일)을 만들려고합니다. 설치 프로세스에서 대상 시스템 플랫폼에 따라 관련 파일 만 설치하도록하겠습니다. 지금까지 x86 용 MSI는 하나 뿐이 었으며 예상대로 작동했습니다. 이 프로그램 파일 (86) 폴더에 설치되어있는 64 기계에서wix installer 플랫폼 종속성 문제

  1. :

    <!-- Details to support both x86 and x64 platforms--> 
        <?if $(var.Platform) = x64 ?> 
        <?define ProductName = "MyApp (64 bit)" ?> 
        <?define Win64 = "yes" ?> 
        <?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?> 
        <?define ExportReleaseComponentGroup = "Export64ReleaseComponentGroup" ?> 
        <?define MyApplication = "$(var.x64SourcePath)\MyApp.exe" ?> 
        <?else ?> 
        <?define ProductName = "MyApp" ?> 
        <?define Win64 = "no" ?> 
        <?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?> 
        <?define ExportReleaseComponentGroup = "Export32ReleaseComponentGroup" ?> 
        <?define MyApplication = "$(var.win32SourcePath)\MyApp.exe" ?> 
        <?endif ?> 
    

    가 지금은 약간의 오차가 얻을 : 는 지금은이 섹션을 추가했다. x86에서 SetupProject를 컴파일 중입니다. 그 이유가 될 수 있습니까? 관련 코드 :

    <Directory Id="TARGETDIR" Name="SourceDir"> 
    <Directory Id="$(var.PlatformProgramFilesFolder)"> 
    
  2. 설치가 끝나면 응용 프로그램이 실행되지 않습니다. 관련 코드 :

    <!--CA to launch the exe after install--> 
    <Property Id="WixShellExecTarget" Value="$(var.MyApplication)" /> 
    <CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" /> 
    
  3. 바탕 화면 바로 가기와 시작 메뉴 바로 가기가 만들어지지 않습니다. 관련 코드 : 내가 잘못

    <Component Id="ProgramFilesShortcut" Guid="{My-Guid}"> 
        <Condition>MY_DESKTOP_SHORTCUT</Condition> 
        <Shortcut Id="desktopMyApp" Directory="DesktopFolder" Name="MyApp" Target="$(var.MyApplication)" WorkingDirectory="bin" Icon="MyIcon.ico"> 
        </Shortcut> 
        <RemoveFolder Id="ProgramFilesShortcut" On="uninstall" /> 
        <RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Name="installed" Type="integer" Value="1" KeyPath="yes" /> 
    </Component> 
    
    <Component Id="ProgramMenuDir" Guid="{My-Guid}"> 
        <Shortcut Id="startmenuMyApp" Directory="ProgramMenuFolder" Name="MyApp" Target="$(var.MyApplication)" Icon="MyIcon.ico" WorkingDirectory="bin" Arguments="-s"> 
    <!-- Set the AppID in order to get toasts to work --> 
        <ShortcutProperty Key="System.AppUserModel.ID" Value="MyCompany.MyApp" /> 
        </Shortcut> 
        <RemoveFolder Id="ProgramMenuDir" On="uninstall" /> 
        <RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Name="installed" Type="integer" Value="1" KeyPath="yes" /> 
    </Component> 
    

어떤 생각을하고 있는가?

답변

1

32 비트 또는 64 비트 설치에 대해 MSI를 생성 할 수 있도록 컴파일 타임 변수를 사용하고 있습니다. MSI 패키지는 둘 중 하나를 대상으로해야합니다. 어떤 경우에는 중요하지 않지만 디자인은 올바른 장소에서 중요한 구성 요소를 얻는 것입니다.

별도의 32 비트 및 64 비트 빌드간에 소스를 공유 할 수 있습니다.

일단 두 개의 MSI가 있으면 WiX 부트 스트 래퍼 프로젝트를 사용하여이를 묶어서 대상 시스템에 적절한 MSI를 설치할 수 있습니다.