2

I am enumerating project's build configurations. I want to get the "Debug" build configuration. I do realize it is not something hardcoded and can be removed by user, or another configurations could be added. However, IDE does create predefined build configurations ("Release" and "Debug"), and I need to retrieve one - if it still exists.

Now, there is IOTABuildConfiguration.Name, which returns 'Debug'. However, this is localized string, it can be something else in German or other language.

There is also IOTABuildConfiguration.Key, which has value of 'Cfg_1'. Can I be sure 'Cfg_1' is always 'Debug'?

There is IOTAProjectOptionsConfigurations.BaseConfiguration, which returns base build configuration. So at least I always know the base one, without need to touch localized name.

Is there anything I can do to retrieve localized name for the "Debug" build configuration? Or my best bet is to use hack of matching build configuration name with the list of known localized names?

3
  • 2
    Cfg_1 is not always 'Debug'. Aren't there any constants (resourcestring ?) in ToosApi.pas for the standard names? I have never used anything but an English IDE, so I don't know what they are called in other languages, but there are only four of them: English, French, German and Japanese. Commented Jul 25 at 13:10
  • 2
    Although the strings "Debug" and "Release" appear in the language resources for coride290.bpl, they don't differ in all four supported languages. That said, I would rate it as less optimal to store these common names in a configuration file using different terms for each language. At least I would have problems finding the Debug configuration when I open a project created on a Chinese system if that were the case. Commented Jul 25 at 17:53
  • I suppose my best bet is to look for build configuration that defines the "DEBUG" conditional symbol - which is not localized. Commented Aug 15 at 16:52

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.