diff --git a/.gitattributes b/.gitattributes
index 21e9f0753c..a67c6a158e 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -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
diff --git a/components/daemon/lazdaemon.lpk b/components/daemon/lazdaemon.lpk
index ef4985dba4..7791af13f3 100644
--- a/components/daemon/lazdaemon.lpk
+++ b/components/daemon/lazdaemon.lpk
@@ -17,12 +17,10 @@
-
-
+
+
-
+
@@ -33,6 +31,9 @@
+
+
+
diff --git a/components/daemon/lazdaemon.pas b/components/daemon/lazdaemon.pas
index a912e12808..129579e9c5 100644
--- a/components/daemon/lazdaemon.pas
+++ b/components/daemon/lazdaemon.pas
@@ -7,7 +7,7 @@ unit lazdaemon;
interface
uses
- reglazdaemon, daemonapp, LazarusPackageIntf;
+ reglazdaemon, daemonapp, lazdaemonapp, LazarusPackageIntf;
implementation
diff --git a/components/daemon/lazdaemonapp.pp b/components/daemon/lazdaemonapp.pp
new file mode 100644
index 0000000000..7f8807f137
--- /dev/null
+++ b/components/daemon/lazdaemonapp.pp
@@ -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.
diff --git a/components/daemon/reglazdaemon.pp b/components/daemon/reglazdaemon.pp
index 3ab247a916..029c32a811 100644
--- a/components/daemon/reglazdaemon.pp
+++ b/components/daemon/reglazdaemon.pp
@@ -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('');