次のような .wxs ファイルがあります。
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<Directory>
<Directory Id="d1">
<Component Id="c1" ...>
<File Id="f1" KeyPath="yes" ... />
</Component>
<Component Id="c2" ...>
<File Id="f2" KeyPath="yes" ... />
</Component>
<Component Id="c3" ...>
<File Id="f3" KeyPath="yes" ... />
</Component>
</Directory>
<Directory>
<Component>
...
</Directory>
...
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="cg1">
<ComponentRef Id="c1" />
<ComponentRef Id="c2" />
<ComponentRef Id="c3" />
...
</ComponentGroup>
</Fragment>
</Wix>
上記のコンポーネントを「マージ」したい、つまり、ファイル f2、f3 をコンポーネント c1 に移動し、コンポーネント c2、c3 と c2、c3 のコンポーネント参照を削除したい。私の実際のソース コードには、コンポーネントを含むさらに多くのディレクトリがあります。私の意図は、コンポーネントの数を減らすことです。つまり、次のようなパターンの場合
<Directory>
<Component>
<File KeyPath="yes" />
</Component>
<Component>
<File KeyPath="yes" />
</Component>
...
<Component>
<File KeyPath="yes" />
</Component>
</Directory>
次のような多くのファイルを含む1つのコンポーネント(おそらく最初のコンポーネント)にそれらを減らしたい:
<Directory>
<Component>
<File KeyPath="yes" />
<File />
...
<File />
</Component>
</Directory>
1 つのコンポーネントに多くのファイルを含めることはお勧めできませんが、アンインストール時間を短縮するためにそうしたいと考えています。現在、私のインストーラーのアンインストールにはかなりの時間がかかります。これは、コンポーネントが多すぎる (20,000 程度) ためだと思います。
どんな助けでも大歓迎です。ありがとうございました。