version.pas 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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 = '2';
  23. release_nr = '1';
  24. patch_nr = '1';
  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 cpu86}
  34. source_cpu_string = 'i386';
  35. {$endif cpu86}
  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. function version_string:string;
  64. function full_version_string:string;
  65. implementation
  66. function version_string:string;
  67. begin
  68. version_string := version_nr+'.'+release_nr+'.'+patch_nr;
  69. end;
  70. function full_version_string:string;
  71. begin
  72. full_version_string := version_nr+'.'+release_nr+'.'+patch_nr+minorpatch;
  73. end;
  74. end.