Can anyone shed some light on using Fragments/Component Groups and Directories? Our current installer is a HUGE (long) mess of Wix code mostly in the Product.xml and it's just unwieldy to say the least when it comes to modifying. In an effort to make that job easier (for me:) ) I tried to copy all the directory structure to one .wxs (example below) -
<?xml version="1.0" encoding="utf-8"?> <?ifndef __DEFINITIONS_WXI__?> <?include Definitions.wxi?> <?endif?> <?ifndef __VERSIONDEFINITIONS_WXI__?> <?include VersionDefinitions.wxi?> <?endif?> <Fragment> <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="WINDOWSFOLDER" SourceName="Windows" FileSource="$(var.INSTALLIMAGEPATH)\[Windows]"> <Directory Id="CURSORS" Name="Cursors"> </Directory> <Directory Id="SYSTEMFOLDER" SourceName="System32" FileSource="$(var.INSTALLIMAGEPATH)\[System32]"> </Directory> </Directory> <Directory Id="PROGRAMMENUFOLDER" Name="Programs"> <Directory Id="TSSHORTCUTS" Name="$(var.PRODUCTNAME_MAJORMINORVERSION)" > </Directory> </Directory> <Directory Id="DESKTOPFOLDER" SourceName="Desktop"> </Directory> <Directory Id="APPDATAFOLDER" SourceName="Application Data"> <Directory Id="APPDATAFOLDERMICROSOFT" Name="Microsoft"> <Directory Id="APPDATAFOLDERMICROSOFTIE" Name="Internet Explorer"> <Directory Id="APPDATAFOLDERMICROSOFTIEQL" Name="Quick Launch" /> </Directory> </Directory> <snip> My understanding was that, for example, "SYSTEMFOLDER" would resolve into C:\Windows\System32 because of the nesting of the <Directory> entries in one another. All of this structure was pulled from the original installer code (which worked) the only difference being that in the original code we had <Component>s sprinkled between the folders. My idea was to have the folder structure in one .wxs and the logic in another referencing the Directory names from my DirectoryStructure.wxs file. The first thing I ran into was the need to specify the Source path for all of my ComponentGroups - <Fragment> <ComponentGroup Id="Ref_WAVFiles" Directory="PROGRAM" Source="$(var.INSTALLIMAGEPATH)\[ProductInstallationRoot]\Program"> <Component Feature="TradeStationAll" Guid="{5D3EED4F-63BE-4B8F-96A8-EC39176CCDF4}" Transitive="yes"> <File Name="ahooga.wav" KeyPath="yes" Id="Guid_5D3EED4F63BE4B8F96A8EC39176CCDF4" /> <Condition>1</Condition> </Component> <Component Feature="TradeStationAll" Guid="{493B9108-2894-418F-9792-65E65D2D351B}" Transitive="yes"> <File Name="alarmclockbeep.wav" KeyPath="yes" Id="Guid_493B91082894418F979265E65D2D351B" /> <Condition>1</Condition> </Component> <snip> After getting past that I produced a .MSI but upon testing it I found that my folders were not nested as I was expecting but mostly came out either in my INSTALLDIR or at the root of C:\. My question is - can this be done this way at all? My impression from the Nick Ramirez Wix 3.6 book was that I could do this but there is something missing (at least for me) on how to truly accomplish this. All of the files we need to pack are laid out in a directory structure that mimics what needs to get packed ( '$(var.INSTALLIMAGEPATH)' ). Any input anyone can provide would be greatly appreciated. Thanks, Shaun TradeStation Group, Inc. is the parent company of five separate but affiliated operating subsidiaries, TradeStation Securities, Inc. (Member NYSE, FINRA, NFA and SIPC), IBFX, Inc. (Member NFA), IBFX Australia Pty Ltd, which is authorized and regulated by the Australian Securities and Investments Commission, TradeStation Technologies, Inc., a trading software and subscription company, and TradeStation Europe Limited, a United Kingdom, FSA-authorized introducing brokerage firm. None of these companies provides trading or investment advice, recommendations or endorsements of any kind. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Forex products and services are offered by the TradeStation Forex divisions of IBFX, Inc. (Member NFA) and IBFX Australia Pty Ltd (ASIC registered). ------------------------------------------------------------------------------ Flow-based real-time traffic analytics software. Cisco certified tool. Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer Customize your own dashboards, set traffic alerts and generate reports. Network behavioral analysis & security monitoring. All-in-one tool. http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users