version.pas 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. {
  2. Copyright (c) 1998-2002 by Florian Klaempfl
  3. Version/target constants
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15. ****************************************************************************
  16. }
  17. unit version;
  18. {$i fpcdefs.inc}
  19. interface
  20. const
  21. { version string }
  22. version_nr = '3';
  23. release_nr = '0';
  24. patch_nr = '2';
  25. minorpatch = '';
  26. { word version for ppu file }
  27. wordversion = ((ord(version_nr)-ord('0')) shl 14)+
  28. ((ord(release_nr)-ord('0')) shl 7)+
  29. (ord(patch_nr)-ord('0'));
  30. { date string }
  31. date_string = {$I %DATE%};
  32. { source cpu string }
  33. {$ifdef cpui386}
  34. source_cpu_string = 'i386';
  35. {$endif cpui386}
  36. {$ifdef cpupowerpc32}
  37. source_cpu_string = 'powerpc';
  38. {$endif cpupowerpc32}
  39. {$ifdef cpupowerpc64}
  40. source_cpu_string = 'powerpc64';
  41. {$endif cpupowerpc64}
  42. {$ifdef cpum68k}
  43. source_cpu_string = 'm68k';
  44. {$endif cpum68k}
  45. {$ifdef cpuia64}
  46. source_cpu_string = 'ia64';
  47. {$endif cpuia64}
  48. {$ifdef cpux86_64}
  49. source_cpu_string = 'x86_64';
  50. {$endif cpux86_64}
  51. {$ifdef cpusparc}
  52. source_cpu_string = 'sparc';
  53. {$endif cpusparc}
  54. {$ifdef cpusalpha}
  55. source_cpu_string = 'alpha';
  56. {$endif cpualpha}
  57. {$ifdef cpuvis}
  58. source_cpu_string = 'vis';
  59. {$endif cpuvis}
  60. {$ifdef cpuarm}
  61. source_cpu_string = 'arm';
  62. {$endif cpuarm}
  63. {$ifdef cpumipseb}
  64. source_cpu_string = 'mips'{'mipseb'};
  65. {$endif cpumipseb}
  66. {$ifdef cpumipsel}
  67. source_cpu_string = 'mipsel';
  68. {$endif cpumipsel}
  69. function version_string:string;
  70. function full_version_string:string;
  71. implementation
  72. function version_string:string;
  73. begin
  74. version_string := version_nr+'.'+release_nr+'.'+patch_nr;
  75. end;
  76. function full_version_string:string;
  77. begin
  78. full_version_string := version_nr+'.'+release_nr+'.'+patch_nr+minorpatch
  79. {$ifdef REVINC}
  80. +'-r'+{$i revision.inc}
  81. {$endif REVINC}
  82. ;
  83. end;
  84. end.