[英]How to change $(var.Platform) from x86 to Win32 in Wix
我有一個Visual C ++ 2013解決方案,其中包括許多C ++項目和一個WIX安裝程序項目。 在x64平台上,一切正常。 但是在x86平台上,C ++項目的$(OutDirectory)$(Platform)$(Configuration)是... Win32 ...,而WIX的$(OutDirectory)$(Platform)$(Configuration)是... x86。 .. 我能做什么?
您應該將所有項目都添加到WiX項目中作為參考。 可以說,您的一個C ++項目稱為“ MyHelperProject”。 您可以像這樣訪問該項目的輸出二進制文件:
<Component Guid="{723E4174-C9D2-4385-844E-C7D035B0C8FB}" Directory="INSTALL_ROOT">
<File Source="$(var.MyHelperProject.TargetPath)" KeyPath="yes"/>
</Component>
或者,如果您要從該構建中獲取其他文件:
<Component Guid="{A0D64469-A90C-4DF3-A54B-B386AC49E6E7}" Directory="INSTALL_ROOT">
<File Source="$(var.MyHelperProject.TargetDir)required_file.txt" KeyPath="yes"/>
</Component>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.