12

Heat ツールを使用して Wix マークアップを生成し、セットアップに多数のファイルとフォルダーを含めています。これは正常に機能していましたが、ソース フォルダーを Subversion リポジトリに追加したため、Heat が .svn フォルダーも含めたいと考えていることに気付きました。

特定の条件に一致するファイルまたはフォルダーを収集しないように Heat に指示する方法はありますか?

現在 Wix 3.5 を使用しています。

4

3 に答える 3

13

これが私にとってうまくいくものです:

<?xml version="1.0" ?>
<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:wix="http://schemas.microsoft.com/wix/2006/wi">

    <!-- Copy all attributes and elements to the output. -->
    <xsl:template match="@*|*">
        <xsl:copy>
            <xsl:apply-templates select="@*" />
            <xsl:apply-templates select="*" />
        </xsl:copy>
    </xsl:template>

    <xsl:output method="xml" indent="yes" />

    <!-- Create searches for the directories to remove. -->
    <xsl:key name="svn-search" match="wix:Directory[@Name = '.svn']" use="@Id" />
    <xsl:key name="tmp-search" match="wix:Directory[@Name = 'tmp']" use="@Id" />
    <xsl:key name="prop-base-search" match="wix:Directory[@Name = 'prop-base']" use="@Id" />
    <xsl:key name="text-base-search" match="wix:Directory[@Name = 'text-base']" use="@Id" />
    <xsl:key name="props-search" match="wix:Directory[@Name = 'props']" use="@Id" />

    <!-- Remove directories. -->
    <xsl:template match="wix:Directory[@Name='.svn']" />
    <xsl:template match="wix:Directory[@Name='props']" />
    <xsl:template match="wix:Directory[@Name='tmp']" />
    <xsl:template match="wix:Directory[@Name='prop-base']" />
    <xsl:template match="wix:Directory[@Name='text-base']" />

    <!-- Remove Components referencing those directories. -->
    <xsl:template match="wix:Component[key('svn-search', @Directory)]" />
    <xsl:template match="wix:Component[key('props-search', @Directory)]" />
    <xsl:template match="wix:Component[key('tmp-search', @Directory)]" />
    <xsl:template match="wix:Component[key('prop-base-search', @Directory)]" />
    <xsl:template match="wix:Component[key('text-base-search', @Directory)]" />

    <!-- Remove DirectoryRefs (and their parent Fragments) referencing those directories. -->
    <xsl:template match="wix:Fragment[wix:DirectoryRef[key('svn-search', @Id)]]" />
    <xsl:template match="wix:Fragment[wix:DirectoryRef[key('props-search', @Id)]]" />
    <xsl:template match="wix:Fragment[wix:DirectoryRef[key('tmp-search', @Id)]]" />
    <xsl:template match="wix:Fragment[wix:DirectoryRef[key('prop-base-search', @Id)]]" />
    <xsl:template match="wix:Fragment[wix:DirectoryRef[key('text-base-search', @Id)]]" />
</xsl:stylesheet>
于 2012-01-06T14:44:24.110 に答える
12

残念ながら、今日では、XSL 変換を使用して「ノイズ」を除去する必要があります。これは熱の機能要求です。

于 2011-07-25T15:19:11.417 に答える
1

Subversion 1.7 がリリースされ、作業コピーごとに 1 つの .svn フォルダーとしてメタデータ ストレージが集中化されました。したがって、SVN クライアントをアップグレードするだけで問題は解決すると思います。

于 2012-01-06T21:23:00.530 に答える