[wix-users] Removing .pdb From Heat Output
R
ryee at pronktech.com
Wed Jul 11 18:25:07 PDT 2018
Haha, nevermind, I figured it out! It's much simpler than I thought it
would be. Here's the .xsl code for other newbies like me:
<?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"
>
<!-- Recursive copy of everything to allow for editing of any node. Using
<xsl:template match="/">
<xsl:copy-of select="."/>
</xsl:template>
will do a straight copy and not allow editing.
-->
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
<!-- Ignore debug files. -->
<xsl:template match= "//wix:Component[substring(wix:File/@Source,
string-length(wix:File/@Source) - string-length('.pdb') + 1)='.pdb']" />
</xsl:stylesheet>
This is the heat command for post-build in the project Properties in Visual
Studio:
"$(WIX)bin\heat.exe" dir "$(TargetDir)." -template fragment -configuration
Release -platform AnyCPU -gg -cg MainApp_Components -directoryid
INSTALLFOLDER -generate layout -scom -srd -sreg -suid -svb6 -t
$(ProjectDir)PrepHeatFrag.xslt -var var.MainApplication.TargetDir -out
"$(SolutionDir)MainApp_x64msi\MainApp_HeatFragment_x64.wxs"
On Wed, Jul 11, 2018 at 1:56 PM, R <ryee at pronktech.com> wrote:
> I'm trying to make an .xslt file to remove the .pdb files from my
> Heat-generated file. Right now, I believe I need to use
>
> <xsl:key name="exe-search" match="wix:Component[substring(wix:File/@Source,
> string-length(wix:File/@Source) - string-length('.exe') +1)='.exe']"
> use="@Id"/>
>
> as described in the following issue
>
> https://github.com/wixtoolset/issues/issues/5609 .
>
> However, I am new to both Wix and XSLT, so I wasn't sure what to add later
> in the file to cause the removal. I have replaced "exe" above with "pdb",
> but I can't figure out what to do from there.
>
> <?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"
> >
>
> <!-- Recursive copy of everything to allow for editing of any node. -->
> <xsl:template match="@* | node()">
> <xsl:copy>
> <xsl:apply-templates select="@* | node()"/>
> <!--<xsl:apply-templates select="//wix:Component[@Id='*.pdb']"
> />-->
> </xsl:copy>
> </xsl:template>
>
> <!--Remove debug files. -->
> <xsl:key name="pdb-search" match="wix:Component[substring(wix:File/@Source,
> string-length(wix:File/@Source) - string-length('.pdb') + 1)='.pdb']"
> use="@Id"/>
>
> <!-- WHAT DO I PUT HERE? Or is it supposed to be in the above template
> match? -->
>
> </xsl:stylesheet>
>
> Sorry, if it's a silly question. I've never written an installer before,
> so I'd really appreciate your help. Thank you!
>
--
Please reply to confirm that you have read and understand the contents of
this e-mail.
More information about the wix-users
mailing list