Page 1 of 1

Compiler Variable statements completely ignored

Posted: Fri May 12, 2006 12:54 pm
by Paul Guthrie
Hi,

I am a new user of InstallAware Studio (Version 5.31, Build elephant_sp3.060326).

For some reason compiler variable statements in my script seem to be completely ignored. Example:

I have defined a compiler variable in Project options called TESTCV, with a default value of 1.

My script:

[compiler if Variable TESTCV Equals 1]
MessageBox: Compiler TESTCV equals 1,
[compiler else]
MessageBox: Compiler TESTCV NOT equals 1,
[compiler end]

When I run the script BOTH message boxes are displayed, why? Can someone tell me what is going on? How do I get Compiler variables to work?

thanks,
Paul G

Posted: Fri May 12, 2006 3:06 pm
by MichaelNesmith
Can you attach screenshots of your compiler variables section in the Project Options window, and paste the exact code?

Posted: Fri May 12, 2006 3:34 pm
by Paul Guthrie
Hi,

Screenshots here:

Compiler Variable setting
http://www.guthcad.com/tmp/projopts.gif
Script picture:
http://www.guthcad.com/tmp/testcv.gif

re.
and paste the exact code?

By 'exact code' i am not sure how to paste the exact text I see in the script editor: Below is the result from copy/paste the clipboard.

~InstallAware Clipboard Data~
~Compiler Variable End~
~{01AF77F1-345A-47ED-8A1A-EEA2FFCB61E0}~
~MessageBox~
~{07FA3E52-35AC-43D1-9CEE-E5A0E83D3C40}~
~TESTCV NOT == 1~
~~
~0~
~1~
~~
~Compiler Variable Else~
~{AD0C0D76-F40B-4AAE-AFE1-A814A1E3F7C2}~
~MessageBox~
~{7244F19B-EC38-44B5-9E59-F513B0F127D8}~
~TESTCV == 1~
~~
~0~
~1~
~~
~Compiler Variable If~
~{E1CE782D-783D-455F-AA0D-C083E5AE1247}~
~TESTCV~
~0~
~1~
~FALSE~


thanks,
Paul G

Posted: Fri May 12, 2006 5:01 pm
by MichaelNesmith
When I build this and run this, it works exactly as expected. Make sure you are doing a full build first - that should help.

Posted: Fri May 12, 2006 11:07 pm
by Paul Guthrie
Michael,

The problem was occurring yesterday with full build or no full build, and in different projects.

Today the problem has disappeared. So I can only assume that my machine or InstallAware had gotten into some state that was causing the problem.

Anyway I am just glad that the problem has gone away (for the now at least), it was very frustrating.

thanks for your help.
Paul G

Posted: Sat May 13, 2006 2:04 am
by MichaelNesmith
Sure thing. Sorry to hear about it. If it recurs, let us know what steps cause it so we can fix it for the future!