version.pas 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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 = '3';
  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 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 cpux86_64}
  46. source_cpu_string = 'x86_64';
  47. {$endif cpux86_64}
  48. {$ifdef cpusparc}
  49. source_cpu_string = 'sparc';
  50. {$endif cpusparc}
  51. {$ifdef cpusparc64}
  52. source_cpu_string = 'sparc64';
  53. {$endif cpusparc64}
  54. {$ifdef cpuarm}
  55. source_cpu_string = 'arm';
  56. {$endif cpuarm}
  57. {$ifdef cpumipseb}
  58. source_cpu_string = 'mips'{'mipseb'};
  59. {$endif cpumipseb}
  60. {$ifdef cpumipsel}
  61. source_cpu_string = 'mipsel';
  62. {$endif cpumipsel}
  63. {$ifdef cpuaarch64}
  64. source_cpu_string = 'aarch64';
  65. {$endif cpuaarch64}
  66. {$ifdef cpuriscv64}
  67. source_cpu_string = 'riscv64';
  68. {$endif cpuriscv64}
  69. {$ifdef cpuriscv32}
  70. source_cpu_string = 'riscv32';
  71. {$endif cpuriscv32}
  72. function version_string:string;
  73. function full_version_string:string;
  74. implementation
  75. function version_string:string;
  76. begin
  77. version_string := version_nr+'.'+release_nr+'.'+patch_nr;
  78. end;
  79. function full_version_string:string;
  80. begin
  81. full_version_string := version_nr+'.'+release_nr+'.'+patch_nr+minorpatch
  82. {$ifdef REVINC}
  83. +'-r'+{$i revision.inc}
  84. {$endif REVINC}
  85. ;
  86. end;
  87. end.