Re: [WiX-users] CopyFile with pattern doesn't copy files - it looks like it doesn't do anything at all!

2011-04-13 Thread Tobias S
Check out src\Setup\Msi\Lux.wxs or src\Setup\Msi\VStudio.wxs from wix
sources for a working sample:

   
   ...


At first glance Component/@Directory is sourcedir and
Component/CopyFile/@DestinationProperty destinationdir...


2011/4/13 Amber Scouras :
> I'm using WiX 3.5 (an RC from late in 2010).
>
> My core problem is that I have an installer that needs to deploy the same 
> files to multiple Components.  In this thread on StackOverflow 
> (http://stackoverflow.com/questions/4941602/features-installed-to-different-locations-but-referencing-the-same-components),
>  Rob Mensching states:
>
>>A Component can only be installed once via an MSI. Each Component can only be 
>>installed to a single Directory. To have the contents of a Component 
>>installed to two different locations, you either have to create another 
>>Component with the same content or try to use the CopyFile element to 
>>duplicate the content.
>
> The files are referenced in the .wxs via a .wxi include, which means their Id 
> properties are static.  I tried various methods of namespacing these Ids at 
> include time, but that didn't work for various reasons (I can go into these 
> if necessary, but would prefer not to for brevity).  So, for now, I've 
> eliminated the possibility of duplicating the File elements per Component.  
> That leaves me with just the CopyFile option.
>
> I created a new Component for the shared files that installs to its own 
> directory and I added a single CopyFile element (using a pattern of "*" in 
> the SourceName attribute) to each of the existing Components that should copy 
> the files.  The new Component installs correctly but, unfortunately, the 
> CopyFile elements seem to do nothing.  The files just don't copy.  In trying 
> to debug the issue, I installed with msiexec from the command line with full 
> logging (/lvx*) and could find no trace of relevant file copy logging.  
> Without any indication of what I'm doing wrong, I can't debug the problem and 
> I'm hoping somebody on this list can help me.  Here are the approaches I've 
> tried so far (none have worked):
>
> First Approach
> Use CopyFile's SourceDirectory and DestinationDirectory attributes with a 
> SourceName pattern.  Note that I've also tried with a pattern of "*.*", a 
> pattern of ".*", pattern of "*.dll", and without a pattern (specifying a 
> single specific file to be copied), which also did not work.
>
>      
>        
>          
>             Guid="49779A88-652A-11E0-AE98-1EF2DFD72085">
>              
>            
>          
>          
>             Guid="C743A1E6-7E71-4196-979F-F3218421BCCE">
>               SourceDirectory="SHARED_BINARIES_DIR" SourceName="*" 
> DestinationDirectory="SERVICE_ONE_DIR"/>
>            
>          
>          
>        
>      
>
>     
>        
>      
>      
>        
>      
>
> Second Approach
> Use SourceProperty and DestinationProperty attributes instead of the 
> *Directory attributes.
>
>      
>        
>          
>             Guid="49779A88-652A-11E0-AE98-1EF2DFD72085">
>              
>            
>          
>          
>             Guid="C743A1E6-7E71-4196-979F-F3218421BCCE">
>               SourceProperty="SHARED_BINARIES_DIR" SourceName="*" 
> DestinationProperty="SERVICE_ONE_DIR"/>
>            
>          
>          
>        
>      
>
>     
>        
>      
>      
>        
>      
>
> Third Approach
> Explicitly create new properties with CustomActions and use those properties 
> in SourceProperty and DestinationProperty - this seemed silly and redundant, 
> but it appears that it worked in this thread 
> (http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/CopyFile-doesn-t-work-td2592289.html).
>   From the install log, I can tell that the new properties were created 
> properly, but nothing else seems to have changed:
>
>       Property="SHARED_BINARIES_DIR_PROPERTY" Value="[SHARED_BINARIES_DIR]"/>
>       Property="SERVICE_ONE_DIR_PROPERTY" Value="[SERVICE_ONE_DIR]"/>
>
>      
>        
>          
>             Guid="49779A88-652A-11E0-AE98-1EF2DFD72085">
>              
>            
>          
>          
>             Guid="C743A1E6-7E71-4196-979F-F3218421BCCE">
>               SourceProperty="SHARED_BINARIES_DIR_PROPERTY" SourceName="*" 
> DestinationProperty="SERVICE_ONE_DIR_PROPERTY"/>
>            
>          
>          
>        
>      
>
>     
>        
>      
>      
>        
>      
>
>      
>         Before="InstallInitialize"/>
>        
>      
>
>
> Any help or insight is greatly appreciated!
>
> Amber Scouras // Senior Software Engineer // The Trade Desk
> follow us @ twitter // 
> facebook // 
> linkedin // 
> www.thetradedesk.com
>
> This email could contain material that is subject to copyright or trade 
> protection, confidential and/or privileged and, in all cases, provided for

