How to set up update 1 / update 2, etc. In the {$ IF CompilerVersion> xx} statement

I often do things like this:

  {$IF CompilerVersion > 31} // berlin
    {$MESSAGE WARN 'check the code below'}
  {$ENDIF}

      

but how to also configure berlin 1 update, berlin 2 update, etc.? because 31 is for Berlin and 32 is for Tokyo ... there is no gap in between.

+3


source to share


1 answer


Take a look at your registry.

I have an update in Seattle 1, the box mentions to me Delphi 10 Seattle and C ++ Builder 10 Seattle subscription update 1 * .

This is in Computer\HKEY_CURRENT_USER\Software\Embarcadero\BDS\17.0\InstalledUpdates

under the value named Main Product Update

.

You may have to do some detective work to determine the actual lines
(or the readers here can provide the lines of values ​​they have).



You cannot use your conditional compilation, but at least you can warn the code.


Notes:
- Viewing the CodeGear DLL version information may also be an option.
- The same information is also in C:\programdata\embarcadero\bds\17.0\installedupdates.dat

andC:\users\all users\embarcadero\bds\17.0\installedupdates.dat

* Note the missing space in C ++ Builder

0


source







All Articles