I am attempting to build a project which contains a couple of rtf files
outside the msi. I have built a small Project.wxs that displays the issue.
In the project I have two components, each with a single file. One is
embedded, the other may not be. When the Package is set to Compressed="yes"
the external file cannot be found - the msi expects it to be in the
SourceRoot, even though it is supposed to be in a subordinate folder. If all
files are compressed, or the Package default is Compressed="no", everything
works correctly. If not compressed, the licenseagreement.rtf should be in
SourceRoot/RTF.

Adding a Layout directive to the uncompressed media has no effect (if the
Package default is compressed). The Source directive is apparently only for
patches, and is ignored.

Wix version 3.0.5419

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>
  <Product Id="*"
           Name="KepTest"
           Language="1033"
           Version="1.0.0.0"
           Manufacturer="Kepware"
           UpgradeCode="*">
    <Package InstallerVersion="301" Compressed="yes" />

    <!-- Comment out the ExternalOEMFolder define if all files are to be
compressed in the MSI -->
    <?define ExternalOEMFolder ?>

    <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />

    <?ifdef ExternalOEMFolder ?>
      <Media Id="2" EmbedCab="no"/>
      <?define CompressExternal="no" ?>
    <?else?>
      <Media Id="2" EmbedCab="yes" Cabinet="RTF.cab"/>
      <?define CompressExternal="yes" ?>
      <?warning ExternalOEMFolder is not defined, all files will be
compressed!?>
    <?endif?>

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder">
        <Directory Id="RTFSDIR" Name="RTF"/>
        <Directory Id="INSTALLDIR" Name="KepTest">
        </Directory>
      </Directory>
    </Directory>

    <DirectoryRef Id="INSTALLDIR" DiskId="1" FileSource="_buildout">
      <Component Id="Server.exe" Feature="ProductFeature"
                 Guid="*">
        <CreateFolder Directory="INSTALLDIR"/>
        <File Id="Server.exe" Name="server.exe" KeyPath="yes" Checksum="yes"
Compressed="yes"/>
      </Component>

    </DirectoryRef>
    <DirectoryRef Id="RTFSDIR" DiskId="2" FileSource="External">
      <Component Id="licenseagreement.rtf" Feature="ProductFeature"
                 Guid="*">
        <File Id="LicenseAgreement.rtf" Name="licenseagreement.rtf"
KeyPath="yes"
              Compressed="$(var.CompressExternal)"/>
      </Component>
    </DirectoryRef>

    <Feature Id="ProductFeature" Title="KepTest" Level="1">
    </Feature>

    <!-- This action resets the external directory to the INSTALLDIR so that
rtf files are correctly placed -->
    <CustomAction Id="Set_RTFSDIR" Property="RTFSDIR" Value="[INSTALLDIR]"
/>

    <InstallExecuteSequence>
      <Custom Action="Set_RTFSDIR" After="ValidateProductID"/>
    </InstallExecuteSequence>
    
  </Product>
</Wix>

thanks,
bill
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Am-I-doing-something-wrong-or-is-this-a-bug-tp5154423p5154423.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to