| 1 | //----------------------------------------------------------------------------------------------------------------------
 | 
|---|
| 2 | // Include file to determine which compiler is currently being used to build the project/component.
 | 
|---|
| 3 | // This file uses ideas from Brad Stowers DFS.inc file (www.delphifreestuff.com).
 | 
|---|
| 4 | //
 | 
|---|
| 5 | // Portions created by Mike Lischke are Copyright
 | 
|---|
| 6 | // (C) 1999-2002 Dipl. Ing. Mike Lischke. All Rights Reserved.
 | 
|---|
| 7 | //----------------------------------------------------------------------------------------------------------------------
 | 
|---|
| 8 | // The following symbols are defined:
 | 
|---|
| 9 | //
 | 
|---|
| 10 | // COMPILER_1    : Kylix/Delphi/BCB 1.x is the compiler.
 | 
|---|
| 11 | // COMPILER_1_UP : Kylix/Delphi/BCB 1.x or higher is the compiler.
 | 
|---|
| 12 | // COMPILER_2    : Kylix/Delphi 2.x or BCB 1.x is the compiler.
 | 
|---|
| 13 | // COMPILER_2_UP : Kylix/Delphi 2.x or higher, or BCB 1.x or higher is the compiler.
 | 
|---|
| 14 | // COMPILER_3    : Kylix/Delphi/BCB 3.x is the compiler.
 | 
|---|
| 15 | // COMPILER_3_UP : Kylix/Delphi/BCB 3.x or higher is the compiler.
 | 
|---|
| 16 | // COMPILER_4    : Kylix/Delphi/BCB 4.x is the compiler.
 | 
|---|
| 17 | // COMPILER_4_UP : Kylix/Delphi/BCB 4.x or higher is the compiler.
 | 
|---|
| 18 | // COMPILER_5    : Kylix/Delphi/BCB 5.x is the compiler.
 | 
|---|
| 19 | // COMPILER_5_UP : Kylix/Delphi/BCB 5.x or higher is the compiler.
 | 
|---|
| 20 | // COMPILER_6    : Kylix/Delphi/BCB 6.x is the compiler.
 | 
|---|
| 21 | // COMPILER_6_UP : Kylix/Delphi/BCB 6.x or higher is the compiler.
 | 
|---|
| 22 | // COMPILER_7    : Kylix/Delphi/BCB 7.x is the compiler.
 | 
|---|
| 23 | // COMPILER_7_UP : Kylix/Delphi/BCB 7.x or higher is the compiler.
 | 
|---|
| 24 | //
 | 
|---|
| 25 | // Only defined if Windows is the target:
 | 
|---|
| 26 | // CPPB        : Any version of BCB is being used.
 | 
|---|
| 27 | // CPPB_1      : BCB v1.x is being used.
 | 
|---|
| 28 | // CPPB_3      : BCB v3.x is being used.
 | 
|---|
| 29 | // CPPB_3_UP   : BCB v3.x or higher is being used.
 | 
|---|
| 30 | // CPPB_4      : BCB v4.x is being used.
 | 
|---|
| 31 | // CPPB_4_UP   : BCB v4.x or higher is being used.
 | 
|---|
| 32 | // CPPB_5      : BCB v5.x is being used.
 | 
|---|
| 33 | // CPPB_5_UP   : BCB v5.x or higher is being used.
 | 
|---|
| 34 | // CPPB_6      : BCB v6.x is being used.
 | 
|---|
| 35 | // CPPB_6_UP   : BCB v6.x or higher is being used.
 | 
|---|
| 36 | //
 | 
|---|
| 37 | // Only defined if Windows is the target:
 | 
|---|
| 38 | // DELPHI      : Any version of Delphi is being used.
 | 
|---|
| 39 | // DELPHI_1    : Delphi v1.x is being used.
 | 
|---|
| 40 | // DELPHI_2    : Delphi v2.x is being used.
 | 
|---|
| 41 | // DELPHI_2_UP : Delphi v2.x or higher is being used.
 | 
|---|
| 42 | // DELPHI_3    : Delphi v3.x is being used.
 | 
|---|
| 43 | // DELPHI_3_UP : Delphi v3.x or higher is being used.
 | 
|---|
| 44 | // DELPHI_4    : Delphi v4.x is being used.
 | 
|---|
| 45 | // DELPHI_4_UP : Delphi v4.x or higher is being used.
 | 
|---|
| 46 | // DELPHI_5    : Delphi v5.x is being used.
 | 
|---|
| 47 | // DELPHI_5_UP : Delphi v5.x or higher is being used.
 | 
|---|
| 48 | // DELPHI_6    : Delphi v6.x is being used.
 | 
|---|
| 49 | // DELPHI_6_UP : Delphi v6.x or higher is being used.
 | 
|---|
| 50 | // DELPHI_7    : Delphi v7.x is being used.
 | 
|---|
| 51 | // DELPHI_7_UP : Delphi v7.x or higher is being used.
 | 
|---|
| 52 | //
 | 
|---|
| 53 | // Only defined if Linux is the target:
 | 
|---|
| 54 | // KYLIX       : Any version of Kylix is being used.
 | 
|---|
| 55 | // KYLIX_1     : Kylix 1.x is being used.
 | 
|---|
| 56 | // KYLIX_1_UP  : Kylix 1.x or higher is being used.
 | 
|---|
| 57 | // KYLIX_2     : Kylix 2.x is being used.
 | 
|---|
| 58 | // KYLIX_2_UP  : Kylix 2.x or higher is being used.
 | 
|---|
| 59 | // KYLIX_3     : Kylix 3.x is being used.
 | 
|---|
| 60 | // KYLIX_3_UP  : Kylix 3.x or higher is being used.
 | 
|---|
| 61 | //
 | 
|---|
| 62 | // Only defined if Linux is the target:
 | 
|---|
| 63 | // QT_CLX      : Trolltech's QT library is being used.
 | 
|---|
| 64 | //----------------------------------------------------------------------------------------------------------------------
 | 
|---|
| 65 | 
 | 
|---|
| 66 | {$ifdef Win32}
 | 
|---|
| 67 | 
 | 
|---|
| 68 |   {$ifdef VER180}
 | 
|---|
| 69 |     {$define COMPILER_10}
 | 
|---|
| 70 |     {$define DELPHI}
 | 
|---|
| 71 |     {$define DELPHI_10}
 | 
|---|
| 72 |   {$endif}
 | 
|---|
| 73 | 
 | 
|---|
| 74 |   {$ifdef VER170}
 | 
|---|
| 75 |     {$define COMPILER_9}
 | 
|---|
| 76 |     {$define DELPHI}
 | 
|---|
| 77 |     {$define DELPHI_9}
 | 
|---|
| 78 |   {$endif}
 | 
|---|
| 79 | 
 | 
|---|
| 80 |   {$ifdef VER150}        
 | 
|---|
| 81 |     {$define COMPILER_7}
 | 
|---|
| 82 |     {$define DELPHI}
 | 
|---|
| 83 |     {$define DELPHI_7}
 | 
|---|
| 84 |   {$endif}
 | 
|---|
| 85 | 
 | 
|---|
| 86 |   {$ifdef VER140}
 | 
|---|
| 87 |     {$define COMPILER_6}
 | 
|---|
| 88 |     {$ifdef BCB}
 | 
|---|
| 89 |       {$define CPPB}
 | 
|---|
| 90 |       {$define CPPB_6}
 | 
|---|
| 91 |     {$else}
 | 
|---|
| 92 |       {$define DELPHI}
 | 
|---|
| 93 |       {$define DELPHI_6}
 | 
|---|
| 94 |     {$endif}
 | 
|---|
| 95 |   {$endif}
 | 
|---|
| 96 | 
 | 
|---|
| 97 |   {$ifdef VER130}
 | 
|---|
| 98 |     {$define COMPILER_5}
 | 
|---|
| 99 |     {$ifdef BCB}
 | 
|---|
| 100 |       {$define CPPB}
 | 
