Skip to content

Commit

Permalink
include the OS information in daemon /version output
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnaud Bouchez committed Oct 25, 2022
1 parent 37f3205 commit 7191d4b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/app/mormot.app.daemon.pas
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,7 @@ procedure TSynDaemon.Command(cmd: TExecuteCommandLineCmd; aAutoStart: boolean;
#13#10' Build date: ', Executable.Version.BuildDateTimeString,
#13#10' MD5: ', Md5(exe),
#13#10' SHA256: ', Sha256(exe));
writeln(' OS: ', OSVersionText);
if Executable.Version.Version32 <> 0 then
writeln(' Version: ', Executable.Version.Detailed);
end;
Expand Down Expand Up @@ -492,7 +493,7 @@ procedure TSynDaemon.Command(cmd: TExecuteCommandLineCmd; aAutoStart: boolean;
if ServiceSingleRun then
// blocking until service shutdown
Show(true)
else if GetLastError = 1063 then
else if GetLastError = ERROR_FAILED_SERVICE_CONTROLLER_CONNECT then
Syntax
else
Show(false);
Expand Down
8 changes: 6 additions & 2 deletions src/core/mormot.core.os.pas
Original file line number Diff line number Diff line change
Expand Up @@ -818,13 +818,15 @@ function GetDelphiCompilerVersion: RawUtf8; deprecated;
{$ifdef UNICODE}

const
/// a global constant to be appended for Windows Ansi or wide API names
/// a global constant to be appended for Windows Ansi or Wide API names
// - match the Wide API on Delphi, since String=UnicodeString
_AW = 'W';

{$else}

const
/// a global constant to be appended for Windows Ansi or wide API names
/// a global constant to be appended for Windows Ansi or Wide API names
// - match the Ansi API on FPC or oldest Delphi, where String=AnsiString
_AW = 'A';

type
Expand Down Expand Up @@ -3676,6 +3678,8 @@ function RegisterGlobalShutdownRelease(Instance: TObject;
SERVICE_PAUSE_PENDING = $00000006;
SERVICE_PAUSED = $00000007;

ERROR_FAILED_SERVICE_CONTROLLER_CONNECT = 1063;

type
PServiceStatus = ^TServiceStatus;
TServiceStatus = object
Expand Down
2 changes: 1 addition & 1 deletion src/mormot.commit.inc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
'2.0.4229'
'2.0.4230'

0 comments on commit 7191d4b

Please sign in to comment.