x86 및 x64 모두에 대해 하나의 설치 프로그램 (하나의 MSI 파일)을 만들려고합니다. 설치 프로세스에서 대상 시스템 플랫폼에 따라 관련 파일 만 설치하도록하겠습니다. 지금까지 x86 용 MSI는 하나 뿐이 었으며 예상대로 작동했습니다. 이 프로그램 파일 (86) 폴더에 설치되어있는 64 기계에서wix installer 플랫폼 종속성 문제
:
가 지금은 약간의 오차가 얻을 : 는 지금은이 섹션을 추가했다. x86에서 SetupProject를 컴파일 중입니다. 그 이유가 될 수 있습니까? 관련 코드 :<!-- 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 ?>
<Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="$(var.PlatformProgramFilesFolder)">
설치가 끝나면 응용 프로그램이 실행되지 않습니다. 관련 코드 :
<!--CA to launch the exe after install--> <Property Id="WixShellExecTarget" Value="$(var.MyApplication)" /> <CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />
바탕 화면 바로 가기와 시작 메뉴 바로 가기가 만들어지지 않습니다. 관련 코드 : 내가 잘못
<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>
어떤 생각을하고 있는가?