Re: [WiX-users] Using Fragments and Directory Structure

2014-03-12 Thread sergey.s.betke
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

2014-03-07 Thread Nick Ramirez
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


[WiX-users] Using Fragments and Directory Structure

2014-02-28 Thread Shaun Greenfield
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 
Components 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 /
Condition1/Condition
  /Component
  Component Feature=TradeStationAll 
Guid={493B9108-2894-418F-9792-65E65D2D351B} Transitive=yes
File Name=alarmclockbeep.wav KeyPath=yes 
Id=Guid_493B91082894418F979265E65D2D351B /
Condition1/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=126839071iu=/4140/ostg.clktrk
___
WiX-users mailing list
WiX-users@lists.sourceforge.net

Re: [WiX-users] Using Fragments and Directory Structure

2014-02-28 Thread Phill Hogland
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