diff options
author | michael <michael@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2011-05-25 19:42:50 +0000 |
---|---|---|
committer | michael <michael@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2011-05-25 19:42:50 +0000 |
commit | b8fa1ba6dd2b16dcda1c36fafdc89d5a8546f393 (patch) | |
tree | 6524352bf87d415fc7d36d57c2a40b6559f027aa /packages/fcl-extra | |
parent | a100e545c3076c4d127c10ac95055b36497553ed (diff) | |
download | fpc-b8fa1ba6dd2b16dcda1c36fafdc89d5a8546f393.tar.gz |
* Removed debug define, removed stray flush() statement
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@17557 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages/fcl-extra')
-rw-r--r-- | packages/fcl-extra/src/daemonapp.pp | 19 | ||||
-rw-r--r-- | packages/fcl-extra/src/win/daemonapp.inc | 1 |
2 files changed, 11 insertions, 9 deletions
diff --git a/packages/fcl-extra/src/daemonapp.pp b/packages/fcl-extra/src/daemonapp.pp index 65cf4eba8c..51250a2609 100644 --- a/packages/fcl-extra/src/daemonapp.pp +++ b/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; diff --git a/packages/fcl-extra/src/win/daemonapp.inc b/packages/fcl-extra/src/win/daemonapp.inc index 35d4874a6c..37618bb62b 100644 --- a/packages/fcl-extra/src/win/daemonapp.inc +++ b/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 |