Fixed building errors and warnings on FMX for MacOS and Linux thanks to Christoph Schneider

This commit is contained in:
Salvador Diaz Fau 2021-01-14 16:03:04 +01:00
parent 739b510526
commit b4a2cee7f5
6 changed files with 19 additions and 13 deletions

View File

@ -617,7 +617,9 @@ implementation
uses
{$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}
Math, {$IFDEF DELPHI14_UP}IOUtils,{$ENDIF} SysUtils,
{$IFDEF FPC}
@ -1227,6 +1229,7 @@ begin
try
if (aApp <> nil) then
begin
{$WARN SYMBOL_PLATFORM OFF}
{$IFDEF MSWINDOWS}
TempArgs.instance := HINSTANCE{$IFDEF FPC}(){$ENDIF};
{$ELSE}
@ -1249,7 +1252,7 @@ begin
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$WARN SYMBOL_PLATFORM ON}
Result := cef_execute_process(@TempArgs, aApp.Wrap, FWindowsSandboxInfo);
end;
except
@ -1321,6 +1324,7 @@ begin
{$IFDEF MSWINDOWS}
TempArgs.instance := HINSTANCE{$IFDEF FPC}(){$ENDIF};
{$ELSE}
{$WARN SYMBOL_PLATFORM OFF}
{$IFDEF LINUX}
{$IFDEF FPC}
TempArgs.argc := argc;
@ -1339,6 +1343,7 @@ begin
TempArgs.argv := 0;
{$ENDIF}
{$ENDIF}
{$WARN SYMBOL_PLATFORM ON}
{$ENDIF}
if (cef_initialize(@TempArgs, @FAppSettings, aApp.Wrap, FWindowsSandboxInfo) <> 0) then

View File

@ -385,15 +385,15 @@ begin
end;
function TFMXBufferPanel.GetRealScreenScale(var aResultScale : single) : boolean;
{$IFDEF DELPHI24_UP}
{$IFDEF DELPHI24_UP}{$IFDEF MSWINDOWS}
var
TempHandle : TCefWindowHandle;
{$ENDIF}
{$ENDIF}{$ENDIF}
begin
Result := False;
aResultScale := 1;
{$IFDEF DELPHI24_UP}
{$IFDEF DELPHI24_UP}{$IFDEF MSWINDOWS}
TempHandle := GetParentFormHandle;
if (TempHandle <> 0) then
@ -401,7 +401,7 @@ begin
Result := True;
aResultScale := GetWndScale(TempHandle);
end;
{$ENDIF}
{$ENDIF}{$ENDIF}
end;
function TFMXBufferPanel.GetScreenScale : single;

View File

@ -164,18 +164,18 @@ begin
end;
function TFMXChromium.GetScreenScale : Single;
{$IFDEF DELPHI24_UP}
{$IFDEF DELPHI24_UP}{$IFDEF MSWINDOWS}
var
TempHandle : TCefWindowHandle;
{$ENDIF}
{$ENDIF}{$ENDIF}
begin
{$IFDEF DELPHI24_UP}
{$IFDEF DELPHI24_UP}{$IFDEF MSWINDOWS}
TempHandle := GetParentFormHandle;
if (TempHandle <> 0) then
Result := GetWndScale(TempHandle)
else
{$ENDIF}
{$ENDIF}{$ENDIF}
if (GlobalCEFApp <> nil) then
Result := GlobalCEFApp.DeviceScaleFactor
else

View File

@ -328,6 +328,7 @@ procedure ShowX11Message(const aMessage : string);
implementation
uses
{$IFDEF LINUX}{$IFDEF FMX}Posix.Unistd, Posix.Stdio,{$ENDIF}{$ENDIF}
uCEFApplicationCore, uCEFSchemeHandlerFactory, uCEFValue,
uCEFBinaryValue, uCEFStringList;

View File

@ -1,4 +1,4 @@
// ************************************************************************
// ************************************************************************
// ***************************** CEF4Delphi *******************************
// ************************************************************************
//
@ -10,7 +10,7 @@
// For more information about CEF4Delphi visit :
// 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 *************

View File

@ -2,7 +2,7 @@
"UpdateLazPackages" : [
{
"ForceNotify" : true,
"InternalVersion" : 230,
"InternalVersion" : 231,
"Name" : "cef4delphi_lazarus.lpk",
"Version" : "87.1.13.0"
}