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/daemon/lazdaemon.lpk 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/fpcunit/Makefile svneol=native#text/plain
components/fpcunit/Makefile.fpc svneol=native#text/plain

View File

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

View File

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