用Wix Heat忽略.svn目录?
我正在使用Heat工具生成Wix标记,以便在设置中包含大量文件和文件夹。这很好,但我刚刚意识到,由于我将源文件夹添加到Subversion存储库中,Heat也希望包含.svn文件夹 有没有办法告诉Heat不要获取符合给定条件的文件或文件夹用Wix Heat忽略.svn目录?,wix,ignore,heat,Wix,Ignore,Heat,我正在使用Heat工具生成Wix标记,以便在设置中包含大量文件和文件夹。这很好,但我刚刚意识到,由于我将源文件夹添加到Subversion存储库中,Heat也希望包含.svn文件夹 有没有办法告诉Heat不要获取符合给定条件的文件或文件夹 我目前正在使用Wix 3.5。不幸的是,今天您必须使用XSL转换来过滤掉“噪音”。这是一个加热功能请求。以下是适用于我的功能: <?xml version="1.0" ?> <xsl:stylesheet version="1.0"
我目前正在使用Wix 3.5。不幸的是,今天您必须使用XSL转换来过滤掉“噪音”。这是一个加热功能请求。以下是适用于我的功能:
<?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>
Subversion 1.7已经发布,每个工作副本都有一个.svn文件夹。因此,我怀疑只要升级您的SVN客户端,您的问题就会消失。我只安装了3.0,因此可能有更好的方法,但您可以使用heat-t
并提供XSL样式表来删除.SVN
下的任何内容。谢谢Anton。我也会遇到这样的选择,所以我会看一看。好的,谢谢罗布。我读了你的答案,想知道如何在Heat.exe生成的WX上应用XSL。所以,如果有人也在寻找它,您只需要使用Heat.exe-t标志。请参阅:+1这是我用来筛选代码契约目录的同一解决方案如果获得未解决的符号错误引用,请将use=“@Id”
更改为use=“degendant::wix:Component/@Id”
,如前所述,我认为这里给出了解决此问题的更好解决方案: