Page 1 of 1

Compiler vars and Project Properties

Posted: Wed Nov 16, 2005 6:07 pm
by Bugger
I'm writing an installer that needs to work for multiple product names, versions, etc.

I'd like to use compiler vars to set these values, like this:

Product Name: #CLIENTNAME# Software Installer

But when I do this, the dialogs simply display "#CLIENTNAME# Software Installer" rather than "SomeCompany Software Installer"

Am I doing something wrong, or am I not supposed to use compiler vars in this manner?

Posted: Wed Nov 16, 2005 6:16 pm
by sinan
That's a great question. Compiler variables can only be used in your setup script, which is pre-processed using compiler variables. Please do not use them anywhere else in your project - which is, all the settings on the Project Options window in the IDE.

Posted: Wed Nov 16, 2005 6:28 pm
by Bugger
Thanks for the quick feedback.

Is there any other way of accomplishing this task?

The installer will be built in an automated build via command-line, I suppose I could replace the value in the project file before doing the build? Or is there a better/smarter way?

Posted: Wed Nov 16, 2005 6:40 pm
by sinan
The product name field actually initializes the global, pre-defined script variable $TITLE$. So if you need to update that dynamically, you can just say:

Code: Select all

Set Variable TITLE to #CLIENTNAME# Software Installer


in your setup script (say all the way on top), and it will work fine. Be sure to check the pre-defined variables in the help index and see what other pre-defined variables might be of use to you.

Posted: Wed Nov 16, 2005 6:48 pm
by Bugger
Well... that's just too easy.

:oops: