cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
bobomega
Level 3

select a language by command line

Hi,

I'm building a automated process which deals with InstallShield 2008 projects without opening them.

Here's the problem - I use the addLanguage function in "IswiAuto14.ISWiProject" to add languages to the project programmatically. However, the languages are only added to the project, but not selected (normally when you run the 'release wizard', you'll need to select any supported language to include the string table, dialog etc).

So what I need to know is that is there anyway that I can get the newly added language selected when building? (I use the command line to build the project).


Thanks!
Labels (1)
0 Kudos
(8) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

When you use the automation layer to add the language, could you perhaps update the ISWiRelease object's SupportedLangsData and SupportedLangsUI properties? I don't think we have any command line overrides for these.
0 Kudos
bobomega
Level 3

Ok, I've used the SupportedLangsUI property to include the languages into the release but when I build the project, none of the string tables are built into the package.

Also, there's no RC or RES files generated when building.

Any ideas?


Thanks!
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

Have you double-checked that you're building the same release that you modified with the automation layer? Calling IsCmdBld without matching the release may build a different "default" release, or it may "helpfully" create a new release if necessary, and such a newly-created release won't have all the settings you might expect.
0 Kudos
bobomega
Level 3

yes, I've put a line in the code to display the release name before building and the release name appears to be the same as the one I use for manual building.

Also, when I went through the release wizard to build the project after the automation was run, I got a message on the 'select language' page (see attached screenshot).
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

So the languages you're trying to use are not listed in Project > Settings? Can you try adding them there first?
0 Kudos
bobomega
Level 3

Hi MichaelU,

Thanks for the help on this.

Basically, all the languages required are added to the project (through the API) and they are also selected in Project -> Settings.

Also, the string tables are all imported without any problems. The only thing left is that when I'm building the release (I've checked the release name and it's correct), none of the languages added to the project were built into the package, none of the .rc/.res files were generated either (normally you have something like _ISUser1033.rc and _ISUser1033.RES files).

I was guessing that there's some settings I need to set through the API before calling the build function but I don't know for sure. Can you help?


Regards!
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

Could you try taking your base project and separately do each of the following, then compare the resulting ISM files (using either and xml/text or msi difference tool) to help identify what's different?

  • Manually add the language to the project and the release using the IDE; save
  • Use your script to add the language to the project and release; save
I'd suggest trying with a single language to cut down on any duplicate noise in the comparison.
0 Kudos
bobomega
Level 3

Finally, after comparing the ism files (one is manually done and the other one is created by my program), I found the problem.

It's not generating the language related files because there's a white space between the language codes created by my program.

I've fixed the problem by removing the white space in my code and it works all fine now.

Thanks for the help!
0 Kudos