[WiX-users] CopyFile with pattern doesn't copy files - it looks like it doesn't do anything at all!

2011-04-12 Thread Amber Scouras
I'm using WiX 3.5 (an RC from late in 2010).

My core problem is that I have an installer that needs to deploy the same files 
to multiple Components.  In this thread on StackOverflow 
(http://stackoverflow.com/questions/4941602/features-installed-to-different-locations-but-referencing-the-same-components),
 Rob Mensching states:

>A Component can only be installed once via an MSI. Each Component can only be 
>installed to a single Directory. To have the contents of a Component installed 
>to two different locations, you either have to create another Component with 
>the same content or try to use the CopyFile element to duplicate the content.

The files are referenced in the .wxs via a .wxi include, which means their Id 
properties are static.  I tried various methods of namespacing these Ids at 
include time, but that didn't work for various reasons (I can go into these if 
necessary, but would prefer not to for brevity).  So, for now, I've eliminated 
the possibility of duplicating the File elements per Component.  That leaves me 
with just the CopyFile option.

I created a new Component for the shared files that installs to its own 
directory and I added a single CopyFile element (using a pattern of "*" in the 
SourceName attribute) to each of the existing Components that should copy the 
files.  The new Component installs correctly but, unfortunately, the CopyFile 
elements seem to do nothing.  The files just don't copy.  In trying to debug 
the issue, I installed with msiexec from the command line with full logging 
(/lvx*) and could find no trace of relevant file copy logging.  Without any 
indication of what I'm doing wrong, I can't debug the problem and I'm hoping 
somebody on this list can help me.  Here are the approaches I've tried so far 
(none have worked):

First Approach
Use CopyFile's SourceDirectory and DestinationDirectory attributes with a 
SourceName pattern.  Note that I've also tried with a pattern of "*.*", a 
pattern of ".*", pattern of "*.dll", and without a pattern (specifying a single 
specific file to be copied), which also did not work.

  

  

  

  
  

  

  
  

  

 

  
  

  

Second Approach
Use SourceProperty and DestinationProperty attributes instead of the *Directory 
attributes.

  

  

  

  
  

  

  
  

  

 

  
  

  

Third Approach
Explicitly create new properties with CustomActions and use those properties in 
SourceProperty and DestinationProperty - this seemed silly and redundant, but 
it appears that it worked in this thread 
(http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/CopyFile-doesn-t-work-td2592289.html).
  From the install log, I can tell that the new properties were created 
properly, but nothing else seems to have changed:

  
  

  

  

  

  
  

  

  
  

  

 

  
  

  

  


  


Any help or insight is greatly appreciated!

Amber Scouras // Senior Software Engineer // The Trade Desk
follow us @ twitter // 
facebook // 
linkedin // 
www.thetradedesk.com

This email could contain material that is subject to copyright or trade 
protection, confidential and/or privileged and, in all cases, provided for the 
sole use of the intended recipient. Any reliance or distribution by others or 
forwarding without express permission is strictly prohibited. If you are not 
the intended recipient, please contact the sender and delete all copies.

--
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users