|---|
| 101 |       {$define CPPB_5}
 | 
|---|
| 102 |     {$else}
 | 
|---|
| 103 |       {$define DELPHI}
 | 
|---|
| 104 |       {$define DELPHI_5}
 | 
|---|
| 105 |     {$endif}
 | 
|---|
| 106 |   {$endif}
 | 
|---|
| 107 | 
 | 
|---|
| 108 |   {$ifdef VER125}
 | 
|---|
| 109 |     {$define COMPILER_4}
 | 
|---|
| 110 |     {$define CPPB}
 | 
|---|
| 111 |     {$define CPPB_4}
 | 
|---|
| 112 |   {$endif}
 | 
|---|
| 113 | 
 | 
|---|
| 114 |   {$ifdef VER120}
 | 
|---|
| 115 |     {$define COMPILER_4}
 | 
|---|
| 116 |     {$define DELPHI}
 | 
|---|
| 117 |     {$define DELPHI_4}
 | 
|---|
| 118 |   {$endif}
 | 
|---|
| 119 | 
 | 
|---|
| 120 |   {$ifdef VER110}
 | 
|---|
| 121 |     {$define COMPILER_3}
 | 
|---|
| 122 |     {$define CPPB}
 | 
|---|
| 123 |     {$define CPPB_3}
 | 
|---|
| 124 |   {$endif}
 | 
|---|
| 125 | 
 | 
|---|
| 126 |   {$ifdef VER100}
 | 
|---|
| 127 |     {$define COMPILER_3}
 | 
|---|
| 128 |     {$define DELPHI}
 | 
|---|
| 129 |     {$define DELPHI_3}
 | 
|---|
| 130 |   {$endif}
 | 
|---|
| 131 | 
 | 
|---|
| 132 |   {$ifdef VER93}
 | 
|---|
| 133 |     {$define COMPILER_2} // C++ Builder v1 compiler is really v2 
 | 
|---|
| 134 |     {$define CPPB}
 | 
|---|
| 135 |     {$define CPPB_1}
 | 
|---|
| 136 |   {$endif}
 | 
|---|
| 137 | 
 | 
|---|
| 138 |   {$ifdef VER90}
 | 
|---|
| 139 |     {$define COMPILER_2}
 | 
|---|
| 140 |     {$define DELPHI}
 | 
|---|
| 141 |     {$define DELPHI_2}
 | 
|---|
| 142 |   {$endif}
 | 
|---|
| 143 | 
 | 
|---|
| 144 |   {$ifdef VER80}
 | 
|---|
| 145 |     {$define COMPILER_1}
 | 
|---|
| 146 |     {$define DELPHI}
 | 
|---|
| 147 |     {$define DELPHI_1}
 | 
|---|
| 148 |   {$endif}
 | 
|---|
| 149 | 
 | 
|---|
| 150 |   {$ifdef DELPHI_2}
 | 
|---|
| 151 |     {$define DELPHI_2_UP}
 | 
|---|
| 152 |   {$endif}
 | 
|---|
| 153 | 
 | 
|---|
| 154 |   {$ifdef DELPHI_3}
 | 
|---|
| 155 |     {$define DELPHI_2_UP}
 | 
|---|
| 156 |     {$define DELPHI_3_UP}
 | 
|---|
| 157 |   {$endif}
 | 
|---|
| 158 | 
 | 
|---|
| 159 |   {$ifdef DELPHI_4}
 | 
|---|
| 160 |     {$define DELPHI_2_UP}
 | 
|---|
| 161 |     {$define DELPHI_3_UP}
 | 
|---|
| 162 |     {$define DELPHI_4_UP}
 | 
|---|
| 163 |   {$endif}
 | 
|---|
| 164 | 
 | 
|---|
| 165 |   {$ifdef DELPHI_5}
 | 
|---|
| 166 |     {$define DELPHI_2_UP}
 | 
|---|
| 167 |     {$define DELPHI_3_UP}
 | 
|---|
| 168 |     {$define DELPHI_4_UP}
 | 
