我正在使用热工具生成Wix标记,以便在我的设置中包含大量的文件和文件夹。这工作得很好,但我刚刚意识到,由于我将源文件夹添加到了Subversion存储库,所以.svn也想要包含该文件夹。
有没有一种方法可以告诉热火不要收集符合给定标准的文件或文件夹?
我目前使用的是Wix 3.5。
发布于 2011-07-25 23:19:11
不幸的是,现在您必须使用XSL转换来过滤掉“噪声”。这是对热量的功能请求。
发布于 2012-01-06 22:44:24
以下是对我有效的方法:
<?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-07 05:23:01
Subversion1.7已经发布,并且将centralized the metadata storage作为每个工作副本的单个.svn文件夹。因此,我怀疑如果您只是升级您的SVN客户端,您的问题就会消失。
https://stackoverflow.com/questions/6813415
复制相似问题