When I access the Action.CBuilderVersion property in the before action JavaScript sub, it hangs. The following is all I add to the before action event:
var cv = Action.CBuilderVersion;
This causes FinalBuilder to hang right away when I run the project. It thinks it is running but it is doing nothing. The only way to get out of this is to kill FinalBuilder, as the terminate buttons do not terminate the process.
I would like to print out the CBuilderVersion value so that I know what values to use to set this property to a particular version but any reference to that property hangs the project. It never gets into actually trying to compile. As soon as I remove the reference to CBuilderVersion the project runs fine. I am not sure if other properties cause this as I have not tried any other properties yet. (Update: I tried same thing with the ProjectFile property and I am able to access it ok)
Also: I am trying this with a project where this is the only action so there is nothing else that can be affecting it.
I can reproduce this here… and just discovered it’s a bug in Delphi 2010 in RTTI.pas (confirmed by Barry Kelly)… still trying to figure out how to work around it.
Thanks Vincent. Setting the CBuilderVersion property to a value does seem to work ok, so I was able to figure out what the values were for each CBuilderVersion by setting it starting at zero and incrementing and seeing what the property was set to in the property inspector after each time. So I got what I needed.
>> Note that the scripting engine does have constants for the CbuilderVersion property. If you type
Action.CBuilderVersion =
and then hit Ctrl+Space you should see a list of possible values. <<
That helps, but what I really needed to know was what the values for those constants are so that I could store them in a comma delimeted file for use in a csv iterator. I don't think it would work to read the text for a constant name from a file into a variable and set CBuilderVersion to that? I was able to figure out that cb2006 = 0, cb2007 = 1, ... and so on.
BTW, is there a technical reason why the Delphi and BCB build actions are not consolidated into one? I see the Delphi action does include up to and including bc2006.
The bcb support in the delphi action is limited to compiling pas files to produce the cbuilder header files. The delphi action calls dcc, the bcb action calls either make or msbuild depending on the version.