Page 1 of 1
Compiler Variables
Posted: Fri Jan 13, 2006 9:29 pm
by viponly
In Wise 9 I have the ability to create Compiler Variables which outputs different executables depending on the logic in the script. For example, I have something like this:
if Compiler Variable ENVIRONMENT equals QA
Set Variable ENVIRONMENT_LABEL to QA
end
if Compiler Variable ENVIRONMENT equals Production
Set Variable ENVIRONMENT_LABEL to Production.
end
Then I do a
Set Variable APPTITLE to ABC_%ENVIRONMENT_LABEL%
When I compile, I'm given a choice between QA or a Maintenance build and the it creates an executable with the proper name.
Is there a way I can do this with InstallAware?
Posted: Fri Jan 13, 2006 9:53 pm
by MichaelNesmith
Yes, using compiler variables
Regular variables are of the form $VAR$ in InstallAware.
Compiler variables are of the form #VAR#.
Posted: Fri Jan 13, 2006 10:01 pm
by viponly
I'm currently evaluating InstallAware so I'm very new to it. You think you have time to write a small script like the one I have on my first post where the name of the excutable will depend on the compile variable (I.E. ABC_QA .exe and ABC_Maintenance.exe)? Thank you.
Posted: Sat Jan 14, 2006 12:23 pm
by MichaelNesmith
Its identical in that aspect to Wise. Just switch to the code view - you will see that its literally the same script editor you know and love in Wise 9.x. Press ALT+C to switch to the code view.
If you still have questions - please let me know!
Posted: Wed Feb 01, 2006 4:23 pm
by viponly
I'm digging up an old message, but you think you can write a script of my first post that I can download?
Posted: Wed Feb 01, 2006 4:29 pm
by Gizm0
I can provide consulting services and write the script for you if you want, at a very reasonable fee.
Contact me if you're interested at pkefal (at) installaware (dot) com.
Thank you,
Posted: Thu Feb 02, 2006 11:00 am
by viponly
Thanks but no thanks. I wonder if anyone else out there can help me without charging a fee? Thanks.
Posted: Thu Feb 02, 2006 11:07 am
by MichaelNesmith
Hi!
I'd love to contribute a script, but this is so easy to do, I'm not sure what part you are missing?
The script view works the same way it does in Wise.
You type commands just as you would in Wise, or drag-drop them.
The only difference is that compiler variables are of the form #COMP# and variables are of the form $VAR$.
You can even use our Wise import tool to convert an existing Wise script to InstallAware. So you can see how the compiler variable and variable commands got moved over.
Its all right there for you - just let us know what's not clear and we'll either improve it in the product, or do it for you.
Posted: Thu Feb 02, 2006 11:24 am
by viponly
I must be doing something wrong. Here is the wise script.
If Compiler Variable _ENVIRONMENT_ Equals "Maintenance" then
Set Variable APPTITLE to Maintenance
Compiler Variable End
If Compiler Variable _ENVIRONMENT_ Equals "QA" then
Set Variable APPTITLE to QA
Compiler Variable End
If Compiler Variable _ENVIRONMENT_ Equals "Production" then
Set Variable APPTITLE to Production
Compiler Variable End
Here is a screenshot of the Compiler Variable settings and Build Settings:
I've tried to convert the script with InstallAware, but it did not work.
I've attached the Wise Script also.
File Attached:
CompilerVariable.wse
Posted: Thu Feb 02, 2006 11:44 am
by CandiceJones
Hi!
I was able to convert the script you gave immediately into InstallAware using the conversion wizard. What problem did you encounter exactly during conversion, in saying it didn't work?
I have attached the resulting project here so you can see for yourself.
Also, did you actually try to enter commands in the script view of InstallAware? You can type commands or drag-drop them the same way you would do in Wise. This is so easy to do - I don't see what could possibly go wrong! I would normally assume you are unfamiliar with the IDE, but since you've used Wise before, this should be second nature to you (unless of course, you inherited some other party's Wise script and are trying to figure it out).
For us to be able to help you further, please provide step-by-step instructions on exactly what you did in the IDE (buttons you pressed, text you typed) and how it failed to provide the desired results (error messages received, unexpected results).
File Attached:
My Project.zip
Posted: Thu Feb 02, 2006 11:50 am
by viponly
The conversion I can do and I don't receive any errors. In Wise when you compile the script, you are given 3 options, Maintenance, QA, or Prod. If you choose Maintenance, the executable name is "Test_Maintenance.EXE" because of the Set Variable APPTITLE to Maintenance in the script. In IA, I'm not given those choices.
Posted: Thu Feb 02, 2006 12:20 pm
by CandiceJones
I apologize, I am at a loss trying to understand what you are saying here. Could you please explain in a little more detail, feel free to email us if you wish.