|---|
| 169 |     {$define DELPHI_5_UP}
 | 
|---|
| 170 |   {$endif}
 | 
|---|
| 171 | 
 | 
|---|
| 172 |   {$ifdef DELPHI_6}
 | 
|---|
| 173 |     {$define DELPHI_2_UP}
 | 
|---|
| 174 |     {$define DELPHI_3_UP}
 | 
|---|
| 175 |     {$define DELPHI_4_UP}
 | 
|---|
| 176 |     {$define DELPHI_5_UP}
 | 
|---|
| 177 |     {$define DELPHI_6_UP}
 | 
|---|
| 178 |   {$endif}
 | 
|---|
| 179 | 
 | 
|---|
| 180 |   {$ifdef DELPHI_7}
 | 
|---|
| 181 |     {$define DELPHI_2_UP}
 | 
|---|
| 182 |     {$define DELPHI_3_UP}
 | 
|---|
| 183 |     {$define DELPHI_4_UP}
 | 
|---|
| 184 |     {$define DELPHI_5_UP}
 | 
|---|
| 185 |     {$define DELPHI_6_UP}
 | 
|---|
| 186 |     {$define DELPHI_7_UP}
 | 
|---|
| 187 |   {$endif}
 | 
|---|
| 188 | 
 | 
|---|
| 189 |   {$ifdef DELPHI_9}
 | 
|---|
| 190 |     {$define DELPHI_2_UP}
 | 
|---|
| 191 |     {$define DELPHI_3_UP}
 | 
|---|
| 192 |     {$define DELPHI_4_UP}
 | 
|---|
| 193 |     {$define DELPHI_5_UP}
 | 
|---|
| 194 |     {$define DELPHI_6_UP}
 | 
|---|
| 195 |     {$define DELPHI_7_UP}
 | 
|---|
| 196 |     {$define DELPHI_9_UP}
 | 
|---|
| 197 |   {$endif}
 | 
|---|
| 198 | 
 | 
|---|
| 199 |   {$ifdef DELPHI_10}
 | 
|---|
| 200 |     {$define DELPHI_2_UP}
 | 
|---|
| 201 |     {$define DELPHI_3_UP}
 | 
|---|
| 202 |     {$define DELPHI_4_UP}
 | 
|---|
| 203 |     {$define DELPHI_5_UP}
 | 
|---|
| 204 |     {$define DELPHI_6_UP}
 | 
|---|
| 205 |     {$define DELPHI_7_UP}
 | 
|---|
| 206 |     {$define DELPHI_9_UP}
 | 
|---|
| 207 |     {$define DELPHI_10_UP}
 | 
|---|
| 208 |   {$endif}
 | 
|---|
| 209 | 
 | 
|---|
| 210 |   {$ifdef CPPB_3}
 | 
|---|
| 211 |     {$define CPPB_3_UP}
 | 
|---|
| 212 |   {$endif}
 | 
|---|
| 213 | 
 | 
|---|
| 214 |   {$ifdef CPPB_4}
 | 
|---|
| 215 |     {$define CPPB_3_UP}
 | 
|---|
| 216 |     {$define CPPB_4_UP}
 | 
|---|
| 217 |   {$endif}
 | 
|---|
| 218 | 
 | 
|---|
| 219 |   {$ifdef CPPB_5}
 | 
|---|
| 220 |     {$define CPPB_3_UP}
 | 
|---|
| 221 |     {$define CPPB_4_UP}
 | 
|---|
| 222 |     {$define CPPB_5_UP}
 | 
|---|
| 223 |   {$endif}
 | 
|---|
| 224 | 
 | 
|---|
| 225 |   {$ifdef CPPB_6}
 | 
|---|
| 226 |     {$define CPPB_3_UP}
 | 
|---|
| 227 |     {$define CPPB_4_UP}
 | 
|---|
| 228 |     {$define CPPB_5_UP}
 | 
|---|
| 229 |     {$define CPPB_6_UP}
 | 
|---|
| 230 |   {$endif}
 | 
|---|
| 231 | 
 | 
