Creating localized Wix setup

Add-in Express™ Support Service
That's what is more important than anything else

Creating localized Wix setup
 
OliverM


Guest


I wonder if it is possible to combine msi setup files for different localizations in a single setup with Wix?
Posted 06 Feb, 2017 09:16:16 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello Oliver,

Please check section Multiple-Language Installers, see the PDF file in the folder {Add-in Express}\Docs on your development PC.


Andrei Smolin
Add-in Express Team Leader
Posted 06 Feb, 2017 10:24:39 Top
OliverM


Guest


Hi Andrei,

Unfortunately there is little detail information in the mentioned section. According to the docs I created a Wix setup for a HelloWorld test add-in. In the wizard I set localization property to neutral and ticked English and German in the 3rd step.
This outputs a setup whith the following language files: StandardUI_de-DE.wxl, StandardUI_en-US.wxl and StandardUI_neutral.wxl.
But when I try to compile, I get the following error:
LGHT0309: Failed to open merge module for validation. The most common cause of this error is specifying that the merge module supports multiple languages (using the Package/@Languages attribute) but not including language-specific embedded transforms. To fix this error, make the merge module language-neutral, make it language-specific, embed language transforms as specified in the MSI SDK at http://msdn.microsoft.com/library/aa367799.aspx, or disable validation.
Posted 07 Feb, 2017 05:09:03 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello Oliver,

I cannot reproduce this issue. Could you please send me your project for testing?


Andrei Smolin
Add-in Express Team Leader
Posted 07 Feb, 2017 10:11:16 Top
OliverM


Guest


Hi Andrei,

I have sent the project to the support address.
Posted 08 Feb, 2017 05:56:21 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello Oliver,

What WiX version do you have installed?


Andrei Smolin
Add-in Express Team Leader
Posted 09 Feb, 2017 04:04:13 Top
OliverM


Guest


Hi Andrei,

Wix Version = 3.10.2.2516.

I did some more testing and it turns out it seems to be a sorting issue. The WixDesigner gives me the following order for the language id's in use
Languages="1033,1031,3072,0"
.
If I change that to
Languages="0,1031,1033,3072"
the compiler no longer complains and 3 msi files are created (Neutral, English, German).
The log looks quite promising as torch.exe and vdwtool.exe are called after msi creation.
I can see the transform files created under "obj\Release\Harvested MST".
Vdwtool.exe is picking them up, I assume vwdtool is responsible for the merge part.

The log looks like that (MSI creation ommitted):

"C:\Program Files (x86)\WiX Toolset v3.10\Bin\torch.exe" -nologo -serr f "bin\Release\HelloWorldSetup.msi" "bin\Release\de-DE\HelloWorldSetup.msi" -o "obj\\Release\Harvested MST\de-DE.mst"
2> "C:\Users\Tom\Desktop\HelloWorld\HelloWorld\HelloWorldSetup\Resources\vdwtool.exe" -nologo -noconsole "bin\Release\HelloWorldSetup.msi" "obj\\Release\Harvested MST\de-DE.mst"
2> "C:\Program Files (x86)\WiX Toolset v3.10\Bin\torch.exe" -nologo -serr f "bin\Release\HelloWorldSetup.msi" "bin\Release\en-US\HelloWorldSetup.msi" -o "obj\\Release\Harvested MST\en-US.mst"
2> "C:\Users\Tom\Desktop\HelloWorld\HelloWorld\HelloWorldSetup\Resources\vdwtool.exe" -nologo -noconsole "bin\Release\HelloWorldSetup.msi" "obj\\Release\Harvested MST\en-US.mst"
========== Rebuild All: 2 succeeded, 0 failed, 0 skipped ==========


Despite the fact that the build worked out, the "bin\Release\HelloWorldSetup.msi" does not respond to changed region settings. For testing I run the setup on a machine set up in German, but setup came up in English.
I checked whether or not the German transform has been merged correctly using msiexec.exe /i HelloWorldSetup.MSI TRANSFORMS=":1033" and voila setup comes up in German. This indicates the the merge was ok but there is an issue with language id's.

As a final test I created my own transforms and did the merge myself.

REM Create transform
"%ProgramFiles(x86)%\Windows Kits\8.1\bin\x86\msitran" -g HelloWorldSetup.neutral.msi HelloWorldSetup.de.msi language.de.mst

REM Embed the German transform..
cscript "%ProgramFiles(x86)%\Windows Kits\8.1\bin\x64\wisubstg.vbs" HelloWorldSetup.neutral.msi language.de.mst 1031

REM Set language id
cscript "%ProgramFiles(x86)%\Windows Kits\8.1\bin\x64\WiLangId.vbs" %ReleaseDir%\HelloWorldSetup.neutral.msi Package 3072,1031


I ran the "handmade" MUI installer on the test machine set up in German and it came up in German.
I changed the region setting on that particular machine to United Kingdom, started the setup again and it came up in English.

Is it possible that vdwtool.exe is setting the language id's in the wrong order (follow up issue due to the above mentioned language id sorting I had to change in order to convince the compiler to do its job)?
Posted 09 Feb, 2017 07:00:37 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello Oliver,

OliverM writes:
If I change that to


Check also the <Target Name="AfterBuild"> section in the .WiXProj file. The order should be the same!

Also, is you Widnows German or English?


Andrei Smolin
Add-in Express Team Leader
Posted 09 Feb, 2017 11:04:00 Top
OliverM


Guest


Hi Andrei,

Check also the <Target Name="AfterBuild"> section in the .WiXProj file. The order should be the same!


There is no order of language id's in section <Target Name="AfterBuild">

But the below section contains language Id's.

</PropertyGroup>
    <PropertyGroup Label="WiXDesignerProperties" >
    <MakeProjectLocalizable>True</MakeProjectLocalizable>
    <CurrentUILanguage>0</CurrentUILanguage>
    <SupportedUILanguages>1031,1033</SupportedUILanguages>
  </PropertyGroup>


This is not in line with what product.wxs shows (Languages="1033,1031,3072,0").
As mentioned above, if I change the sort order compilation works.


The machine I am using for development was once set up with CultureInfo.InstalledUICulture = "en-US".

I tested the MUI setup created by ADX on 2 machines.
The development machine with UICulture changed to "de-DE" and on another machine which was set up with CultureInfo.InstalledUICulture = "de-DE". In both cases setup started in English.

I also tested the "handmade" MUI setup on both machines. In both cases setup started in German.
Posted 09 Feb, 2017 11:53:01 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hello Oliver,

The 'WiXDesignerProperties' group is used by the WiX Designer at the design time.
We can't reproduce the issue on our PCs. I will setup a VPC with culture de-DE and test your project again. I will let you know about results soon.
Posted 10 Feb, 2017 05:20:45 Top