mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-04-17 06:57:13 +02:00
Fixed building errors and warnings on FMX for MacOS and Linux thanks to Christoph Schneider
This commit is contained in:
parent
739b510526
commit
b4a2cee7f5
@ -617,7 +617,9 @@ implementation
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
{$IFDEF DELPHI16_UP}
|
{$IFDEF DELPHI16_UP}
|
||||||
System.Math, System.IOUtils, System.SysUtils, {$IFDEF MSWINDOWS}WinApi.TlHelp32, WinApi.PSAPI,{$ENDIF}
|
System.Math, System.IOUtils, System.SysUtils,
|
||||||
|
{$IFDEF MSWINDOWS}WinApi.TlHelp32, WinApi.PSAPI,{$ENDIF}
|
||||||
|
{$IFDEF LINUX}{$IFDEF FMX}Posix.Unistd, Posix.Stdio,{$ENDIF}{$ENDIF}
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
Math, {$IFDEF DELPHI14_UP}IOUtils,{$ENDIF} SysUtils,
|
Math, {$IFDEF DELPHI14_UP}IOUtils,{$ENDIF} SysUtils,
|
||||||
{$IFDEF FPC}
|
{$IFDEF FPC}
|
||||||
@ -1227,6 +1229,7 @@ begin
|
|||||||
try
|
try
|
||||||
if (aApp <> nil) then
|
if (aApp <> nil) then
|
||||||
begin
|
begin
|
||||||
|
{$WARN SYMBOL_PLATFORM OFF}
|
||||||
{$IFDEF MSWINDOWS}
|
{$IFDEF MSWINDOWS}
|
||||||
TempArgs.instance := HINSTANCE{$IFDEF FPC}(){$ENDIF};
|
TempArgs.instance := HINSTANCE{$IFDEF FPC}(){$ENDIF};
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
@ -1249,7 +1252,7 @@ begin
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
{$WARN SYMBOL_PLATFORM ON}
|
||||||
Result := cef_execute_process(@TempArgs, aApp.Wrap, FWindowsSandboxInfo);
|
Result := cef_execute_process(@TempArgs, aApp.Wrap, FWindowsSandboxInfo);
|
||||||
end;
|
end;
|
||||||
except
|
except
|
||||||
@ -1321,6 +1324,7 @@ begin
|
|||||||
{$IFDEF MSWINDOWS}
|
{$IFDEF MSWINDOWS}
|
||||||
TempArgs.instance := HINSTANCE{$IFDEF FPC}(){$ENDIF};
|
TempArgs.instance := HINSTANCE{$IFDEF FPC}(){$ENDIF};
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
|
{$WARN SYMBOL_PLATFORM OFF}
|
||||||
{$IFDEF LINUX}
|
{$IFDEF LINUX}
|
||||||
{$IFDEF FPC}
|
{$IFDEF FPC}
|
||||||
TempArgs.argc := argc;
|
TempArgs.argc := argc;
|
||||||
@ -1339,6 +1343,7 @@ begin
|
|||||||
TempArgs.argv := 0;
|
TempArgs.argv := 0;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
{$WARN SYMBOL_PLATFORM ON}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
if (cef_initialize(@TempArgs, @FAppSettings, aApp.Wrap, FWindowsSandboxInfo) <> 0) then
|
if (cef_initialize(@TempArgs, @FAppSettings, aApp.Wrap, FWindowsSandboxInfo) <> 0) then
|
||||||
|
@ -385,15 +385,15 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function TFMXBufferPanel.GetRealScreenScale(var aResultScale : single) : boolean;
|
function TFMXBufferPanel.GetRealScreenScale(var aResultScale : single) : boolean;
|
||||||
{$IFDEF DELPHI24_UP}
|
{$IFDEF DELPHI24_UP}{$IFDEF MSWINDOWS}
|
||||||
var
|
var
|
||||||
TempHandle : TCefWindowHandle;
|
TempHandle : TCefWindowHandle;
|
||||||
{$ENDIF}
|
{$ENDIF}{$ENDIF}
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
aResultScale := 1;
|
aResultScale := 1;
|
||||||
|
|
||||||
{$IFDEF DELPHI24_UP}
|
{$IFDEF DELPHI24_UP}{$IFDEF MSWINDOWS}
|
||||||
TempHandle := GetParentFormHandle;
|
TempHandle := GetParentFormHandle;
|
||||||
|
|
||||||
if (TempHandle <> 0) then
|
if (TempHandle <> 0) then
|
||||||
@ -401,7 +401,7 @@ begin
|
|||||||
Result := True;
|
Result := True;
|
||||||
aResultScale := GetWndScale(TempHandle);
|
aResultScale := GetWndScale(TempHandle);
|
||||||
end;
|
end;
|
||||||
{$ENDIF}
|
{$ENDIF}{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TFMXBufferPanel.GetScreenScale : single;
|
function TFMXBufferPanel.GetScreenScale : single;
|
||||||
|
@ -164,18 +164,18 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function TFMXChromium.GetScreenScale : Single;
|
function TFMXChromium.GetScreenScale : Single;
|
||||||
{$IFDEF DELPHI24_UP}
|
{$IFDEF DELPHI24_UP}{$IFDEF MSWINDOWS}
|
||||||
var
|
var
|
||||||
TempHandle : TCefWindowHandle;
|
TempHandle : TCefWindowHandle;
|
||||||
{$ENDIF}
|
{$ENDIF}{$ENDIF}
|
||||||
begin
|
begin
|
||||||
{$IFDEF DELPHI24_UP}
|
{$IFDEF DELPHI24_UP}{$IFDEF MSWINDOWS}
|
||||||
TempHandle := GetParentFormHandle;
|
TempHandle := GetParentFormHandle;
|
||||||
|
|
||||||
if (TempHandle <> 0) then
|
if (TempHandle <> 0) then
|
||||||
Result := GetWndScale(TempHandle)
|
Result := GetWndScale(TempHandle)
|
||||||
else
|
else
|
||||||
{$ENDIF}
|
{$ENDIF}{$ENDIF}
|
||||||
if (GlobalCEFApp <> nil) then
|
if (GlobalCEFApp <> nil) then
|
||||||
Result := GlobalCEFApp.DeviceScaleFactor
|
Result := GlobalCEFApp.DeviceScaleFactor
|
||||||
else
|
else
|
||||||
|
@ -328,6 +328,7 @@ procedure ShowX11Message(const aMessage : string);
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
|
{$IFDEF LINUX}{$IFDEF FMX}Posix.Unistd, Posix.Stdio,{$ENDIF}{$ENDIF}
|
||||||
uCEFApplicationCore, uCEFSchemeHandlerFactory, uCEFValue,
|
uCEFApplicationCore, uCEFSchemeHandlerFactory, uCEFValue,
|
||||||
uCEFBinaryValue, uCEFStringList;
|
uCEFBinaryValue, uCEFStringList;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// ************************************************************************
|
// ************************************************************************
|
||||||
// ***************************** CEF4Delphi *******************************
|
// ***************************** CEF4Delphi *******************************
|
||||||
// ************************************************************************
|
// ************************************************************************
|
||||||
//
|
//
|
||||||
@ -10,7 +10,7 @@
|
|||||||
// For more information about CEF4Delphi visit :
|
// For more information about CEF4Delphi visit :
|
||||||
// https://www.briskbard.com/index.php?lang=en&pageid=cef
|
// https://www.briskbard.com/index.php?lang=en&pageid=cef
|
||||||
//
|
//
|
||||||
// Copyright © 2021 Salvador Diaz Fau. All rights reserved.
|
// Copyright © 2021 Salvador Diaz Fau. All rights reserved.
|
||||||
//
|
//
|
||||||
// ************************************************************************
|
// ************************************************************************
|
||||||
// ************ vvvv Original license and comments below vvvv *************
|
// ************ vvvv Original license and comments below vvvv *************
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"UpdateLazPackages" : [
|
"UpdateLazPackages" : [
|
||||||
{
|
{
|
||||||
"ForceNotify" : true,
|
"ForceNotify" : true,
|
||||||
"InternalVersion" : 230,
|
"InternalVersion" : 231,
|
||||||
"Name" : "cef4delphi_lazarus.lpk",
|
"Name" : "cef4delphi_lazarus.lpk",
|
||||||
"Version" : "87.1.13.0"
|
"Version" : "87.1.13.0"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user