Условия WIX в цели wixproj в зависимости от конфигурации - PullRequest
0 голосов
/ 26 сентября 2018

Я хотел бы иметь возможность извлекать файлы в зависимости от конфигурации проекта установки, скажем, у меня есть Отладка и Выпуск, я мог бы извлечь некоторый файл из местоположения A для Отладки и B для Выпуска.До сих пор я шел к чему-то вроде:

<Target Name="BeforeBuild">
<Exec Condition=" '$(Configuration)' == 'Debug' " Command="pullFromA.cmd" />
<Exec Condition=" '$(Configuration)' == 'Release' " Command="pullFromB.cmd" />

<PropertyGroup>
      <LinkerBaseInputPaths>.\A;.\B</LinkerBaseInputPaths>
      <DefineConstants>ABasePath=.\A;BBasePath=.\B</DefineConstants>
</PropertyGroup>

<HeatDirectory OutputFile="MyPull.wxs" Directory=".\A" PreprocessorVariable="var.ABasePath" ...  />
<HeatDirectory OutputFile="MyPull.wxs" Directory=".\B" PreprocessorVariable="var.BBasePath" ...  />
</Target>

Но я не мог понять, как добавить условия в HeatDirectory, а препроцессор не выглядит применимым к файлу .wixproj.

...