PackageSystem.pas 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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.4 3/3/2005 7:46:24 PM JPMugaas
  18. { Backdoors for BDS assembly version information.
  19. }
  20. {
  21. { Rev 1.3 04/09/2004 12:45:16 ANeillans
  22. { Moved the databasename and output paths into a globally accessible variable
  23. { -- makes it a lot easier to override if you need to (as I did for my local
  24. { file structure).
  25. }
  26. {
  27. { Rev 1.2 2004.06.13 8:06:12 PM czhower
  28. { Update for D8
  29. }
  30. {
  31. { Rev 1.1 02/06/2004 17:00:48 HHariri
  32. { design-time added
  33. }
  34. {
  35. { Rev 1.0 2004.02.08 2:28:40 PM czhower
  36. { Initial checkin
  37. }
  38. {
  39. { Rev 1.0 2004.01.22 8:18:34 PM czhower
  40. { Initial checkin
  41. }
  42. unit PackageSystem;
  43. interface
  44. uses
  45. Package;
  46. type
  47. TPackageSystem = class(TPackage)
  48. public
  49. procedure Generate(ACompiler: TCompiler); override;
  50. end;
  51. implementation
  52. uses
  53. DModule;
  54. { TPackageD7Core }
  55. procedure TPackageSystem.Generate(ACompiler: TCompiler);
  56. begin
  57. inherited;
  58. FName := 'IndySystem' + GCompilerID[Compiler];
  59. FDesc := 'System';
  60. GenHeader;
  61. GenOptions;
  62. Code('');
  63. Code('requires');
  64. if ACompiler in DelphiNet then begin
  65. Code(' Borland.Delphi,');
  66. Code(' Borland.VclRtl;');
  67. end
  68. else if ACompiler = ctDelphi5 then begin
  69. Code(' Vcl50;');
  70. end else
  71. begin
  72. Code(' rtl;');
  73. end;
  74. GenContains;
  75. if ACompiler in DelphiNet then
  76. begin
  77. //back door for embedding version information into an assembly
  78. //without having to do anything to the package directly.
  79. Code('{$I IdSystem90ASM90.inc}');
  80. end;
  81. WriteFile(DM.OutputPath + '\Lib\System\');
  82. end;
  83. end.