You've already forked lazarus-ccr
* Fixed compilation on Linux
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1343 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -295,7 +295,6 @@ function NS_CurrentProcessDirectory(buf: PAnsiChar; bufLen: Cardinal): Boolean;
|
|||||||
type
|
type
|
||||||
TAnsiCharArray = array [0..High(Word) div SizeOf(AnsiChar)] of AnsiChar;
|
TAnsiCharArray = array [0..High(Word) div SizeOf(AnsiChar)] of AnsiChar;
|
||||||
TMaxPathChar = array[0..MAX_PATH] of AnsiChar;
|
TMaxPathChar = array[0..MAX_PATH] of AnsiChar;
|
||||||
// HINST = TLibHandle;
|
|
||||||
PDependentLib = ^TDependentLib;
|
PDependentLib = ^TDependentLib;
|
||||||
TDependentLib = record
|
TDependentLib = record
|
||||||
libHandle: HMODULE;
|
libHandle: HMODULE;
|
||||||
@ -325,9 +324,12 @@ procedure ZeroArray(out AArray; const ASize: SizeInt);
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
{$IFDEF MSWINDOWS} Windows, {$ELSE} DynLibs, {$ENDIF} nsError, nsMemory;
|
{$IFDEF MSWINDOWS} Windows, {$ELSE} DynLibs, {$ENDIF} nsError, nsMemory,math;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
{$IFNDEF MSWINDOWS}
|
||||||
|
HINST = TLibHandle;
|
||||||
|
{$ENDIF}
|
||||||
XPCOMExitRoutine = function : Longword; stdcall;
|
XPCOMExitRoutine = function : Longword; stdcall;
|
||||||
|
|
||||||
InitFunc = function(out servMgr: nsIServiceManager; binDir: nsIFile; provider: nsIDirectoryServiceProvider): Longword; cdecl;
|
InitFunc = function(out servMgr: nsIServiceManager; binDir: nsIFile; provider: nsIDirectoryServiceProvider): Longword; cdecl;
|
||||||
@ -887,11 +889,15 @@ function GRE_GetGREPathWithProperties(
|
|||||||
buf: PAnsiChar; buflen: PRUint32): nsresult;
|
buf: PAnsiChar; buflen: PRUint32): nsresult;
|
||||||
var
|
var
|
||||||
env: string;
|
env: string;
|
||||||
|
{$IFDEF MSWINDOWS}
|
||||||
hRegKey: HKEY;
|
hRegKey: HKEY;
|
||||||
|
{$ENDIF}
|
||||||
ok: PRBool;
|
ok: PRBool;
|
||||||
versions: PGREVersionRangeArray;
|
versions: PGREVersionRangeArray;
|
||||||
properties: PGREPropertyArray;
|
properties: PGREPropertyArray;
|
||||||
GeckoVersion: String;
|
GeckoVersion: String;
|
||||||
|
|
||||||
|
{$IFDEF MSWINDOWS}
|
||||||
function GRE_FireFox(): string;
|
function GRE_FireFox(): string;
|
||||||
var
|
var
|
||||||
Reg: TRegistry;
|
Reg: TRegistry;
|
||||||
@ -919,6 +925,8 @@ var
|
|||||||
Reg.CloseKey;
|
Reg.CloseKey;
|
||||||
Reg.Free;
|
Reg.Free;
|
||||||
end;
|
end;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
begin
|
begin
|
||||||
versions := PGREVersionRangeArray(aVersions);
|
versions := PGREVersionRangeArray(aVersions);
|
||||||
properties := PGREPropertyArray(aProperties);
|
properties := PGREPropertyArray(aProperties);
|
||||||
@ -1564,7 +1572,7 @@ var
|
|||||||
proc: Pointer;
|
proc: Pointer;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
module := LoadLibraryA(filename);
|
module := LoadLibrary(filename);
|
||||||
if module=0 then Exit;
|
if module=0 then Exit;
|
||||||
|
|
||||||
proc := GetProcAddress(module, 'NS_GetFrozenFunctions');
|
proc := GetProcAddress(module, 'NS_GetFrozenFunctions');
|
||||||
@ -1573,6 +1581,7 @@ begin
|
|||||||
FreeLibrary(module);
|
FreeLibrary(module);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$IFDEF MSWINDOWS}
|
||||||
function CheckGeckoVersion(path: PAnsiChar; const reqVer: TGREVersion): Boolean;
|
function CheckGeckoVersion(path: PAnsiChar; const reqVer: TGREVersion): Boolean;
|
||||||
const
|
const
|
||||||
BUFSIZE = 4096;
|
BUFSIZE = 4096;
|
||||||
@ -1687,6 +1696,7 @@ NoCurrentUser:;
|
|||||||
NS_StrCopy(buf, cuPath);
|
NS_StrCopy(buf, cuPath);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
var
|
var
|
||||||
GRELocation: TMaxPathChar;
|
GRELocation: TMaxPathChar;
|
||||||
|
Reference in New Issue
Block a user