program DataSnapVCL;
uses
  Vcl.Forms,
  System.SysUtils,
  CodeSiteLogging,
  MainForm in 'MainForm.pas' {FormMain},
  ServerMethodsUnit1 in 'ServerMethodsUnit1.pas' {MyServerMethods: TDSServerModule},
  ServerContainerUnit1 in 'ServerContainerUnit1.pas' {ServerContainer1: TDataModule},
  LogFilter in 'LogFilter\LogFilter.pas';

{$R *.res}


{$IFDEF DEBUG}
var
  Destination: TCodeSiteDestination;
{$ENDIF}
begin
  Application.Initialize;
  Application.MainFormOnTaskbar := True;
  {$IFDEF DEBUG}
  CodeSite.Enabled := True;
  CodeSite.Enabled := CodeSite.Installed;
  if CodeSite.Enabled then
  begin
    Destination := TCodeSiteDestination.Create(Application);
    Destination.LogFile.Active := True;
    Destination.LogFile.FileName :=
      ChangeFileExt(ExtractFileName(Application.ExeName), '.csl');
    Destination.LogFile.FilePath := '$(MyDocs)\My CodeSite Files\Logs\';
    Destination.Viewer.Active := True; // also show Live Viewer
    CodeSite.Destination := Destination;
    CodeSite.Clear
  end;
  {$ELSE}
  CodeSite.Enabled := False;
  {$ENDIF}
  Application.CreateForm(TFormMain, FormMain);
  Application.CreateForm(TServerContainer1, ServerContainer1);
  Application.Run;
end.

