I use $(loc.LCID) where LCID is defined in a custom localization file.
In the Light task add an attribute to specify the localization files.
Note we also include the wixui files from WiX2.
 
LocalizationFiles="Path\wixui_%(Language.Culture).wxl;Path\custom_%(Lang
uage.Culture).wxl;"
  

Tim Rayment
Senior Software Engineer

Oxford Instruments plc
Halifax Road, High Wycombe, HP12 3SE, UK 
Tel: +44 (0) 1494 442255
Email: [EMAIL PROTECTED] 
www.oxford-instruments.com

 
-----Original Message-----
From: Kevin Richardson [mailto:[EMAIL PROTECTED] 
Sent: 07 May 2008 19:02
To: RAYMENT Tim
Subject: Re: [WiX-users] MSBuild with multiple localizations

One question, Tim...

It looks like you only fire candle once.

In the <Product> element, there is a Language attribute. Currently for  
that attribute, I use $(env.langid), set in the batch file before  
running candle for each language.

What do you do for that attribute?

Thanks again,

-kevin


On May 7, 2008, at 12:41 AM, RAYMENT Tim wrote:

>
> Hi Kevin,
>
> We use a .wixproj to manage the files in the VS IDE and then have a
> separate MSBuild script to manage building of our multi-language
> installers.
>
> We start by finding all WiX files
> <!-- WiX compile target expects a list of wxs files to compile.
>       We just compile all .wxs in the Installation directory-->
> <ItemGroup>
>    <WiXSourceFiles Include="$(InstallationDirectory)\*.wxs" />
> </ItemGroup>
>
> We have an ItemGroup of languages defined:
>
> <!--List of all languages supported by the installer.-->
> <ItemGroup>
>
>    <Language Include="TraditionalChinese">
>      <Culture>zh-TW</Culture>
>      <Code>1028</Code>
>      <Prefix>TW</Prefix>
>    </Language>
>
>    <Language Include="German">
>      <Culture>de-DE</Culture>
>      <Code>1031</Code>
>      <Prefix>DE</Prefix>
>    </Language>
> ...
> </ItemGroup>
>
> Then use the Candel WiX MSBuild task:
>
> <!--Compile the WiX source files-->
> <Candle
>      SourceFiles="@(WiXSourceFiles)"
>      OutputFile="$(InstallationDirectory)\obj\release\"
>      ToolPath="$(WixToolPath)"
>      DefineConstants="Build=Release;SolutionDir=E:\XXX\Source" />
>
> Then use Light:
>
> <!--Batch process all the languages-->
>    <Light
>      ObjectFiles="@(CompileObjOutput)"
>      Cultures="%(Language.Culture)"
>      Extensions="@(WixExtension)"
>      OutputFile="$(InstallerOutputDirectory)\XXX% 
> (Language.Prefix).msi"
>      ToolPath="$(WixToolPath)" />
>
> The key point to note in the last step is the use of %(Language...)
> which causes Light to be called for each language defined in the
> ItemGroup.
>
> You can then use an <Exec> task to create transforms and embed them  
> back
> into a language neutral msi.
>
> Kind regards,
>
> Tim Rayment
> Senior Software Engineer
>
> Oxford Instruments plc
> Halifax Road, High Wycombe, HP12 3SE, UK
> Tel: +44 (0) 1494 442255
> Email: [EMAIL PROTECTED]
> www.oxford-instruments.com
>
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Kevin
> Richardson
> Sent: 07 May 2008 05:24
> To: wix-users@lists.sourceforge.net
> Subject: [WiX-users] MSBuild with multiple localizations
>
> Greetings,
>
> Does anyone have an example of building multi-language WiX installers
> with MSBuild? I've looked at the single-language examples, but what
> I'd like to do is have a .wixproj that builds an installer in 10+
> languages.
>
> My current process uses the WiX tools manually through batch files,
> and basically does the following:
>
> 1) build language-neutral MSI
> 2) set environment variable (used in <Product> language attribute) and
> build localized MSI for each language (candle/light are called with
> the appropriate localized .wxl files)
> 3) generate a transform between the language neutral and localized  
> MSIs
> 4) embed the transforms into the MSI (I believe that's an undocumented
> way to do a "language picker")
>
> Can this be duplicated (or improved upon) reasonably in a .wixproj?
>
> Thanks,
>
> -kevin
>
>
------------------------------------------------------------------------
> -
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save  
> $100.
> Use priority code J8TL2D2.
>
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/j
> avaone
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
> +++ Virus-scanned by MailControl for Oxford Instruments +++
>
>
>
>
________________________________________________________________________
___ThThis 
>  e-mail is confidential and is for the addressee only.  Please refer  
> to www.oxinst.com/email-statement for regulatory information.
>
>
------------------------------------------------------------------------
-
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save  
> $100.
> Use priority code J8TL2D2.
>
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/j
avaone
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to