@ledsun blog

無味の味は佳境に入らざればすなわち知れず

WiXの値の共通化方法がわからない

ComponentGroupを使う時につぎのようにSource属性に同じ値を何度か書きました。

<ComponentGroup Id='Processors' Directory="Processors"  Source="..\Project\bin\Release">
  <Component Id="CMP__main.exe" Guid="{xxxx}">
    <File Id="File__main.exe" Name="main.exe" />
  </Component>
</ComponentGroup>

<ComponentGroup Id='Processors' Directory="Processors"  Source="..\Project\bin\Release\etc\">
  <Component Id="CMP__hoge.txt" Guid="{xxxx}">
    <File Id="File__hoge.txt" Name="hoge.txt" />
  </Component>
</ComponentGroup>

これをSource="[SourceDir]\etc\"みたいに書きたいです。 Property要素を使うのかな?と思ったのですが・・・。

の、Chapetr 3. Putting Properties and AppSearch to Work によると、読み取れる要素が決まっているようです。 ComponentGroupでは使えませんでした。