|---|
| 232 |   {$ifdef CPPB_3_UP}
 | 
|---|
| 233 |     // C++ Builder requires this if you use Delphi components in run-time packages.
 | 
|---|
| 234 |     {$ObjExportAll On}
 | 
|---|
| 235 |   {$endif}
 | 
|---|
| 236 | 
 | 
|---|
| 237 | {$else (not Windows)}
 | 
|---|
| 238 |   // Linux is the target
 | 
|---|
| 239 |   {$define QT_CLX}
 | 
|---|
| 240 | 
 | 
|---|
| 241 |   {$define KYLIX}
 | 
|---|
| 242 |   {$define KYLIX_1}
 | 
|---|
| 243 |   {$define KYLIX_1_UP}
 | 
|---|
| 244 | 
 | 
|---|
| 245 |   {$ifdef VER150}
 | 
|---|
| 246 |     {$define COMPILER_7}
 | 
|---|
| 247 |     {$define KYLIX_3}
 | 
|---|
| 248 |   {$endif}
 | 
|---|
| 249 | 
 | 
|---|
| 250 |   {$ifdef VER140}
 | 
|---|
| 251 |     {$define COMPILER_6}
 | 
|---|
| 252 |     {$define KYLIX_2}
 | 
|---|
| 253 |   {$endif}
 | 
|---|
| 254 | 
 | 
|---|
| 255 |   {$ifdef KYLIX_2}
 | 
|---|
| 256 |     {$define KYLIX_2_UP}
 | 
|---|
| 257 |   {$endif}
 | 
|---|
| 258 | 
 | 
|---|
| 259 |   {$ifdef KYLIX_3}
 | 
|---|
| 260 |     {$define KYLIX_2_UP}
 | 
|---|
| 261 |     {$define KYLIX_3_UP}
 | 
|---|
| 262 |   {$endif}
 | 
|---|
| 263 | 
 | 
|---|
| 264 | {$endif}
 | 
|---|
| 265 | 
 | 
|---|
| 266 | // Compiler defines common to all platforms.
 | 
|---|
| 267 | {$ifdef COMPILER_1}
 | 
|---|
| 268 |   {$define COMPILER_1_UP}
 | 
|---|
| 269 | {$endif}
 | 
|---|
| 270 | 
 | 
|---|
| 271 | {$ifdef COMPILER_2}
 | 
|---|
| 272 |   {$define COMPILER_1_UP}
 | 
|---|
| 273 |   {$define COMPILER_2_UP}
 | 
|---|
| 274 | {$endif}
 | 
|---|
| 275 | 
 | 
|---|
| 276 | {$ifdef COMPILER_3}
 | 
|---|
| 277 |   {$define COMPILER_1_UP}
 | 
|---|
| 278 |   {$define COMPILER_2_UP}
 | 
|---|
| 279 |   {$define COMPILER_3_UP}
 | 
|---|
| 280 | {$endif}
 | 
|---|
| 281 | 
 | 
|---|
| 282 | {$ifdef COMPILER_4}
 | 
|---|
| 283 |   {$define COMPILER_1_UP}
 | 
|---|
| 284 |   {$define COMPILER_2_UP}
 | 
|---|
| 285 |   {$define COMPILER_3_UP}
 | 
|---|
| 286 |   {$define COMPILER_4_UP}
 | 
|---|
| 287 | {$endif}
 | 
|---|
| 288 | 
 | 
|---|
| 289 | {$ifdef COMPILER_5}
 | 
|---|
| 290 |   {$define COMPILER_1_UP}
 | 
|---|
| 291 |   {$define COMPILER_2_UP}
 | 
|---|
| 292 |   {$define COMPILER_3_UP}
 | 
|---|
| 293 |   {$define COMPILER_4_UP}
 | 
|---|
| 294 |   {$define COMPILER_5_UP}
 | 
|---|
| 295 | {$endif}
 | 
|---|
| 296 | 
 | 
|---|
| 297 | {$ifdef COMPILER_6}
 | 
