如何系统地设置"ReadOnly"使用热量收集的文件的属性?



我正在使用heat获取一个目录,但是,我找不到为使用heat获得的所有文件设置"ReadOnly"属性的选项。

有人知道在高温下做这件事的方法吗?

对加热生成的片段应用XSLT转换,并将ReadOnly="yes"添加到每个File元素。这个XSLT的作用是:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns="http://schemas.microsoft.com/wix/2006/wi"
    xmlns:wix="http://schemas.microsoft.com/wix/2006/wi">
    <xsl:template match="wix:File">
        <xsl:copy>
            <xsl:apply-templates select="@*" />
            <xsl:attribute name="ReadOnly">
                <xsl:text>yes</xsl:text>
            </xsl:attribute>
            <xsl:apply-templates select="*" />
        </xsl:copy>
    </xsl:template>
    <xsl:template match="*">
        <xsl:copy>
            <xsl:apply-templates select="@*" />
            <xsl:apply-templates select="* | text()"/>
        </xsl:copy>
    </xsl:template>
    <xsl:template match="@* | text()">
        <xsl:copy />
    </xsl:template>
    <xsl:template match="/">
        <xsl:apply-templates />
    </xsl:template>
</xsl:stylesheet>

最新更新