首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用Wix Heat忽略.svn目录?

使用Wix Heat忽略.svn目录?
EN

Stack Overflow用户
提问于 2011-07-25 16:29:01
回答 3查看 6K关注 0票数 12

我正在使用热工具生成Wix标记,以便在我的设置中包含大量的文件和文件夹。这工作得很好,但我刚刚意识到,由于我将源文件夹添加到了Subversion存储库,所以.svn也想要包含该文件夹。

有没有一种方法可以告诉热火不要收集符合给定标准的文件或文件夹?

我目前使用的是Wix 3.5。

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2011-07-25 23:19:11

不幸的是,现在您必须使用XSL转换来过滤掉“噪声”。这是对热量的功能请求。

票数 12
EN

Stack Overflow用户

发布于 2012-01-06 22:44:24

以下是对我有效的方法:

代码语言:javascript
复制
<?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>
票数 13
EN

Stack Overflow用户

发布于 2012-01-07 05:23:01

Subversion1.7已经发布,并且将centralized the metadata storage作为每个工作副本的单个.svn文件夹。因此,我怀疑如果您只是升级您的SVN客户端,您的问题就会消失。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/6813415

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档