Compiler variable in title suppresses language selector

Got a problem you cannot solve? Try here.
Christoph Schneegans
Posts: 55
Joined: Tue Jan 09, 2007 12:20 pm

Compiler variable in title suppresses language selector

Postby Christoph Schneegans » Mon Jan 22, 2007 9:22 am

Hello!

I have to create several setups with almost identical functionality, but different titles. Therefore, I have added a compiler variable PROGRAM_NAME, so I can set the "Product Name" value on the "Project Properties" page to "#PROGRAM_NAME#", and the output filename to "#PROGRAM_NAME#-setup".

This works very well, but I would now like to a language selection dialog. Unfortunately, this dialog is never displayed. When I change the "Product Name" property to a "regular" value without references to a compiler variable, the dialog is properly displayed.

Is anybody able to reproduce this problem? My guess is that InstallAware is unable to access the #PROGRAM_NAME#.mtx file.

Christoph Schneegans
Posts: 55
Joined: Tue Jan 09, 2007 12:20 pm

Postby Christoph Schneegans » Mon Jan 22, 2007 11:23 am

Okay, I think I have found a workaround for this problem. I simply use some "neutral" name for my project, such as "SetupProject", and I set the TITLE variable according to my PROGRAM_NAME compiler variable at the very beginning of the script:

Code: Select all

[compiler if Variable PROGRAM_NAME Equals Program1]
Set Variable TITLE to Program1
[compiler else]
Set Variable TITLE to Program2
[compiler end]

The "Support Files" folder now contains a file "SetupProject.mtx"; its name is not dependent on the PROGRAM_NAME compiler variable, so it can be used during run-time by all builds.

However, I have already encountered another problem. It seems that dereferenced compiler variables (such as "#PROGRAM_NAME#") are not resolved in localized strings. Is this correct?

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Mon Jan 22, 2007 2:17 pm

Yes, this is correct. Because compiler variables are substituted at build time, they are not at all in the picture at runtime. So if you have such variables in localized text, they won't work. If you want to use localized variables in localized text, try the Localization Variable command.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

Christoph Schneegans
Posts: 55
Joined: Tue Jan 09, 2007 12:20 pm

Postby Christoph Schneegans » Tue Jan 23, 2007 3:29 am

In my opinion, it would be reasonable to substitute compiler variables in localized strings for all languages, and I don't see why this substituion cannot be done at build time.


Return to “Technical Support”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 184 guests