Changing Delphi Platform from VBScript

As per subject, how can I change the “Build Delphi Project” action’s “Platform” property from a script?  It isn’t currently documented in the help, nor obvious how the TPlatform/Win64 value stored in the fbp7 file translates.

Hi Craig,

The script for setting the “Build Delphi Project” actions “Platform” value is;

Action.Platform = 0; //0 = 32 bit, 1=64 bit

The way I got this information is by clicking on the action, then heading to the properties tab. Then I located the platform property and selected it. The help at the bottom of the property window gives the script required to set that particular property. Currently, intelli-sense isn’t working for these properties, it is something I am looking into.

Hi Jason,

Thanks for the help, I’d never noticed the Properties tab before. I’m not seeing the documentation for the values though. On my system (Win7, FB 7.0.0.3202) it just shows:

[B]Platform[/B]

Scripting: Action.Platform


Should I just use the index into the dropdown list when this comes up?

Also, it looks like there’s something wrong with the CompilerVersion property on that tab: It only shows up through XE2 and it doesn’t match what the popup dialog shows. I have XE7 selected in the dialog, but it shows as Delphi 2007 on the tab.

Also, a more serious issue: Changing the CompilerVersion dropdown to “Delphi XE7” in the dialog reinitializes the LibraryPath property to default values even if “Use Global Delphi Library Path” is unchecked. It looks like it remembers variants for some CompilerVersion/Platform combinations, since I can switch between them and it will occasionally have the value I entered previously, the two really shouldn’t be interacting, especially if I’ve customized it.

Hi!

I just had the same problem - we need to switch between 32 and 64 Bit builds dynamically. Finding the right value for Action.Platform was impossible as neither the properties panel, nor any other documentation mentions them. Even the project file does not use numeric values for Win32 or Win64. And it’s not the index either, because OSX32 is the first item on this list.

Regards,
Chris

Hi Chris,

A recent update that we made has fixed the resetting of the library path. I can be found here:

http://downloads.finalbuilder.com/downloads/finalbuilder/700/FB700_3229.exe

For setting the platform for the Build Delphi action the possible values are as follows:

0 = Win32
1 = Win64
2 = OSX

Testing here show that to work. I do agree the documentation on this part of the application is lacking. I am currently in the process of giving it all a massive overhaul. I intend to include all scripting properties for each action and their potential values.

I wasn’t able to reproduce the following “… it’s not the index either, because OSX32 is the first item on this list.”. For me the first item in the list is Win32 with an index of 0.

Let me know how this goes for you.

Hi!

Regarding: "I wasn’t able to reproduce the following “… it’s not the index either, because OSX32 is the first item on this list.”. For me the first item in the list is Win32 with an index of 0. ":

I’m using build 3229 which you provided. In the properties tab, the list is: OSX32, Win32, Win64:


Hi Chris,

The properties dialog seems to be showing the potential options in alphabetical order. Something I will look into. This doesn’t change the values accepted by script however.

Does using the following script change the platform to Win64 for you?

Action.Platform = 1;

If not what else is occurring in the script before/after the platform is set?

Hi Jason!

Setting Action.Platform = 1 works here, too. My input to this topic was rather regarding finding the right values in first place.

Greetings,
Christian

Hi Christian,

Thanks for clearing that up. I am currently working on updating the help so that its absolutely clear on valid property values, and error conditions for scripting. The help is very lacking in this regard at present.