tvplanit: Increment package version number to 1.05. Check commandline of mormot full demo for option -noserver to run the demo without the RESTserver.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5124 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-09-02 20:01:44 +00:00
parent 395e3f20ed
commit dfe9715d19
6 changed files with 33 additions and 6 deletions

View File

@ -450,6 +450,8 @@ begin
if Resources.Count > 0 then if Resources.Count > 0 then
Resource := Resources.Items[Resources.Count-1]; Resource := Resources.Items[Resources.Count-1];
end; end;
Caption := Application.Title;
end; end;
procedure TMainForm.MnuAboutClick(Sender: TObject); procedure TMainForm.MnuAboutClick(Sender: TObject);

View File

@ -15,6 +15,8 @@ type
Timer1: TTimer; Timer1: TTimer;
procedure Timer1Timer(Sender: TObject); procedure Timer1Timer(Sender: TObject);
private private
FNoServer: Boolean;
procedure ReadCmdLine;
public public
Datastore: TVpmORMotDatastore; Datastore: TVpmORMotDatastore;
constructor Create(AOwner: TComponent); override; constructor Create(AOwner: TComponent); override;
@ -31,6 +33,8 @@ constructor TDemoDM.Create(AOwner: TComponent);
begin begin
inherited; inherited;
ReadCmdLine;
Datastore := TVpmORMotDatastore.Create(self); Datastore := TVpmORMotDatastore.Create(self);
with Datastore do 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. // 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 // leave blank (comment out) for a local (and private) database
HostIP := 'localhost'; if FNoServer then
HostIP := '' else
HostIP := 'localhost';
Directory := 'data'; Directory := 'data';
Connected := true; Connected := true;
if (Length(HostIP)>0) and (not Connected) then if (Length(HostIP) > 0) and (not Connected) then
begin begin
MessageDlg('Cannot connect with server', mtError, [mbOk], 0); MessageDlg('Cannot connect with server', mtError, [mbOk], 0);
Application.Terminate; Application.Terminate;
@ -52,6 +58,21 @@ begin
Timer1.Enabled := true; Timer1.Enabled := true;
end; 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); procedure TDemoDM.Timer1Timer(Sender: TObject);
begin begin
Timer1.Enabled := False; Timer1.Enabled := False;

View File

@ -6,7 +6,7 @@
<General> <General>
<SessionStorage Value="InProjectDir"/> <SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/> <MainUnit Value="0"/>
<Title Value="mORMot Demo"/> <Title Value="TurboPower VisualPlanIt &amp; mORMot Demo"/>
<ResourceType Value="res"/> <ResourceType Value="res"/>
<UseXPManifest Value="True"/> <UseXPManifest Value="True"/>
</General> </General>
@ -26,6 +26,7 @@
<RunParams> <RunParams>
<local> <local>
<FormatVersion Value="1"/> <FormatVersion Value="1"/>
<CommandLineParams Value="-noserver"/>
</local> </local>
</RunParams> </RunParams>
<RequiredPackages Count="3"> <RequiredPackages Count="3">

View File

@ -1,5 +1,8 @@
program mormotdemo; program mormotdemo;
{ commandline parameters:
-noserver ---> run without server, otherwise HostIP is localhost }
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
uses uses
@ -13,7 +16,7 @@ uses
{$R *.res} {$R *.res}
begin begin
Application.Title := 'mORMot Demo'; Application.Title := 'TurboPower VisualPlanIt & mORMot Demo';
RequireDerivedFormResource := True; RequireDerivedFormResource := True;
Application.Initialize; Application.Initialize;
Application.CreateForm(TDemoDM, DemoDM); Application.CreateForm(TDemoDM, DemoDM);

View File

@ -15,7 +15,7 @@
</SearchPaths> </SearchPaths>
</CompilerOptions> </CompilerOptions>
<Description Value="Visual PlanIt datastore for ZEOS database components"/> <Description Value="Visual PlanIt datastore for ZEOS database components"/>
<Version Major="1" Release="4"/> <Version Major="1" Release="5"/>
<Files Count="2"> <Files Count="2">
<Item1> <Item1>
<Filename Value="vpregzeos.pas"/> <Filename Value="vpregzeos.pas"/>

View File

@ -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. Portions created by TurboPower Software Inc. are Copyright (C) 2002 TurboPower Software Inc. All Rights Reserved.
Contributor(s): "/> Contributor(s): "/>
<Version Major="1" Release="4"/> <Version Major="1" Release="5"/>
<Files Count="78"> <Files Count="78">
<Item1> <Item1>
<Filename Value="vpalarmdlg.lfm"/> <Filename Value="vpalarmdlg.lfm"/>