Browse Source

* Removed debug define, removed stray flush() statement

git-svn-id: trunk@17557 -
michael 14 years ago
parent
commit
97012c377f
2 changed files with 11 additions and 9 deletions
  1. 11 8
      packages/fcl-extra/src/daemonapp.pp
  2. 0 1
      packages/fcl-extra/src/win/daemonapp.inc

+ 11 - 8
packages/fcl-extra/src/daemonapp.pp

@@ -19,14 +19,14 @@ interface
 
 uses
   Custapp, Classes, SysUtils, eventlog, rtlconsts;
-  
+
 Type
   TCustomDaemon = Class;
   TDaemonController = Class;
 
   TDaemonEvent = procedure(Sender: TCustomDaemon) of object;
   TDaemonOKEvent = procedure(Sender: TCustomDaemon; var OK: Boolean) of object;
-  
+
   TDaemonOption = (doAllowStop,doAllowPause,doInteractive);
   TDaemonOptions = Set of TDaemonOption;
 
@@ -412,7 +412,7 @@ Resourcestring
   SHelpUnInstall                = 'To uninstall the service';
   SHelpRun                      = 'To run the service';
 
-{$define svcdebug}
+{ $define svcdebug}
 
 {$ifdef svcdebug}
 Procedure DebugLog(Msg : String);
@@ -852,11 +852,14 @@ end;
 
 procedure TCustomDaemonApplication.ShowHelp;
 begin
-  writeln(Format(SHelpUsage,[ParamStr(0)]));
-  writeln(SHelpCommand);
-  writeln('  -i --install   '+SHelpInstall);
-  writeln('  -u --uninstall '+SHelpUnInstall);
-  writeln('  -r --run       '+SHelpRun);
+  if IsConsole then
+    begin
+    writeln(Format(SHelpUsage,[ParamStr(0)]));
+    writeln(SHelpCommand);
+    writeln('  -i --install   '+SHelpInstall);
+    writeln('  -u --uninstall '+SHelpUnInstall);
+    writeln('  -r --run       '+SHelpRun);
+	end
 end;
 
 procedure TCustomDaemonApplication.CreateForm(InstanceClass: TComponentClass;

+ 0 - 1
packages/fcl-extra/src/win/daemonapp.inc

@@ -237,7 +237,6 @@ begin
     PDeps:=GetDependencies(Dependencies);
     end;
   Try
-    flush(output);
     SV:=CreateService(SM, PChar(N), PChar(DN), SERVICE_ALL_ACCESS, ST, STT, ES,
                       PChar(E), PChar(LG), PIDTag, PDeps, PN, PP);
     If (SV=0) then