Ok, It seems I've found solution. But now have another problem.

I've created additional dialog

<Fragment>
<UI>
        <Dialog Id="SelectProductLanguageDlg" Width="370" Height="270"
Title="!(loc.SelectProductLanguageDlg_Title)">
      ...
      <Control Id="Language" Type="ComboBox" X="20" Y="100" Width="320"
Height="18" Property="PRODUCT_LANGUAGE" ComboList="yes" Sorted="yes">
      <ComboBox Property="PRODUCT_LANGUAGE">
        <ListItem Value="en-US" Text="English" />
            <ListItem Value="fr-FR" Text="French" />
        </ComboBox>
        </Control>
        </Dialog>
</UI>
</Fragment> 


And have described features with following way

<Feature Id="FeatureDesktop" Title="$(var.ProductName)" Level="1"
AllowAdvertise="no" InstallDefault="local">
        <ComponentRef Id="ComponentLibrary" />
      <ComponentRef Id="ComponentDesktop" />

      <Feature Id=" FeatureDesktop.fr_FR" Title="$(var.ProductName) French
Language Support" Level="0" InstallDefault="followParent" Display="hidden">
        <ComponentRef Id=" ComponentLibrary. fr_FR " />
            <ComponentRef Id=" ComponentDesktop. fr_FR " />
        </Feature>

So by default Level of sub-feature with French language is 0 so it will not
be installed. Also I hide it from user.

Now I need to install FeatureDesktop.fr_FR if PRODUCT_LANGUAGE = "fr-FR" and
FeatureDesktop is selected to install local.
But I'm not sure, how to do it. I've tried the following:


<UI Id="CustomDialogSequence">
        <UIRef Id="WixUI_Mondo"/>
      <DialogRef Id="SelectProductLanguageDlg" />

      <Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog"
Value="SelectProductLanguageDlg" Order="2">LicenseAccepted = "1"</Publish>
        <Publish Dialog="SelectProductLanguageDlg" Control="Back"
Event="NewDialog" Value="LicenseAgreementDlg">1</Publish>
      <Publish Dialog="SelectProductLanguageDlg" Control="Next"
Event="NewDialog" Value="SetupTypeDlg">1</Publish>
      <Publish Dialog="SetupTypeDlg" Control="Back" Event="NewDialog"
Value="SelectProductLanguageDlg">1</Publish>

                                                                 
      <Publish Dialog="CustomizeDlg" Control="Next" Event="AddLocal" Value="
FeatureDesktop.fr_FR" CDATA[PRODUCT_LANGUAGE = "fr-FR" AND & FeatureDesktop
= 3]]></Publish>

      <Publish Dialog="CustomizeDlg" Control="Next" Event="Remove"
Value="FeatureDesktop.fr_FR" ><![CDATA[NOT (PRODUCT_LANGUAGE = "fr-FR" AND &
FeatureDesktop = 3)]]></Publish>
                                                
</UI>


But unfortunately it don't work. Am I missing something? Also I'm not sure
how it will work if user will skip CustomizeDlg for example by select Full
Installation on previous screen (in this case I also need to install
FeatureDesktop.fr_FR only if French language selected on language selection
screen). Is there better place to specify AddLocal and Remove?

Thanks.


-----Original Message-----
From: Bob Arnson [mailto:b...@joyofsetup.com] 
Sent: Wednesday, March 10, 2010 4:26 PM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Install additional components depending on selected
languages

On 3/9/2010 10:11 AM, Oleksandr Y. Nechyporenko wrote:
> Are there easy way to select language(s) at first step of installation and
> automatically include language depended components to related features?
>    

MSI doesn't support multi-language installers (e.g., UI) but you can 
include language-specific components and add conditions to suppress 
them. Or group all the language-specific components in features and let 
the user choose to install them or not.

-- 
sig://boB
http://joyofsetup.com/


----------------------------------------------------------------------------
--
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to