PDA

View Full Version : Dialogue text according to release



David Webber
06-27-2007, 04:05 AM
I am finding the "releases" capability very useful indeed. In particular it allows me to have slightly different procedure within the same script for installing the full version of my software and the evaluation copy.

But I would like the same sequence of dialogues to display slightly different text in the two cases. For example in the welcome dialogue:

...Mozart...

and

...the evaluation copy of Mozart....


And both texts must (eventually) exist in different language translations. So I'd like them both to be text resources. Is there any way I can have the same dialogue box use one or the other, for example depending on the value of a compiler variable (which I can set according to the release)?

Dave

linder
06-27-2007, 04:31 AM
Dave,

Absolutely no problem. I'll develop a small demo and post it here in a minute.

Friedrich

linder
06-27-2007, 04:49 AM
Dave,

Okay, here we go. Very easy to do:

Create two new Text Resources (e.g. SB_NEW_MOZART_EDITION_DEMO and SB_NEW_MOZART_EDITION_FULL) in the Text and Messages Visualizer.

Use a new %MOZART_EDITION% variable to display the above value in the Welcome Dialog (or wherever). In your case, replace the [PRODUCTNAME] compiler variable with the %MOZART_EDITION% runtime variable. See attached screenshot.

I assume you already have a Release defined (e.g. Demo Release) in the Releases Visualizer.

You can use the following in the script to handle the different text versions:

Set Variable %MOZART_EDITION% to "#SB_NEW_MOZART_EDITION_FULL#"
#ifcompvar [SB_RELEASEID] Equals "Demo" Then
Set Variable %MOZART_EDITION% to "#SB_NEW_MOZART_EDITION_DEMO#"
#end

See screenshot.

If you compile the "Demo" Release, the ...the evaluation copy of Mozart.... will appear in the Welcome Dialog.

I have also attached the script project (.sb6).

Does this help?

Friedrich

David Webber
06-28-2007, 02:34 AM
Dave,

Okay, here we go. Very easy to do:....

Friedrich

As you say - so easy in fact that I really should have worked this one out myself :-)

[It's just a case of getting used to where one can use #...# $...$ [...] and %....% variables - and at what time they are adopted. For example I now know that the dialogue text is attached to the dialogue at run time - previously I had only used defined strings with compiler variables inserted in them.]

Thanks again,

Dave