In my build script, I have a Delphi Compile action where I need to change the version of Delphi I compile with. Essentially, it's based on a build parameter which indentifies the codeline I'm building.
However, when I change the Action.CompilerVersion property in my BeforeAction script, the Action.LibraryPath does not change in synch which is different from what happens with you change it in the UI. And the Compile action then fails building it's cfg due to not being able to expand either $(DELPHI) or $(BDS) respectively.
Is there a way to force the Delphi action to reload the correct Action.LibraryPath for the appropriate CompilerVersion like it does in the UI?
If not, I'm forced to have an IF block and two Delphi Compiler actions which seems clumsier.
Each MsgBox shows the exact same out of date path that the action currently has (albeit shown greyed out due to the option) but the Global library options have been updated and the action never seems to see them.
I'm guessing that FinalBuilder's actual implementation of Action.LibraryPath is that it only gets used for the .cfg if Action.AlwaysUseDelphiLibraryPath is False and is completely ignored otherwise, as opposed to Action.LibraryPath being populated with the global library path if told to and Action.LibraryPath always being placed into the .cfg
That would explain the behaviour I'm seeing and would normally work just fine unlessyou're trying to work with the default library path in Action code like I'm trying to do.