Skip to content
Browse files

documentation update

  • Loading branch information...
Arnaud Bouchez
Arnaud Bouchez committed Sep 9, 2019
1 parent 66f9926 commit 2685c4b3635cae0df7c333afa7951530a54f923f
Showing with 6 additions and 5 deletions.
  1. +5 −4 SynCommons.pas
  2. +1 −1
// - e.g. 'myprogram.exe 2016-06-14 19:07:55'
function VersionInfo: RawUTF8;
/// returns a ready-to-use User-Agent header with exe name, version and OS
// - e.g. 'myprogram/'
// - e.g. 'myprogram/' for myprogram running on Win32
// - here OS_INITIAL[] character is used to identify the OS, with '32'
// appended on 32-bit Windows
// appended on Win32 only (e.g. 'myprogram/', is for Win64)
function UserAgent: RawUTF8;
/// returns the version information of a specified exe file as text
// - includes FileName (without path), Detailed and BuildDateTime properties
wSeven, wServer2008_R2, wEight, wServer2012, wEightOne, wServer2012R2,
wTen, wServer2016];
/// translate one operating system (and distribution) into a single character
// - may be used internally e.g. for a HTTP User-Agent header
// - may be used internally e.g. for a HTTP User-Agent header, as with
// TFileVersion.UserAgent
OS_INITIAL: array[TOperatingSystem] of AnsiChar =
('?', 'W', 'L', 'X', 'B', 'P', 'A', 'a', 'D', 'F', 'G', 'K', 'M', 'm',
'n', 'N', 'U', 'S', 's', 'u', 'Y', 'T', 'C', 't', 'R', 'l', 'O', 'G',
{$ifdef MSWINDOWS}
if OSVersion in WINDOWS_32 then
result := result+'32';
{$endif MSWINDOWS}

class function TFileVersion.GetVersionInfo(const aFileName: TFileName): RawUTF8;
@@ -1 +1 @@

0 comments on commit 2685c4b

Please sign in to comment.
You can’t perform that action at this time.