On Thu, Jan 8, 2009 at 11:37 AM, Bob Arnson <b...@joyofsetup.com> wrote:

> Colin Fox wrote:
> > First - The fragment file that Heat produces has absolute paths for all
> the
> > file references, which is unacceptable in a multi-developer project. This
> > directory is going to change maybe once every couple of years, so there
> is
> > no point in rebuilding the .wxs fragment for every compile. I would like
> to
> > create it once and just use it, but I need relative paths, like in all
> the
> > other files.
> >
>
> Two solutions come to mind:
>
> <...>




> 2. Use the -t switch to specify an XSL transform to fix it up however
> you want (within the limits of what XSLT can do).
>

I like this approach - the only problem is that XSLT is fantastic at
transforming XML & attributes into something else, it's not so strong when
it comes to transforming a string. What I need is regex - because I
basically need to be able to convert:
c:\Users\myname\Documents\Maindir\V4\Proj\Templates to just Templates. There
are string operations in xslt, but they're a little clumsy.

Before I even get to that stage though, I've got another little problem with
Heat output.

There are 3 different output templates Heat can use - Product, Fragment and
Module. The one that most closely matches what I'm looking for is
Fragment.However, when I create it, if I use -sfrag I end up with one
ComponentGroup that I can use (which is great) but I also en up with a
Directory heirarchy that candle complains about.

<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>
    <Fragment>
        <Directory Id="Template" Name="Template">
        <Directory Id="_12" Name="12">
            <Directory Id="FEATURES" Name="FEATURES">
            <Directory Id="AnnouncementsList" Name="AnnouncementsList">

(If I don't use -sfrag, I just end up with a bunch of undifferentiated
fragments and no way to reference the entire bundle).

I've added both the main Project.wxs and the template.wxs (output of heat)
in my project in Visual Studio, but when it tries to build the template.wxs
file I get this error:

Error    1    The Directory with Id 'Template' is not a valid root
directory.  There may only be a single root directory per product or module
and its Id attribute value must be 'TARGETDIR' and its Name attribute value
must be 'SourceDir'.
C:\Users\colinf\Documents\Metalogix\V4\RMWix\tmpl.wxs    4    1    RMWix


So, to recap: Apparently the only way to bundle in a directory with a big
bunch of files is to use Heat to produce a .wxs file. But I can't figure out
to get that .wxs file integrated into my project.

Does anyone have any docs describing this process, or an example?

Thanks,
   Colin
------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to