Two alternatives come to mind.
Would something like this work for you?
\MyInstaller
Main.wxs
\en-us
Myinstaller_en.wixproj
\ja-jp
Myinstaller_ja.wixproj
In each wixproj, add the appropriate tag to a PropertyGroup tag:
<DefineConstants>LCID=1033</DefineConstants><!--English-->
Or
<DefineConstants>LCID=1041</DefineConstants><!--Japanese-->
Remove the <?define LCID...> tag.
Change the <Compile> tag to get the .wxs file from ..\Main.wxs instead of
your current values.
If that doesn't work, go with this:
\MyInstaller
Commonmain.wxi
\en-us
Myinstaller_en.wixproj
Main_en.wxs
\ja-jp
Myinstaller_ja.wixproj
Main_ja.wxs
Except each Main_*.wxs will look like:
<?xml...>
<Wix ...>
<?include ..\Commonmain.wxi?>
</Wix>
And inside of Commonmain.wxi, you put:
<?xml...>
<Include...>
<Product ...>
<Package .../>
...
</Product>
</Include>
-Blair
-----Original Message-----
From: Lian Jiang [mailto:[email protected]]
Sent: Wednesday, August 12, 2009 6:05 PM
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] how to refactor my code to support multiple locales
easier
Hi,
I have below file structure for supporting multiple locales:
\MyInstaller
\en-us
Myinstaller_en.wixproj
Main_en.wxs
\ja-jp
Myinstaller_ja.wixproj
Main_ja.wxs
The only difference between Main_en.wxs and Main_ja.wxs is that the former
uses 1033 as language ID and the latter uses 1041.
<?define LCID="1041"?>
<Product Id="$(var.PRODUCT_GUID)">
......
</Product>
As you can see, it is a big pain that every time when I update <Product>
node in Main_en.wxs, I need to update Main_ja.wxs correspondingly. To
relieve this pain, I tried to change the file structure into below one but
did not succeed:
\MyInstaller
Commondefine.wxi
\en-us
Myinstaller_en.wixproj
Main_en.wxs
\ja-jp
Myinstaller_ja.wixproj
Main_ja.wxs
This does not work because the whole <Product> node is the same for en-us
and ja-jp. Only the macro which can be defined in wxi file is different.
I know there is a way to create multiple locales installers using only one
wixproj but it does not work here because I need to generate transform from
en-us installer to ja-jp installer to create a MUI-based installer.
How can I decouple <Product> node from the locale-specific part (e.g. LCID
define) so that changing <Product> node does not need to change both
locales' wxs files?
Appreciate your help.
Thanks
Lian
----------------------------------------------------------------------------
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus
on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users