2012-03-16 11:32:18 +00:00
|
|
|
program GBrowser;
|
|
|
|
|
|
|
|
uses
|
|
|
|
{$IFDEF LCL}
|
|
|
|
Interfaces,
|
|
|
|
{$IFDEF MSWINDOWS}
|
|
|
|
Math,
|
|
|
|
{$ENDIF}
|
|
|
|
{$ENDIF}
|
2012-03-19 15:45:09 +00:00
|
|
|
sysutils,
|
2012-03-16 11:32:18 +00:00
|
|
|
Forms,
|
2012-03-19 15:45:09 +00:00
|
|
|
GeckoInit,
|
2012-03-19 13:33:52 +00:00
|
|
|
gec10 in 'gec10.pas';
|
2012-03-16 11:32:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
begin
|
|
|
|
{$IFDEF FPC}
|
|
|
|
{$IFDEF MSWINDOWS}
|
|
|
|
//For now - disable all floating point exceptions or XULRUNNER will crash.
|
|
|
|
SetExceptionMask([exInvalidOp,exDenormalized,exZeroDivide,exOverflow,exUnderflow,exPrecision]);
|
|
|
|
{$ENDIF}
|
|
|
|
{$ENDIF}
|
|
|
|
|
|
|
|
Application.Initialize;
|
2012-03-19 15:45:09 +00:00
|
|
|
try
|
|
|
|
GeckoComponentsStartup(ParamStr(1));
|
|
|
|
except
|
|
|
|
on E: Exception do
|
|
|
|
raise Exception.CreateFmt('Failed to initialize xulrunner. Try to pass the complete filename ' +
|
|
|
|
'of the libxpcom library (including the path) as first parameter to ' +
|
|
|
|
'the command line. Original error message: %s', [E.Message]);
|
|
|
|
end;
|
|
|
|
try
|
|
|
|
Application.CreateForm(TForm1, Form1);
|
|
|
|
Application.Run;
|
|
|
|
finally
|
|
|
|
GeckoComponentsShutdown;
|
|
|
|
end;
|
2012-03-16 11:32:18 +00:00
|
|
|
end.
|