home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 September / Chip_2001-09_cd1.bin / zkuste / delphi / kolekce / d123456 / DFS.ZIP / dfs.inc < prev    next >
Text File  |  2001-06-27  |  10KB  |  259 lines

  1. (******************************************************************************)
  2. (* Delphi Free Stuff Include File.  This file is used for all my components   *)
  3. (* to create some standard defines.  This will help reduce headaches when new *)
  4. (* versions of Delphi and C++Builder are released, among other things.        *)
  5. (******************************************************************************)
  6. (* Brad Stowers: bstowers@pobox.com                                           *)
  7. (* Delphi Free Stuff: http://www.delphifreestuff.com/                         *)
  8. (* June 27, 2001                                                              *)
  9. (******************************************************************************)
  10. (* Usage:   Add the following line to the top of your unit file:              *)
  11. (*   {$I DFS.INC}                                                             *)
  12. (******************************************************************************)
  13. (*                                                                            *)
  14. (* Complete Boolean Evaluation compiler directive is turned off by including  *)
  15. (*   this file.                                                               *)
  16. (* The $ObjExportAll directive is turned on if compiling with C++Builder 3 or *)
  17. (*   higher.  This is required for Delphi components built in Builder with    *)
  18. (*   run-time packages.                                                       *)
  19. (*                                                                            *)
  20. (* Here is a brief explanation of what each of the defines mean:              *)
  21. (* DELPHI_FREE_STUFF    : Always defined when DFS.INC is included             *)
  22. (* DFS_WIN16            : Compilation target is 16-bit Windows                *)
  23. (* DFS_WIN32            : Compilation target is 32-bit Windows                *)
  24. (* DFS_USEDEFSHLOBJ     : The SHLOBJ.PAS version contains no none errors.     *)
  25. (*                        Delphi 2.0x and C++Builder 1.0x shipped with a      *)
  26. (*                        version of SHLOBJ.PAS that had many nasty errors.   *)
  27. (*                        See my web site in the Hints section for how to fix *)
  28. (* DFS_NO_COM_CLEANUP   : The version of the compiler being used does not     *)
  29. (*                        require COM objects to be released; it is done      *)
  30. (*                        automatically when they go "out of scope".          *)
  31. (* DFS_NO_DSGNINTF      : Delphi 6 pretty much kills off the DsgnIntf unit    *)
  32. (*                        for good. Split into a couple of new units.         *)
  33. (* DFS_DESIGNERSELECTIONS: IDesignerSelections replaced TDesignerSelectionList*)
  34. (* DFS_IPROPERTY        : IProperty introduced for design-time stuff.         *)
  35. (* DFS_COMPILER_1       : Delphi 1.0 is the compiler.  Note that C++B 1.0     *)
  36. (*                        does NOT cause this to be defined.  It is really    *)
  37. (*                        the 2.0 compiler.                                   *)
  38. (* DFS_COMPILER_1_UP    : Delphi 1.0x or higher, or C++B 1.0x or higher is    *)
  39. (*                        the compiler.                                       *)
  40. (* DFS_COMPILER_2       : Delphi 2.0x or C++B 1.0x is the compiler.           *)
  41. (* DFS_COMPILER_2_UP    : Delphi 2.0x or higher, or C++B 1.0x or higher is    *)
  42. (*                        the compiler.                                       *)
  43. (* DFS_COMPILER_3       : Delphi 3.0x or C++B 3.0x is the compiler.           *)
  44. (* DFS_COMPILER_3_UP    : Delphi 3.0x or higher, or C++B 3.0x or higher is    *)
  45. (*                        the compiler.                                       *)
  46. (* DFS_COMPILER_4       : Delphi 4.0x or C++B 4.0x is the compiler.           *)
  47. (* DFS_COMPILER_4_UP    : Delphi 4.0x or higher, or C++B 4.0x or higher is    *)
  48. (*                        the compiler.                                       *)
  49. (* DFS_COMPILER_5       : Delphi 5.0x or C++B 5.0x is the compiler.           *)
  50. (* DFS_COMPILER_5_UP    : Delphi 5.0x or higher, or C++B 5.0x or higher is    *)
  51. (*                        the compiler.                                       *)
  52. (* DFS_COMPILER_6       : Delphi 6.0x or C++B 6.0x is the compiler.           *)
  53. (* DFS_COMPILER_6_UP    : Delphi 6.0x or higher, or C++B 6.0x or higher is    *)
  54. (*                        the compiler.                                       *)
  55. (* DFS_UNKNOWN_COMPILER : No sense could be made of the compiliation          *)
  56. (*                        environment.                                        *)
  57. (* DFS_CPPB             : Any version of C++B is being used.                  *)
  58. (* DFS_CPPB_1           : C++B v1.0x is being used.                           *)
  59. (* DFS_CPPB_3           : C++B v3.0x is being used.                           *)
  60. (* DFS_CPPB_3_UP        : C++B v3.0x or higher is being used.                 *)
  61. (* DFS_CPPB_4           : C++B v4.0x is being used.                           *)
  62. (* DFS_CPPB_4_UP        : C++B v4.0x or higher is being used.                 *)
  63. (* DFS_CPPB_5           : C++B v5.0x is being used.                           *)
  64. (* DFS_CPPB_5_UP        : C++B v5.0x or higher is being used.                 *)
  65. (* DFS_DELPHI           : Any version of Delphi is being used.                *)
  66. (* DFS_DELPHI_1         : Delphi v1.0x is being used.                         *)
  67. (* DFS_DELPHI_2         : Delphi v2.0x is being used.                         *)
  68. (* DFS_DELPHI_2_UP      : Delphi v2.0x or higher is being used.               *)
  69. (* DFS_DELPHI_3         : Delphi v3.0x is being used.                         *)
  70. (* DFS_DELPHI_3_UP      : Delphi v3.0x or higher is being used.               *)
  71. (* DFS_DELPHI_4         : Delphi v4.0x is being used.                         *)
  72. (* DFS_DELPHI_4_UP      : Delphi v4.0x or higher is being used.               *)
  73. (* DFS_DELPHI_5         : Delphi v5.0x is being used.                         *)
  74. (* DFS_DELPHI_5_UP      : Delphi v5.0x or higher is being used.               *)
  75. (* DFS_DELPHI_6         : Delphi v6.0x is being used.                         *)
  76. (* DFS_DELPHI_6_UP      : Delphi v6.0x or higher is being used.               *)
  77. (******************************************************************************)
  78.  
  79.  
  80. { All DFS components rely on complete boolean eval compiler directive set off. }
  81. {$B-}
  82.  
  83. {$DEFINE DELPHI_FREE_STUFF}
  84.  
  85. {$IFDEF WIN32}
  86.   {$DEFINE DFS_WIN32}
  87. {$ELSE}
  88.   {$DEFINE DFS_WIN16}
  89. {$ENDIF}
  90.  
  91. {$IFDEF VER140}
  92.   {$DEFINE DFS_COMPILER_6}
  93.   {$DEFINE DFS_DELPHI}
  94.   {$DEFINE DFS_DELPHI_6}
  95. {$ENDIF}
  96.  
  97. {$IFDEF VER130}
  98.   {$DEFINE DFS_COMPILER_5}
  99.   {$IFDEF BCB}
  100.     {$DEFINE DFS_CPPB}
  101.     {$DEFINE DFS_CPPB_5}
  102.   {$ELSE}
  103.     {$DEFINE DFS_DELPHI}
  104.     {$DEFINE DFS_DELPHI_5}
  105.   {$ENDIF}
  106. {$ENDIF}
  107.  
  108. {$IFDEF VER125}
  109.   {$DEFINE DFS_COMPILER_4}
  110.   {$DEFINE DFS_CPPB}
  111.   {$DEFINE DFS_CPPB_4}
  112. {$ENDIF}
  113.  
  114. {$IFDEF VER120}
  115.   {$DEFINE DFS_COMPILER_4}
  116.   {$DEFINE DFS_DELPHI}
  117.   {$DEFINE DFS_DELPHI_4}
  118. {$ENDIF}
  119.  
  120. {$IFDEF VER110}
  121.   {$DEFINE DFS_COMPILER_3}
  122.   {$DEFINE DFS_CPPB}
  123.   {$DEFINE DFS_CPPB_3}
  124. {$ENDIF}
  125.  
  126. {$IFDEF VER100}
  127.   {$DEFINE DFS_COMPILER_3}
  128.   {$DEFINE DFS_DELPHI}
  129.   {$DEFINE DFS_DELPHI_3}
  130. {$ENDIF}
  131.  
  132. {$IFDEF VER93}
  133.   {$DEFINE DFS_COMPILER_2}  { C++B v1 compiler is really v2 }
  134.   {$DEFINE DFS_CPPB}
  135.   {$DEFINE DFS_CPPB_1}
  136.   {.$DEFINE DFS_USEDEFSHLOBJ} { C++B 1 has the correct SHLOBJ.H, but
  137.                                 SHLOBJ.PAS has errors so this isn't defined }
  138. {$ENDIF}
  139.  
  140. {$IFDEF VER90}
  141.   {$DEFINE DFS_COMPILER_2}
  142.   {$DEFINE DFS_DELPHI}
  143.   {$DEFINE DFS_DELPHI_2}
  144. {$ENDIF}
  145.  
  146. {$IFDEF VER80}
  147.   {$DEFINE DFS_COMPILER_1}
  148.   {$DEFINE DFS_DELPHI}
  149.   {$DEFINE DFS_DELPHI_1}
  150. {$ENDIF}
  151.  
  152. {$IFNDEF DFS_CPPB}
  153.   {$IFNDEF DFS_DELPHI}
  154.     { Don't know what the hell it is.  Could be new version, or could be old BP. }
  155.     {$DEFINE DFS_UNKNOWN_COMPILER}
  156.   {$ENDIF}
  157. {$ENDIF}
  158.  
  159. {$IFDEF DFS_COMPILER_1}
  160.   {$DEFINE DFS_COMPILER_1_UP}
  161. {$ENDIF}
  162.  
  163. {$IFDEF DFS_COMPILER_2}
  164.   {$DEFINE DFS_COMPILER_1_UP}
  165.   {$DEFINE DFS_COMPILER_2_UP}
  166. {$ENDIF}
  167.  
  168. {$IFDEF DFS_COMPILER_3}
  169.   {$DEFINE DFS_COMPILER_1_UP}
  170.   {$DEFINE DFS_COMPILER_2_UP}
  171.   {$DEFINE DFS_COMPILER_3_UP}
  172. {$ENDIF}
  173.  
  174. {$IFDEF DFS_COMPILER_4}
  175.   {$DEFINE DFS_COMPILER_1_UP}
  176.   {$DEFINE DFS_COMPILER_2_UP}
  177.   {$DEFINE DFS_COMPILER_3_UP}
  178.   {$DEFINE DFS_COMPILER_4_UP}
  179. {$ENDIF}
  180.  
  181. {$IFDEF DFS_COMPILER_5}
  182.   {$DEFINE DFS_COMPILER_1_UP}
  183.   {$DEFINE DFS_COMPILER_2_UP}
  184.   {$DEFINE DFS_COMPILER_3_UP}
  185.   {$DEFINE DFS_COMPILER_4_UP}
  186.   {$DEFINE DFS_COMPILER_5_UP}
  187. {$ENDIF}
  188.  
  189. {$IFDEF DFS_COMPILER_6}
  190.   {$DEFINE DFS_COMPILER_1_UP}
  191.   {$DEFINE DFS_COMPILER_2_UP}
  192.   {$DEFINE DFS_COMPILER_3_UP}
  193.   {$DEFINE DFS_COMPILER_4_UP}
  194.   {$DEFINE DFS_COMPILER_5_UP}
  195.   {$DEFINE DFS_COMPILER_6_UP}
  196. {$ENDIF}
  197.  
  198. {$IFDEF DFS_DELPHI_2}
  199.   {$DEFINE DFS_DELPHI_2_UP}
  200. {$ENDIF}
  201.  
  202. {$IFDEF DFS_DELPHI_3}
  203.   {$DEFINE DFS_DELPHI_2_UP}
  204.   {$DEFINE DFS_DELPHI_3_UP}
  205. {$ENDIF}
  206.  
  207. {$IFDEF DFS_DELPHI_4}
  208.   {$DEFINE DFS_DELPHI_2_UP}
  209.   {$DEFINE DFS_DELPHI_3_UP}
  210.   {$DEFINE DFS_DELPHI_4_UP}
  211. {$ENDIF}
  212.  
  213. {$IFDEF DFS_DELPHI_5}
  214.   {$DEFINE DFS_DELPHI_2_UP}
  215.   {$DEFINE DFS_DELPHI_3_UP}
  216.   {$DEFINE DFS_DELPHI_4_UP}
  217.   {$DEFINE DFS_DELPHI_5_UP}
  218. {$ENDIF}
  219.  
  220. {$IFDEF DFS_DELPHI_6}
  221.   {$DEFINE DFS_DELPHI_2_UP}
  222.   {$DEFINE DFS_DELPHI_3_UP}
  223.   {$DEFINE DFS_DELPHI_4_UP}
  224.   {$DEFINE DFS_DELPHI_5_UP}
  225.   {$DEFINE DFS_DELPHI_6_UP}
  226. {$ENDIF}
  227.  
  228. {$IFDEF DFS_CPPB_3}
  229.   {$DEFINE DFS_CPPB_3_UP}
  230. {$ENDIF}
  231.  
  232. {$IFDEF DFS_CPPB_4}
  233.   {$DEFINE DFS_CPPB_3_UP}
  234.   {$DEFINE DFS_CPPB_4_UP}
  235. {$ENDIF}
  236.  
  237. {$IFDEF DFS_CPPB_5}
  238.   {$DEFINE DFS_CPPB_3_UP}
  239.   {$DEFINE DFS_CPPB_4_UP}
  240.   {$DEFINE DFS_CPPB_5_UP}
  241. {$ENDIF}
  242.  
  243. {$IFDEF DFS_COMPILER_3_UP}
  244.   {$DEFINE DFS_NO_COM_CLEANUP}
  245.   {$DEFINE DFS_USEDEFSHLOBJ} { Only D3+ and C++B 3+ have no errors in SHLOBJ }
  246. {$ENDIF}
  247.  
  248. {$IFDEF DFS_CPPB_3_UP}
  249.   // C++Builder requires this if you use Delphi components in run-time packages.
  250.   {$ObjExportAll On}
  251. {$ENDIF}
  252.  
  253. {$IFDEF DFS_COMPILER_6_UP}
  254.   // Delphi 6 pretty much kills off the DsgnIntf unit for good.
  255.   {$DEFINE DFS_NO_DSGNINTF}
  256.   {$DEFINE DFS_DESIGNERSELECTIONS}
  257.   {$DEFINE DFS_IPROPERTY}
  258. {$ENDIF}
  259.