Delphi's OTA: is there a way to get active configuration while building (D2010)?

Posted by Alexander on Stack Overflow See other posts from Stack Overflow or by Alexander
Published on 2010-04-12T08:36:24Z Indexed on 2010/06/06 8:32 UTC
Read the original article Hit count: 472

Filed under:
|
|
|

I can ask Delphi to build all configurations at once - by clicking on "Build configurations" and invoking "Make" command:

Build all confs

This will build all configurations, one after another.

The problem is that we have an IDE expert, which must react on compilation events. We register IOTAIDENotifier80 to hook events. There are BeforeBuild and AfterBuild events - we're interested in those. IOTAProject is passed to each event.

The problem is: the active configuration is never changed. I.e. if you have "Debug" configuration selected (maked in bold) - all calls to BeforeBuild/AfterBuild events will return debug configuration profile (even though IDE compiles different profiles one after another). I mean properties of IOTAProject here.

I also tried to use IOTAProjectOptionsConfigurations, but its ActiveConfiguration property always return the same "bolded" profile, regardless of current compiled one.

The question is: is there a way to get the "real" current profile?

© Stack Overflow or respective owner

Related posts about delphi

Related posts about delphi-2010