I am creating a custom UI (modeled very much after the Wix_MondoUI, but more
so after the UISample.msi that is distributed with MS Windows SDK 2008 RTM)
that is branded for my company. I have not made significant changes to the
way UISample.msi lays out its dialogs or handles its events. I am trying to
now allow the user the ability to choose a custom installation path
different from the default one of [ProgramFilesFolder][Manufacturer].

I have implemented a directory structure as follows (note, the program I'm
installing is an old VB6-based application, FYI):

<Directory Id="TARGETDIR" Name="SourceDir">
  <Directory Id="ProgramFilesFolder" Name=".">
    <Directory Id="MSVS" Name="Microsoft Visual Studio" ShortName="MSVS">
      <Directory Id="VB98" Name="VB98">
        <Directory Id="Wizards" Name="Wizards">
          <Directory Id="PDWizard" Name="PDWiard">
            <Directory Id="Redist" Name="Redist" />
          </Directory>
        </Directory>
      </Directory>
    </Directory>
    <Directory Id="INSTALLDIR" Name="My Company Name" Short="MyComp">
      <Directory Id="ChildFeature1" Name="Child Feature 1" />
      <Directory Id="ChildFeature2" Name="Child Feature 2" />
    </Directory>
  </Directory>
  <Directory Id="ProgramMenuFolder" Name="StartMenu" ShortName="StartMnu">
    <Directory Id="MyCompanyFolder" Name="My Company Name" />
  </Directory>
</Directory>


I have 2 features that I would like to have installed under the same path.
All features have a InstallDefault="local", AllowAdvertise="no", Absent="no"
and TypicalDefault="install" (unless otherwise noted below). Note also, that
each component belonging to a feature is not shown. The components
explicitly declare via the Compenent/@Directory attribute to which directory
it should be installed under.

I tried nesting the features like so:

<feature Id="INSTALLDIR"
ConfigurableDirectory="[ProgramFilesFolder][Manufacturer]" ... >
  <feature Id="childFeature1" ... >
    <feature Id="childFeature1Help" Absent="allow" />
  </feature>
  <feature Id="childFeature2" ... > ... </feature>
</feature>

This didn't work, and I thought it was complaining over the fact that
"parentFeature" in and of itself contains no components, only child
features.

So, I stripped off the "parentFeature" and the 2 "childFeature"s became
their own "root" feature, if you will, and I set
ConfigurableDirectory="INSTALLDIR" for both features. (I assume this means
that, the user could choose to install both features under entirely separate
directories, and since they use the same @Directory value, this could be a
problem, which is why I was trying to use the "feature-tree" above?) I was
hoping that by using INSTALLDIR for both features, whichever feature's
directory was set (last), that would be the directory the programs are
installed into (which probably isn't good, which again, is why I was
originally trying to use the "feature-tree" above.)

The directory appears correctly in the PathEditLabel field of the
CustomizeDlg, however, when I click the Browse button, nothing happens. If I
click anywhere on the dialog, including the Browse button again, the dialog
seems to "jump" a few pixels to the lower right, then it thinks for a bit,
and then the caption bar displays "(Not Repsonding)". Finally, a whole bunch
of error dialogs flash on the screen (too fast for me to capture any text)
and after a bit, Windows Vista asks me to close the non-responding program.

Here's the code for my BrowseDlg (which should be very similar to Wix's
included browse dialog).

<Dialog Id="BrowseDlg" Width="370" Height="270" Title="[ProductName]
[Setup]" Modeless="no" NoMinimize="yes">
  <Control Id="PathEdit" Type="PathEdit" X="88" Y="202" Width="251"
Height="18" Indirect="yes" Property="_BrowseProperty" />
  <Control Id="OK" Type="PushButton" X="304" Y="243" Width="56" Height="17"
Text="[TtecUI_ButtonText_OK]" Default="yes">
    <Publish Event="SetTargetPath" Value="[_BrowseProperty]"
Order="1">1</Publish>
    <Publish Event="EndDialog" Value="Return">1</Publish>
  </Control>
  <Control Id="Cancel" Type="PushButton" X="236" Y="243" Width="56"
Height="17" Text="[TtecUI_ButtonText_Cancel]" Cancel="yes">
    <Publish Event="Reset" Value="0" Order="1">1</Publish>
    <Publish Event="EndDialog" Value="Return" Order="2">1</Publish>
  </Control>
  <Control Id="ComboLabel" Type="Text" X="28" Y="58" Width="40" Height="10"
Text="&#38;Look in:" />
  <Control Id="DirectoryCombo" Type="DirectoryCombo" X="70" Y="55"
Width="218" Height="80" Property="_BrowseProperty" Fixed="yes" Remote="yes">
    <Subscribe Event="IgnoreChange" Attribute="IgnoreChange"/>
  </Control>
  <Control Id="Up" Type="PushButton" X="296" Y="55" Width="19" Height="19"
Icon="yes" IconSize="16" FixedSize="yes" ToolTip="Up One Level">
    <Publish Event="DirectoryListUp" Value="0">1</Publish>
  </Control>
  <Control Id="NewFolder" Type="PushButton" X="323" Y="55" Width="19"
Height="19" Icon="yes" IconSize="16" FixedSize="yes" ToolTip="Create A New
Folder">
    <Publish Event="DirectoryListNew" Value="0">1</Publish>
  </Control>
  <Control Id="DirectoryList" Type="DirectoryList" X="28" Y="83" Width="314"
Height="110" Property="_BrowseProperty" Sunken="yes" Indirect="yes"
TabSkip="no" />
  <Control Id="PathLabel" Type="Text" X="28" Y="205" Width="59" Height="10"
Text="&#38;Folder Name:" />
  <Control Id="BannerBitmap" Type="Bitmap" Text="[BannerBitmap]" X="0" Y="0"
Width="374" Height="44" TabSkip="no"/>
  <Control Id="BannerLine" Type="Line" X="0" Y="44" Height="0" Width="374"
Disabled="yes"/>
  <Control Id="Title" Type="Text" X="14" Y="7" Width="312" Height="15"
Transparent="yes" NoPrefix="yes"
               Text="{\DlgFontBold8}Select Installation Folder" />
  <Control Id="Description" Type="Text" X="28" Y="19" Width="298"
Height="24" NoPrefix="yes" Transparent="yes"
           Text="{\DlgFont8}Select the folder in which you want to install
[ProductName]." />
  <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="374" Height="0"
Disabled="yes"/>
</Dialog>

What am I doing wrong?

I would prefer that both features be installed under a common directory, for
example the default installation directory would be
[ProgramFilesFolder][Manufacturer]. This is because another feature may be
added in the future and should be located with the rest of the features
under, for example, [ProgramFilesFolder][Manufacturer]. So another question
is, can I use a feature tree like the one shown above?


Regards,

-- 
~ Craig
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to