Due to user confusion, our app requires separate installers for 32-bit and 64-bit versions of Windows. While the 32-bit installer runs fine on win64, it has the potential to create support headaches and we would like to prevent this from happening.
32 ビット MSI インストーラーが 64 ビット Windows マシンで実行されないようにしたいと考えています。そのために、私は次の条件を持っています。
<Condition Message="You are attempting to run the 32-bit installer on a 64-bit version of Windows.">
<![CDATA[Msix64 AND (NOT Win64)]]>
</Condition>
Win64 を次のように定義すると:
<?if $(var.Platform) = "x64"?>
<?define PlatformString = "64-bit"?>
<?define Win64 ?>
<?else?>
<?define PlatformString = "32-bit"?>
<?endif?>
問題は、このチェックを正しく機能させることができないということです。常に発火するか、まったく発火しないかのいずれかです。msix64
目標は、コンパイル時変数に対してランタイム変数の存在をチェックしWin64
、これらが一致しない場合はエラーをスローすることですが、ロジックは意図したとおりに機能していません。誰かがより良い解決策を思いつきましたか?