mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-24 23:51:54 +02:00
lazdaemon: added lazdaemonapp.pp from Michael V.C.
git-svn-id: trunk@10578 -
This commit is contained in:
parent
b40adae3c8
commit
2e4c1f5989
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -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
|
||||||
|
|||||||
@ -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">
|
||||||
|
|||||||
@ -7,7 +7,7 @@ unit lazdaemon;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
reglazdaemon, daemonapp, LazarusPackageIntf;
|
reglazdaemon, daemonapp, lazdaemonapp, LazarusPackageIntf;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
|||||||
37
components/daemon/lazdaemonapp.pp
Normal file
37
components/daemon/lazdaemonapp.pp
Normal 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.
|
||||||
@ -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('');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user