|---|
| 298 |   {$define COMPILER_1_UP}
 | 
|---|
| 299 |   {$define COMPILER_2_UP}
 | 
|---|
| 300 |   {$define COMPILER_3_UP}
 | 
|---|
| 301 |   {$define COMPILER_4_UP}
 | 
|---|
| 302 |   {$define COMPILER_5_UP}
 | 
|---|
| 303 |   {$define COMPILER_6_UP}
 | 
|---|
| 304 | {$endif}
 | 
|---|
| 305 | 
 | 
|---|
| 306 | {$ifdef COMPILER_7}
 | 
|---|
| 307 |   {$define COMPILER_1_UP}
 | 
|---|
| 308 |   {$define COMPILER_2_UP}
 | 
|---|
| 309 |   {$define COMPILER_3_UP}
 | 
|---|
| 310 |   {$define COMPILER_4_UP}
 | 
|---|
| 311 |   {$define COMPILER_5_UP}
 | 
|---|
| 312 |   {$define COMPILER_6_UP}
 | 
|---|
| 313 |   {$define COMPILER_7_UP}
 | 
|---|
| 314 | {$endif}
 | 
|---|
| 315 | 
 | 
|---|
| 316 | {$ifdef COMPILER_9}
 | 
|---|
| 317 |   {$define COMPILER_1_UP}
 | 
|---|
| 318 |   {$define COMPILER_2_UP}
 | 
|---|
| 319 |   {$define COMPILER_3_UP}
 | 
|---|
| 320 |   {$define COMPILER_4_UP}
 | 
|---|
| 321 |   {$define COMPILER_5_UP}
 | 
|---|
| 322 |   {$define COMPILER_6_UP}
 | 
|---|
| 323 |   {$define COMPILER_7_UP}
 | 
|---|
| 324 |   {$define COMPILER_9_UP}
 | 
|---|
| 325 | {$endif}
 | 
|---|
| 326 | 
 | 
|---|
| 327 | {$ifdef COMPILER_10}
 | 
|---|
| 328 |   {$define COMPILER_1_UP}
 | 
|---|
| 329 |   {$define COMPILER_2_UP}
 | 
|---|
| 330 |   {$define COMPILER_3_UP}
 | 
|---|
| 331 |   {$define COMPILER_4_UP}
 | 
|---|
| 332 |   {$define COMPILER_5_UP}
 | 
|---|
| 333 |   {$define COMPILER_6_UP}
 | 
|---|
| 334 |   {$define COMPILER_7_UP}
 | 
|---|
| 335 |   {$define COMPILER_9_UP}
 | 
|---|
| 336 |   {$define COMPILER_10_UP}
 | 
|---|
| 337 | {$endif}
 | 
|---|
| 338 | 
 | 
|---|
| 339 | //----------------------------------------------------------------------------------------------------------------------
 | 
|---|
| 340 | 
 | 
|---|
| 341 | {$ALIGN ON}
 | 
|---|
| 342 | {$BOOLEVAL OFF}
 | 
|---|
| 343 | 
 | 
|---|
| 344 | {$ifdef COMPILER_7_UP}
 | 
|---|
| 345 |   {$define THEME_7_UP} { Allows experimental theme support on pre-Delphi 7. }
 | 
|---|
| 346 | {$endif}
 | 
|---|
| 347 | 
 | 
|---|
| 348 | {$IFDEF COMPILER_6_UP}
 | 
|---|
| 349 | {$WARN SYMBOL_PLATFORM OFF} { We are going to use Win32 specific symbols! }
 | 
|---|
| 350 | {$ENDIF}
 | 
|---|
| 351 | 
 | 
|---|
| 352 | {$IFDEF COMPILER_7_UP}
 | 
|---|
| 353 | {$WARN UNSAFE_CODE OFF} { We are not going to be "safe"! }
 | 
|---|
| 354 | {$WARN UNSAFE_TYPE OFF}
 | 
|---|
| 355 | {$WARN UNSAFE_CAST OFF}
 | 
|---|
| 356 | {$ENDIF}
 | 
|---|