Compiler vars and Project Properties

Got a problem you cannot solve? Try here.
Bugger
Posts: 35
Joined: Mon Nov 14, 2005 6:53 pm

Compiler vars and Project Properties

Postby Bugger » Wed Nov 16, 2005 6:07 pm

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?

sinan
Site Admin
Posts: 1028
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Postby sinan » Wed Nov 16, 2005 6:16 pm

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.

Bugger
Posts: 35
Joined: Mon Nov 14, 2005 6:53 pm

Postby Bugger » Wed Nov 16, 2005 6:28 pm

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?

sinan
Site Admin
Posts: 1028
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Postby sinan » Wed Nov 16, 2005 6:40 pm

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.

Bugger
Posts: 35
Joined: Mon Nov 14, 2005 6:53 pm

Postby Bugger » Wed Nov 16, 2005 6:48 pm

Well... that's just too easy.

:oops:


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 111 guests