The source has no affect on the location the file is placed when it is 
installed on the target machine.  That is set by the directory structure 
you have defined with the directory components.

The source should point to the file location of CID_Demo.pdf on your 
machine that is to be included in the installation.  This can be an 
absolute reference such as
C:\program files\installer\CID_Demo.pdf

Or a relative one such as in your snippet
SourceDir\CID_Demo.pdf

If a relative path is given, Light uses the folder location of the 
source file it's processing as a base and adds the source location to it 
to create an absolute reference to the file it needs.  If the file does 
not exist in that location, Light will then give an error.

For example, if the fragment containing the snippet below is located in 
a file in c:\program files\Wix, Light will be looking to include the 
following file:
c:\program files\Wix\SourceDir\CID_Demo.pdf.

The simplest way to fix it is just to change the source to be the actual 
location of the CID_Demo.pdf file on your machine.

Chris 


-----Original Message-----
From: André Werlang [mailto:and...@gvdasa.com.br] 
Sent: Thursday, September 03, 2009 10:24
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] Specifying source files

Hi.

I'm generating a .wxs for a directory structure called wPDF just below 
base input path. i.e.

+ SourceDir
|
+--+ wPDF
   |
   +-- CID_Demo.pdf
       ...

It is generated a fragment like this:

        <DirectoryRef Id="APPLICATIONFOLDER">
            <Directory Id="dir905B51C2A07DFF9A1FC94352B9FF6E43" 
Name="wPDF">
                <Component Id="cmp033B46C482346EB39AB9256BCF6ACFBA" 
Guid="{C2D8AB1E-A06C-4132-8D94-8A51EF576ADA}">
                    <File Id="fil976FBB6708A816CF5F68BBDF59FFA4F4" 
KeyPath="yes" Source="SourceDir\CID_Demo.pdf" />
                </Component>
        ...

Light isn't able of locating source files, because they're in wPDF 
subdirectory. If I change references to SourceDir\wPDF\, then it works. 
What I find weird is that if I remove SourceDir leaving the file alone, 
it still can't locate the file, I'd expect it to use the path of the 
Directory above. And I hadn't managed to make Directory/@FileSource 
work.

My question is: how can I generate this source file ready to link? I've 
seen -var option, maybe it's the easiest way...any tips?

Thanks in advance.

------------------------------------------------------------------------
------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 
30-Day trial. Simplify your report design, integration and deployment - 
and focus on what you do best, core application coding. Discover what's 
new with Crystal Reports now.  http://p.sf.net/sfu/bobj-july 
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to