Language selection dialog only shows when debugging

Got a problem you cannot solve? Try here.
Post Reply
rasmusw
Posts: 44
Joined: Tue May 19, 2009 3:06 am

Language selection dialog only shows when debugging

Post by rasmusw »

In IA 12 (Moooya.8.4.11) I have a setup project with two languages, I have translated the files and the shared strings etc. and I have imported the strings back into the project.

When I run the installation program using the Debug button in IA Studio, the first thing that pops up is the language selection dialog with the two possible languages.
But when I run the installer from Windows Explorer, the language selector does not show. - Instead the "preparing installer" window is shown in my local language, and then the "Welcome page" is shown in English, and the rest of the installation process is also in English.

One thing to note is that the installation project "Product Name" is defined by a compiler variable as #PRODUCTNAME#, and is not a constant string. The compiler variable is set in the Project Options "Compiler Variables" page, and is meant to be set by a build script later on. (The reason for this is that the software is resold by partners who want to have different product names).
So the mtx file with the translation information is called #PRODUCTNAME#.mtx", and the supportfile that was added to the project is "#PRODUCTNAME#.mtx".

Installer logging did not point me in the right direction to figure out why the language selector is not shown - I can just see that it is selecting my local language code. Furthermore the LANGUAGE variable is not set.

Any help is greatly appreciated.
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Language selection dialog only shows when debugging

Post by giaviv »

Hi,

Have you checked "Display language selector" in the Project Settings?
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
rasmusw
Posts: 44
Joined: Tue May 19, 2009 3:06 am

Re: Language selection dialog only shows when debugging

Post by rasmusw »

Yes I have.
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Language selection dialog only shows when debugging

Post by giaviv »

Any other changes you might have made?

Can you please try removing the compiler variable for the name and just using a fixed name to see if that resolves the issue?
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
rasmusw
Posts: 44
Joined: Tue May 19, 2009 3:06 am

Re: Language selection dialog only shows when debugging

Post by rasmusw »

I have tried the following:
Changed Product name to a fixed string (TESTNAME) in the Project options dialog.
- No change, except "Display language selection dialog box" in the Design tab "Project Properties" page disappeared.

Ran localize wizard to import strings - missing TESTNAME.mtx, copied existing #PRODUCTNAME#.mtx to TESTNAME.mtx and imported strings, now the "Display language selection dialog box" reappeared, and now the box also came back after rebuild.

Then i tried using a compiler variable as the product name again.
Changed Product name back to #PRODUCTNAME# in the Project options - this time the "Display language selection dialog box" checkbox did not disappear, and was still checked.
Ran localize wizard to import strings, which added #PRODUCTNAME#.mtx to the installer Creatives. Rebuilding the installer resulted in no language selection dialog.

So my conclusion at this time is that it apparently is not possible to define the Product Name using a compiler variable, when I also want to have a multilingual setup.
Is there any way to change Product name at runtime, so it effects all dialogs and everywhere else it may appear, so I can set an installer variable with the compiler variable defined value?
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Language selection dialog only shows when debugging

Post by giaviv »

You can actually set the TITLE variable to control the title of your dialogs - will that work?
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
rasmusw
Posts: 44
Joined: Tue May 19, 2009 3:06 am

Re: Language selection dialog only shows when debugging

Post by rasmusw »

Setting the TITLE variable in the first line of MSI code is not enough.
The UAC prompt is triggered before that line is executed, and that contains the wrong name.
rasmusw
Posts: 44
Joined: Tue May 19, 2009 3:06 am

Re: Language selection dialog only shows when debugging

Post by rasmusw »

I've found a workaround/hack:
  1. I set the Product name to TESTNAME in IA.
  2. The MTX file in my translations folder is renamed to TESTNAME.mtx
  3. Then my build script does a search/replace to replace all occurrences of TESTNAME in the MPR file so the productname and MTX-file names are set to what I want.
  4. The build script also makes a copy of the TESTNAME.mtx file so there is an MTX file with the correct product name (I tried it without this step, but that lost the language selection dialog).
  5. The first line of the MSI script sets the TITLE variable to #PRODUCTNAME# and #PRODUCTNAME# is still passed to miabuild.exe as a compiler variable.
On a related note: I have previously realized that using compiler variables in the installer Output file name also doesn't work, so the build script also renames the output filename after miabuild has run. This is to both include the real product name and the product version as part of the setup executable filename.
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Language selection dialog only shows when debugging

Post by giaviv »

Thanks for sharing!
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Post Reply