PackageCore.pas 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. {
  2. $Project$
  3. $Workfile$
  4. $Revision$
  5. $DateUTC$
  6. $Id$
  7. This file is part of the Indy (Internet Direct) project, and is offered
  8. under the dual-licensing agreement described on the Indy website.
  9. (http://www.indyproject.org/)
  10. Copyright:
  11. (c) 1993-2005, Chad Z. Hower and the Indy Pit Crew. All rights reserved.
  12. }
  13. {
  14. $Log$
  15. }
  16. {
  17. { Rev 1.5 3/3/2005 7:46:24 PM JPMugaas
  18. { Backdoors for BDS assembly version information.
  19. }
  20. {
  21. { Rev 1.4 9/7/2004 3:50:46 PM JPMugaas
  22. { Updates.
  23. }
  24. {
  25. { Rev 1.3 04/09/2004 12:45:16 ANeillans
  26. { Moved the databasename and output paths into a globally accessible variable
  27. { -- makes it a lot easier to override if you need to (as I did for my local
  28. { file structure).
  29. }
  30. {
  31. { Rev 1.2 2004.06.13 8:06:12 PM czhower
  32. { Update for D8
  33. }
  34. {
  35. { Rev 1.1 02/06/2004 17:00:46 HHariri
  36. { design-time added
  37. }
  38. {
  39. { Rev 1.0 2004.02.08 2:28:34 PM czhower
  40. { Initial checkin
  41. }
  42. {
  43. { Rev 1.0 2004.01.22 8:18:34 PM czhower
  44. { Initial checkin
  45. }
  46. unit PackageCore;
  47. interface
  48. uses
  49. Package;
  50. type
  51. TPackageCore = class(TPackage)
  52. public
  53. procedure Generate(ACompiler: TCompiler); override;
  54. procedure GenerateDT(ACompiler: TCompiler); override;
  55. end;
  56. implementation
  57. uses
  58. Dialogs, DModule;
  59. { TPackageCore }
  60. procedure TPackageCore.Generate(ACompiler: TCompiler);
  61. begin
  62. inherited;
  63. FName := 'IndyCore' + GCompilerID[Compiler];
  64. FDesc := 'Core';
  65. GenHeader;
  66. GenOptions;
  67. Code('');
  68. Code('requires');
  69. if ACompiler in DelphiNet then begin
  70. Code('Borland.Delphi,');
  71. Code('Borland.VclRtl,');
  72. end
  73. else if ACompiler = ctDelphi5 then begin
  74. Code(' Vcl50,');
  75. end else begin
  76. Code(' rtl,');
  77. end;
  78. Code(' IndySystem' + GCompilerID[Compiler] + ';');
  79. GenContains;
  80. //back door for embedding version information into an assembly
  81. //without having to do anything to the package directly.
  82. if Compiler in DelphiNet then
  83. begin
  84. Code('{$I IdCore90ASM90.inc}');
  85. end;
  86. WriteFile(DM.OutputPath + '\Lib\Core\');
  87. end;
  88. procedure TPackageCore.GenerateDT(ACompiler: TCompiler);
  89. begin
  90. inherited;
  91. FName := 'dclIndyCore' + GCompilerID[Compiler];
  92. FDesc := 'Core Design Time';
  93. GenHeader;
  94. GenOptions(True);
  95. Code('');
  96. Code('requires');
  97. if ACompiler = ctDelphi5 then begin
  98. Code(' Vcl50,');
  99. end else if ACompiler in [ctDelphi6, ctDelphi7] then begin
  100. Code(' vcl,');
  101. end;
  102. if ACompiler in DelphiNet then
  103. begin
  104. Code(' System.Windows.Forms,');
  105. Code(' Borland.Studio.Vcl.Design,');
  106. end
  107. else if ACompiler <> ctDelphi5 then
  108. begin
  109. Code(' designide,');
  110. end;
  111. Code(' IndySystem' + GCompilerID[Compiler] + ',');
  112. Code(' IndyCore' + GCompilerID[Compiler] + ';');
  113. GenContains;
  114. //back door for embedding version information into an assembly
  115. //without having to do anything to the package directly.
  116. if Compiler in DelphiNet then
  117. begin
  118. Code('{$I IddclCore90ASM90.inc}');
  119. end;
  120. WriteFile(DM.OutputPath + '\Lib\Core\');
  121. end;
  122. end.