Page 1 of 1
Add a variable
Posted: Fri Mar 22, 2013 1:25 am
by kishorkk23
Hi,
I need to declare a global variable that should appear in GUI while creating build.
Same as:
Predefined variable Product name = $Title$
Currently I declare $Title$ for our Product name.
But I need to append a variable called Dailybuild or Weekly build after the $Title$
For that I need a separate variable like $new_variable$ = dailybuild(02/03/2013).
Problem is i want the variable to be present in GUI as how the Product name or product version is shown in InstallAware.
Is it possible to add a new variable in GUI below Product version?
Or I need information on how to access the variable present in Data Summary information:
So that I will use that variable in my script.
For eg : Subject = dailybuild(02/03/2013) . But i do not know how can i access the subject variable !!!
Re: Add a variable
Posted: Fri Mar 22, 2013 9:13 am
by FrancescoT
Re: Add a variable
Posted: Fri Mar 22, 2013 9:19 am
by kishorkk23
Nope, it does not solve my problem.
We have something like $TITLE$ $VERSION$
But I need like this
$TITLE$ Dailybuild (02/03/2013) $VERSION$
This Dailybuild (02/03/2013) should be assigned to some variable.
This can be changed same as we change version.
Re: Add a variable
Posted: Fri Mar 22, 2013 9:41 am
by FrancescoT
... Probably I don't follow you correctly.
you could use; $TITLE$$DAYLUILDVAR$$VERSION$
where DAYLUILDVAR is assigned to "Dailybuild (02/03/2013)" as the sample does with TITLE & VERSION variables.
Regards
Re: Add a variable
Posted: Mon Mar 25, 2013 1:12 am
by kishorkk23
Okay,
But where can I say this $DAYLUILDVAR$ ??
Is it in MSI code? or GUI ?
Re: Add a variable
Posted: Mon Mar 25, 2013 8:42 am
by FrancescoT
Dear User,
As I previously told you, the sample "Title & version with a compiler variables.rar " available with the topic I reported with my first reply, demostrates exactly that.
The sample uses two custom Compiler Variables; "BRANDING" & "MYVERSION", to define at build time respectively, the package TITLE and package version.
Just add a new compiler variable and assign to it the value you prefer. Then use the variable, as the other two variables are used by the sample project.
Regards
Re: Add a variable
Posted: Wed Mar 27, 2013 5:20 am
by kishorkk23
Well I do understand that we can declare a variable and then assign a value.
But I want to use the existing values of Project properties.
Title :
Subject :
Author:
Comments:
So let me know how can I use Subect value in my code? Is subject assigned to some global variable or any variable?
Re: Add a variable
Posted: Wed Mar 27, 2013 8:35 am
by FrancescoT
Dear User,
All the available pre-defined variables and pre-defined compiler variables are listed and described with InstalAware documentation (just press F1 from IA IDE and search for; "pre-defined variables" or "pre-defined compiler variables").
Currently, it is not available an already defined variable for "SUBJECT" to use.
But you can define a custom compiler variable for that and then, you can use its dereference with the project settings.
"The syntax for dereferencing a compiler variable in InstallAware is enclosing the variable name between pound signs. For instance, if the variable is called MYCOMPVAR, dereference the variable using #MYCOMPVAR#. You may freely combine multiple dereferenced compiler variables in your string literals."
Hope this helps you.
Regards