Compiler Variables

Got a problem you cannot solve? Try here.
viponly
Posts: 8
Joined: Fri Jan 13, 2006 12:48 pm

Compiler Variables

Postby viponly » Fri Jan 13, 2006 9:29 pm

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?

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Fri Jan 13, 2006 9:53 pm

Yes, using compiler variables :)
Regular variables are of the form $VAR$ in InstallAware.
Compiler variables are of the form #VAR#.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

viponly
Posts: 8
Joined: Fri Jan 13, 2006 12:48 pm

Postby viponly » Fri Jan 13, 2006 10:01 pm

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.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Sat Jan 14, 2006 12:23 pm

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!
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

viponly
Posts: 8
Joined: Fri Jan 13, 2006 12:48 pm

Postby viponly » Wed Feb 01, 2006 4:23 pm

I'm digging up an old message, but you think you can write a script of my first post that I can download?

Gizm0
Posts: 339
Joined: Wed Nov 09, 2005 8:47 pm

Postby Gizm0 » Wed Feb 01, 2006 4:29 pm

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,
Panagiotis Kefalidis
Software Design Team Lead
\"In order to succeed, your desire for success should be greater than your fear of failure\"
InstallAware Software Corporation

viponly
Posts: 8
Joined: Fri Jan 13, 2006 12:48 pm

Postby viponly » Thu Feb 02, 2006 11:00 am

Thanks but no thanks. I wonder if anyone else out there can help me without charging a fee? Thanks.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Thu Feb 02, 2006 11:07 am

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.
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

viponly
Posts: 8
Joined: Fri Jan 13, 2006 12:48 pm

Postby viponly » Thu Feb 02, 2006 11:24 am

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:

Image

Image

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
Last edited by viponly on Thu Feb 02, 2006 11:44 am, edited 1 time in total.

CandiceJones
Posts: 904
Joined: Thu Dec 22, 2005 7:03 pm
Contact:

Postby CandiceJones » Thu Feb 02, 2006 11:44 am

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
Candice Jones
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

viponly
Posts: 8
Joined: Fri Jan 13, 2006 12:48 pm

Postby viponly » Thu Feb 02, 2006 11:50 am

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.

CandiceJones
Posts: 904
Joined: Thu Dec 22, 2005 7:03 pm
Contact:

Postby CandiceJones » Thu Feb 02, 2006 12:20 pm

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.
Candice Jones

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/


Return to “Technical Support”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 233 guests