lazdaemon: added lazdaemonapp.pp from Michael V.C.

git-svn-id: trunk@10578 -
This commit is contained in:
mattias 2007-02-05 09:57:56 +00:00
parent b40adae3c8
commit 2e4c1f5989
5 changed files with 54 additions and 15 deletions

1
.gitattributes vendored
View File

@ -151,6 +151,7 @@ components/customform/lazcustforms.lpk svneol=native#text/plain
components/customform/lazcustforms.pas svneol=native#text/plain components/customform/lazcustforms.pas svneol=native#text/plain
components/daemon/lazdaemon.lpk svneol=native#text/plain components/daemon/lazdaemon.lpk svneol=native#text/plain
components/daemon/lazdaemon.pas svneol=native#text/plain components/daemon/lazdaemon.pas svneol=native#text/plain
components/daemon/lazdaemonapp.pp svneol=native#text/plain
components/daemon/reglazdaemon.pp svneol=native#text/plain components/daemon/reglazdaemon.pp svneol=native#text/plain
components/fpcunit/Makefile svneol=native#text/plain components/fpcunit/Makefile svneol=native#text/plain
components/fpcunit/Makefile.fpc svneol=native#text/plain components/fpcunit/Makefile.fpc svneol=native#text/plain

View File

@ -17,12 +17,10 @@
<CompilerPath Value="$(CompPath)"/> <CompilerPath Value="$(CompPath)"/>
</Other> </Other>
</CompilerOptions> </CompilerOptions>
<Description Value="Lazarus Service (Daemon) Support <Description Value="Lazarus Service (Daemon) Support"/>
"/> <License Value="Modified LGPL as in FCL or RTL"/>
<License Value="Modified LGPL as in FCL or RTL
"/>
<Version Minor="9" Release="9"/> <Version Minor="9" Release="9"/>
<Files Count="2"> <Files Count="3">
<Item1> <Item1>
<Filename Value="reglazdaemon.pp"/> <Filename Value="reglazdaemon.pp"/>
<HasRegisterProc Value="True"/> <HasRegisterProc Value="True"/>
@ -33,6 +31,9 @@
<Type Value="Virtual Unit"/> <Type Value="Virtual Unit"/>
<UnitName Value="daemonapp"/> <UnitName Value="daemonapp"/>
</Item2> </Item2>
<Item3>
<Filename Value="lazdaemonapp.pp"/>
</Item3>
</Files> </Files>
<Type Value="DesignTime"/> <Type Value="DesignTime"/>
<RequiredPkgs Count="3"> <RequiredPkgs Count="3">

View File

@ -7,7 +7,7 @@ unit lazdaemon;
interface interface
uses uses
reglazdaemon, daemonapp, LazarusPackageIntf; reglazdaemon, daemonapp, lazdaemonapp, LazarusPackageIntf;
implementation implementation

View File

@ -0,0 +1,37 @@
{
*****************************************************************************
* *
* See the file COPYING.modifiedLGPL, included in this distribution, *
* for details about the copyright. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* *
*****************************************************************************
}
unit lazdaemonapp;
interface
uses daemonapp;
Type
TLazDaemonApplication = Class(TCustomDaemonApplication)
Procedure CreateDaemonInstance(Var ADaemon : TCustomDaemon; DaemonDef : TDaemonDef); override;
end;
implementation
uses classes,lresources;
Procedure TLazDaemonApplication.CreateDaemonInstance(Var ADaemon : TCustomDaemon; DaemonDef : TDaemonDef);
begin
ADaemon:=DaemonDef.DaemonClass.Create(Self);
end;
Initialization
RegisterInitComponentHandler(TComponent,@InitLazResourceComponent);
RegisterDaemonApplicationClass(TLazDaemonApplication)
end.

View File

@ -10,17 +10,19 @@
* * * *
***************************************************************************** *****************************************************************************
} }
unit RegLazDaemon; unit reglazdaemon;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses uses
Classes, SysUtils, FormEditingIntf, ProjectIntf, NewItemIntf, LazIDEIntf, Classes, SysUtils, FormEditingIntf, projectintf,newitemintf, lazideintf,
Controls, Forms; controls, forms;
type Type
{ TDaemonFileDescriptor }
{ TDaemonMapperDescriptor } { TDaemonMapperDescriptor }
@ -33,9 +35,6 @@ type
function GetImplementationSource(const Filename, SourceName, ResourceName: string): string; override; function GetImplementationSource(const Filename, SourceName, ResourceName: string): string; override;
end; end;
{ TDaemonFileDescriptor }
TDaemonFileDescriptor = Class(TFileDescPascalUnitWithResource) TDaemonFileDescriptor = Class(TFileDescPascalUnitWithResource)
Public Public
Constructor Create; override; Constructor Create; override;
@ -45,7 +44,6 @@ type
function GetImplementationSource(const Filename, SourceName, ResourceName: string): string; override; function GetImplementationSource(const Filename, SourceName, ResourceName: string): string; override;
end; end;
{ TDaemonProjectDescriptor } { TDaemonProjectDescriptor }
TDaemonProjectDescriptor = class(TProjectDescriptor) TDaemonProjectDescriptor = class(TProjectDescriptor)
@ -83,6 +81,7 @@ begin
RegisterProjectFileDescriptor(TDaemonFileDescriptor.Create,SDaemonApps); RegisterProjectFileDescriptor(TDaemonFileDescriptor.Create,SDaemonApps);
RegisterProjectFileDescriptor(TDaemonMapperDescriptor.Create,SDaemonApps); RegisterProjectFileDescriptor(TDaemonMapperDescriptor.Create,SDaemonApps);
FormEditingHook.RegisterDesignerBaseClass(TDaemonMapper); FormEditingHook.RegisterDesignerBaseClass(TDaemonMapper);
FormEditingHook.RegisterDesignerBaseClass(TDaemon);
end; end;
@ -186,7 +185,8 @@ begin
Add('Uses'); Add('Uses');
Add('{$IFDEF UNIX}{$IFDEF UseCThreads}'); Add('{$IFDEF UNIX}{$IFDEF UseCThreads}');
Add(' cthreads,'); Add(' cthreads,');
Add(' {$ENDIF}{$ENDIF}'); Add('{$ENDIF}{$ENDIF}');
Add(' lazdaemon,');
Add(' daemonapp'); Add(' daemonapp');
Add(' { add your units here };'); Add(' { add your units here };');
Add(''); Add('');