Re: [WiX-users] Using Fragments and Directory Structure
sample code - https://github.com/Metrolog/ITG.NevaTest3303P/blob/master/ITG.WixUtils/Common.Directories.wxs С уважением, Бетке Сергей Сергеевич. От: Phill Hogland Отправлено: пятница, 28 февраля 2014 г. 21:09 Кому: General discussion about the WiX toolset. You can certainly achieve the goal that you defined. What I do is a little different and is based on the structure that I observed in the Wix src\Setup (the source for the setup which deploys the tools). There you will see a CommonLib wixlib project. I define my folder tree (for many different setup projects) in that wixlib, putting each folder definition in a separate fragment. In a given MSI project which consumes this wixlib only those fragments which are referenced in the project are pulled into the MSI. So in the wixlib you might have Fragment Directory Id=TARGETDIR Name=SourceDir / /Fragment Fragment DirectoryRef Id=TARGETDIR Directory Id=ProgramFilesFolder Directory Id=INSTALLFOLDER Name=Company / /Directory /DirectoryRef /Fragment Fragment DirectoryRef Id=TARGETDIR Directory Id=ProgramFiles64Folder Directory Id=INSTALLFOLDER64 Name=Company / /Directory /DirectoryRef /Fragment Fragment DirectoryRef Id=TARGETDIR Directory Id=ProgramMenuFolder Name=ProgMenu Directory Id=ShortcutDir Name=Company / /Directory /DirectoryRef /Fragment Fragment DirectoryRef Id=TARGETDIR Directory Id=DesktopFolder Name=Desktop / /DirectoryRef /Fragment Fragment DirectoryRef Id=INSTALLFOLDER Directory Id=DSDir Name =app1/ /DirectoryRef /Fragment Fragment DirectoryRef Id=INSTALLFOLDER Directory Id=eRSDir Name =app2/ /DirectoryRef /Fragment I do not specify any source file information in the wixlib. In the MSI you can either put the Feature tree and the Components together or separate the component groups into separate Fragments, which I prefer. In the Product element have something like Feature Id=App1 Title=$(var.AppName) Level=1 InstallDefault=local TypicalDefault=advertise product registration keys etc... ComponentGroupRef Id=somefiles / ComponentGroupRef Id=some_other_files / /Feature And then in separate Fragments you can define ComponentGroups. When you specify a DirectoryId (defined in the fragment, in my case in the wixlib) it will pull that fragment into the msi. The DirectoryID can be set on the ComponentGroup, Component, or File elements. So if within a ComponentGroup different Components can use a different DirectoryId, which I think overrides the DirectoryId of a parent element (but I have not don that). -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Using-Fragments-and-Directory-Structure-tp7593019p7593023.html Sent from the wix-users mailing list archive at Nabble.com. -- 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=126839071iu=/4140/ostg.clktrk ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Using Fragments and Directory Structure
The ComponentGroup element's Directory attribute sets where to install the components that are in that ComponentGroup. You can also set this on each Component element via the Component's Directory element. Also, many of the Windows directories are already defined for you by the WiX framework, so you don't need to create nested structures for them: http://wixtoolset.org/documentation/manual/v3/bundle/bundle_built_in_variables.html Fragment Directory Id=TARGETDIR Name=SourceDir Directory Id=SystemFolder / Directory Id=ProgramFilesFolder Directory Id=TSSHORTCUTS Name=$(var.PRODUCTNAME_MAJORMINORVERSION) / /Directory /Directory /Fragment Fragment ComponentGroup Id=MyShortcutsGroup Directory=TSSHORTCUTS Source=... /ComponentGroup /Fragment -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Using-Fragments-and-Directory-Structure-tp7593019p7593166.html Sent from the wix-users mailing list archive at Nabble.com. -- Subversion Kills Productivity. Get off Subversion Make the Move to Perforce. With Perforce, you get hassle-free workflows. Merge that actually works. Faster operations. Version large binaries. Built-in WAN optimization and the freedom to use Git, Perforce or both. Make the move to Perforce. http://pubads.g.doubleclick.net/gampad/clk?id=122218951iu=/4140/ostg.clktrk ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Using Fragments and Directory Structure
You can certainly achieve the goal that you defined. What I do is a little different and is based on the structure that I observed in the Wix src\Setup (the source for the setup which deploys the tools). There you will see a CommonLib wixlib project. I define my folder tree (for many different setup projects) in that wixlib, putting each folder definition in a separate fragment. In a given MSI project which consumes this wixlib only those fragments which are referenced in the project are pulled into the MSI. So in the wixlib you might have Fragment Directory Id=TARGETDIR Name=SourceDir / /Fragment Fragment DirectoryRef Id=TARGETDIR Directory Id=ProgramFilesFolder Directory Id=INSTALLFOLDER Name=Company / /Directory /DirectoryRef /Fragment Fragment DirectoryRef Id=TARGETDIR Directory Id=ProgramFiles64Folder Directory Id=INSTALLFOLDER64 Name=Company / /Directory /DirectoryRef /Fragment Fragment DirectoryRef Id=TARGETDIR Directory Id=ProgramMenuFolder Name=ProgMenu Directory Id=ShortcutDir Name=Company / /Directory /DirectoryRef /Fragment Fragment DirectoryRef Id=TARGETDIR Directory Id=DesktopFolder Name=Desktop / /DirectoryRef /Fragment Fragment DirectoryRef Id=INSTALLFOLDER Directory Id=DSDir Name =app1/ /DirectoryRef /Fragment Fragment DirectoryRef Id=INSTALLFOLDER Directory Id=eRSDir Name =app2/ /DirectoryRef /Fragment I do not specify any source file information in the wixlib. In the MSI you can either put the Feature tree and the Components together or separate the component groups into separate Fragments, which I prefer. In the Product element have something like Feature Id=App1 Title=$(var.AppName) Level=1 InstallDefault=local TypicalDefault=advertise product registration keys etc... ComponentGroupRef Id=somefiles / ComponentGroupRef Id=some_other_files / /Feature And then in separate Fragments you can define ComponentGroups. When you specify a DirectoryId (defined in the fragment, in my case in the wixlib) it will pull that fragment into the msi. The DirectoryID can be set on the ComponentGroup, Component, or File elements. So if within a ComponentGroup different Components can use a different DirectoryId, which I think overrides the DirectoryId of a parent element (but I have not don that). -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Using-Fragments-and-Directory-Structure-tp7593019p7593023.html Sent from the wix-users mailing list archive at Nabble.com. -- 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=126839071iu=/4140/ostg.clktrk ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users