program Triangle;

{$mode objfpc}{$H+}

uses
  {$IFDEF UNIX}
    {$IFDEF UseCThreads}
      cthreads,
    {$ENDIF}
  {$ENDIF}
  dialogs,
  InterfaceBase,
  Interfaces,                    // this includes the LCL widgetset
  Forms, printer4lazarus,
  Tri
  { you can add units after this };

{$R *.res}

var S : String;
    P : byte;

function OSVersion: String;
begin
  Result:={$I %FPCTARGETOS%}+'-'+{$I %FPCTARGETCPU%}+' ('+WidgetSet.ClassName+')';
end;

begin
  RequireDerivedFormResource:=True;
  Application.Initialize;
  Application.CreateForm(TTriangleSolution, TriangleSolution);
  S := OSVersion;
  p := pos('32',S);
  Application.Run

{
  if (p>0) and (p<12) then
    begin
      ShowMessage('This program is compiled for 32bit but should be OK on 64bit as well.');
      Application.Run
    end
  else
    begin
      ShowMessage('Sorry - This program is 64bit but your system is 32bit.');
      Application.Terminate;
    end;
}
end.

