diff --git a/components/tvplanit/examples/fulldemo/demomain.pas b/components/tvplanit/examples/fulldemo/demomain.pas
index c9cbce209..26866e1b4 100644
--- a/components/tvplanit/examples/fulldemo/demomain.pas
+++ b/components/tvplanit/examples/fulldemo/demomain.pas
@@ -450,6 +450,8 @@ begin
if Resources.Count > 0 then
Resource := Resources.Items[Resources.Count-1];
end;
+
+ Caption := Application.Title;
end;
procedure TMainForm.MnuAboutClick(Sender: TObject);
diff --git a/components/tvplanit/examples/fulldemo/mormotdatamodule.pas b/components/tvplanit/examples/fulldemo/mormotdatamodule.pas
index f3e816e41..d535a6e69 100644
--- a/components/tvplanit/examples/fulldemo/mormotdatamodule.pas
+++ b/components/tvplanit/examples/fulldemo/mormotdatamodule.pas
@@ -15,6 +15,8 @@ type
Timer1: TTimer;
procedure Timer1Timer(Sender: TObject);
private
+ FNoServer: Boolean;
+ procedure ReadCmdLine;
public
Datastore: TVpmORMotDatastore;
constructor Create(AOwner: TComponent); override;
@@ -31,6 +33,8 @@ constructor TDemoDM.Create(AOwner: TComponent);
begin
inherited;
+ ReadCmdLine;
+
Datastore := TVpmORMotDatastore.Create(self);
with Datastore do
@@ -38,11 +42,13 @@ begin
// if the HostIP is set, it will look for a running server on this IP address when connecting.
// leave blank (comment out) for a local (and private) database
- HostIP := 'localhost';
+ if FNoServer then
+ HostIP := '' else
+ HostIP := 'localhost';
Directory := 'data';
Connected := true;
- if (Length(HostIP)>0) and (not Connected) then
+ if (Length(HostIP) > 0) and (not Connected) then
begin
MessageDlg('Cannot connect with server', mtError, [mbOk], 0);
Application.Terminate;
@@ -52,6 +58,21 @@ begin
Timer1.Enabled := true;
end;
+procedure TDemoDM.ReadCmdLine;
+var
+ s: String;
+ i: Integer;
+begin
+ for i:=1 to ParamCount do begin
+ s := lowercase(ParamStr(i));
+ if (s[1] = '-') or (s[1] = '/') then begin
+ Delete(s, 1, 1);
+ if s = 'noserver' then
+ FNoServer := true;
+ end;
+ end;
+end;
+
procedure TDemoDM.Timer1Timer(Sender: TObject);
begin
Timer1.Enabled := False;
diff --git a/components/tvplanit/examples/fulldemo/mormotdemo.lpi b/components/tvplanit/examples/fulldemo/mormotdemo.lpi
index 6eb07818f..1a7e52a8c 100644
--- a/components/tvplanit/examples/fulldemo/mormotdemo.lpi
+++ b/components/tvplanit/examples/fulldemo/mormotdemo.lpi
@@ -6,7 +6,7 @@
-
+
@@ -26,6 +26,7 @@
+
diff --git a/components/tvplanit/examples/fulldemo/mormotdemo.lpr b/components/tvplanit/examples/fulldemo/mormotdemo.lpr
index 007546a07..f7dcc631c 100644
--- a/components/tvplanit/examples/fulldemo/mormotdemo.lpr
+++ b/components/tvplanit/examples/fulldemo/mormotdemo.lpr
@@ -1,5 +1,8 @@
program mormotdemo;
+{ commandline parameters:
+ -noserver ---> run without server, otherwise HostIP is localhost }
+
{$mode objfpc}{$H+}
uses
@@ -13,7 +16,7 @@ uses
{$R *.res}
begin
- Application.Title := 'mORMot Demo';
+ Application.Title := 'TurboPower VisualPlanIt & mORMot Demo';
RequireDerivedFormResource := True;
Application.Initialize;
Application.CreateForm(TDemoDM, DemoDM);
diff --git a/components/tvplanit/source/addons/zeos/laz_visualplanit_zeos.lpk b/components/tvplanit/source/addons/zeos/laz_visualplanit_zeos.lpk
index 0cecc23c6..227b7d042 100644
--- a/components/tvplanit/source/addons/zeos/laz_visualplanit_zeos.lpk
+++ b/components/tvplanit/source/addons/zeos/laz_visualplanit_zeos.lpk
@@ -15,7 +15,7 @@
-
+
diff --git a/components/tvplanit/source/laz_visualplanit.lpk b/components/tvplanit/source/laz_visualplanit.lpk
index 80ef0e7fc..52941ede7 100644
--- a/components/tvplanit/source/laz_visualplanit.lpk
+++ b/components/tvplanit/source/laz_visualplanit.lpk
@@ -35,7 +35,7 @@ The Initial Developer of the Original Code is TurboPower Software.
Portions created by TurboPower Software Inc. are Copyright (C) 2002 TurboPower Software Inc. All Rights Reserved.
Contributor(s): "/>
-
+