1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-11-23 21:34:53 +02:00

Update to CEF 88.1.4

Added GlobalCEFApp.DisableChromeLoginPrompt
Removed GlobalCEFApp.CustomFlashPath
Removed GlobalCEFApp.FlashEnabled
Removed TChromiumCore.RunAllFlashInAllowMode
This commit is contained in:
Salvador Diaz Fau
2021-01-21 15:46:35 +01:00
parent afa8418821
commit 151b6fe3da
17 changed files with 84 additions and 292 deletions

View File

@@ -3,18 +3,18 @@ CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chro
CEF4Delphi is based on DCEF3, made by Henri Gourvest. The original license of DCEF3 still applies to CEF4Delphi. Read the license terms in the first lines of any *.pas file. CEF4Delphi is based on DCEF3, made by Henri Gourvest. The original license of DCEF3 still applies to CEF4Delphi. Read the license terms in the first lines of any *.pas file.
CEF4Delphi uses CEF 87.1.13 which includes Chromium 87.0.4280.141. CEF4Delphi uses CEF 88.1.4 which includes Chromium 88.0.4324.96.
The CEF binaries used by CEF4Delphi are available for download at spotify : The CEF binaries used by CEF4Delphi are available for download at spotify :
* [Windows 32 bits](https://cef-builds.spotifycdn.com/cef_binary_87.1.13%2Bg481a82a%2Bchromium-87.0.4280.141_windows32.tar.bz2) * [Windows 32 bits](https://cef-builds.spotifycdn.com/cef_binary_88.1.4%2Bg5a6ab23%2Bchromium-88.0.4324.96_windows32.tar.bz2)
* [Windows 64 bits](https://cef-builds.spotifycdn.com/cef_binary_87.1.13%2Bg481a82a%2Bchromium-87.0.4280.141_windows64.tar.bz2) * [Windows 64 bits](https://cef-builds.spotifycdn.com/cef_binary_88.1.4%2Bg5a6ab23%2Bchromium-88.0.4324.96_windows64.tar.bz2)
* [Linux x86 32 bits](https://cef-builds.spotifycdn.com/cef_binary_87.1.13%2Bg481a82a%2Bchromium-87.0.4280.141_linux32.tar.bz2) * [Linux x86 32 bits](https://cef-builds.spotifycdn.com/cef_binary_88.1.4%2Bg5a6ab23%2Bchromium-88.0.4324.96_linux32.tar.bz2)
* [Linux x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_87.1.13%2Bg481a82a%2Bchromium-87.0.4280.141_linux64.tar.bz2) * [Linux x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_88.1.4%2Bg5a6ab23%2Bchromium-88.0.4324.96_linux64.tar.bz2)
* [Linux ARM 32 bits](https://cef-builds.spotifycdn.com/cef_binary_87.1.13%2Bg481a82a%2Bchromium-87.0.4280.141_linuxarm.tar.bz2) * [Linux ARM 32 bits](https://cef-builds.spotifycdn.com/cef_binary_88.1.4%2Bg5a6ab23%2Bchromium-88.0.4324.96_linuxarm.tar.bz2)
* [Linux ARM 64 bits](https://cef-builds.spotifycdn.com/cef_binary_87.1.13%2Bg481a82a%2Bchromium-87.0.4280.141_linuxarm64.tar.bz2) * [Linux ARM 64 bits](https://cef-builds.spotifycdn.com/cef_binary_88.1.4%2Bg5a6ab23%2Bchromium-88.0.4324.96_linuxarm64.tar.bz2)
CEF4Delphi was developed and tested on Delphi 10.4.1 and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2, Delphi 10.3 and Lazarus 2.0.10/FPC 3.2.0. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components. CEF4Delphi was developed and tested on Delphi 10.4.1 and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2, Delphi 10.3 and Lazarus 2.0.10/FPC 3.2.0. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components.
CEF4Delphi demos have been tested in Windows 7, Windows 10, Linux Mint 20 and Raspberry Pi OS. CEF4Delphi demos have been tested in Windows 7, Windows 10, Linux Mint 20.1 and Raspberry Pi OS.
## Links ## Links
* [Installation instructions and more information about CEF4Delphi](https://www.briskbard.com/index.php?lang=en&pageid=cef) * [Installation instructions and more information about CEF4Delphi](https://www.briskbard.com/index.php?lang=en&pageid=cef)

View File

@@ -211,7 +211,6 @@ begin
GlobalCEFApp := TCefApplication.Create; GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.WindowlessRenderingEnabled := True; GlobalCEFApp.WindowlessRenderingEnabled := True;
GlobalCEFApp.EnableHighDPISupport := True; GlobalCEFApp.EnableHighDPISupport := True;
GlobalCEFApp.FlashEnabled := False;
GlobalCEFApp.ExternalMessagePump := True; GlobalCEFApp.ExternalMessagePump := True;
GlobalCEFApp.MultiThreadedMessageLoop := False; GlobalCEFApp.MultiThreadedMessageLoop := False;
GlobalCEFApp.OnScheduleMessagePumpWork := GlobalCEFApp_OnScheduleMessagePumpWork; GlobalCEFApp.OnScheduleMessagePumpWork := GlobalCEFApp_OnScheduleMessagePumpWork;

View File

@@ -182,7 +182,6 @@ begin
GlobalCEFApp := TCefApplication.Create; GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.WindowlessRenderingEnabled := True; GlobalCEFApp.WindowlessRenderingEnabled := True;
GlobalCEFApp.EnableHighDPISupport := True; GlobalCEFApp.EnableHighDPISupport := True;
GlobalCEFApp.FlashEnabled := False;
GlobalCEFApp.ExternalMessagePump := True; GlobalCEFApp.ExternalMessagePump := True;
GlobalCEFApp.MultiThreadedMessageLoop := False; GlobalCEFApp.MultiThreadedMessageLoop := False;
GlobalCEFApp.cache := 'cache'; GlobalCEFApp.cache := 'cache';

View File

@@ -130,7 +130,6 @@ begin
GlobalCEFWorkScheduler := TCEFWorkScheduler.Create(nil); GlobalCEFWorkScheduler := TCEFWorkScheduler.Create(nil);
GlobalCEFApp := TCefApplication.Create; GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.FlashEnabled := False;
GlobalCEFApp.ExternalMessagePump := True; GlobalCEFApp.ExternalMessagePump := True;
GlobalCEFApp.MultiThreadedMessageLoop := False; GlobalCEFApp.MultiThreadedMessageLoop := False;
GlobalCEFApp.OnScheduleMessagePumpWork := GlobalCEFApp_OnScheduleMessagePumpWork; GlobalCEFApp.OnScheduleMessagePumpWork := GlobalCEFApp_OnScheduleMessagePumpWork;

View File

@@ -137,33 +137,21 @@ object MiniBrowserFrm: TMiniBrowserFrm
'https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_styl' + 'https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_styl' +
'e_backgroundcolor' 'e_backgroundcolor'
'https://www.w3schools.com/Tags/tryit.asp?filename=tryhtml_iframe' +
'_name'
'https://www.w3schools.com/html/html5_video.asp' 'https://www.w3schools.com/html/html5_video.asp'
'http://www.adobe.com/software/flash/about/'
'http://isflashinstalled.com/'
'https://helpx.adobe.com/flash-player.html'
'https://www.ultrasounds.com/'
'https://www.whatismybrowser.com/detect/is-flash-installed'
'http://html5test.com/' 'http://html5test.com/'
'https://webrtc.github.io/samples/src/content/devices/input-outpu' + 'https://webrtc.github.io/samples/src/content/devices/input-outpu' +
't/' 't/'
'https://test.webrtc.org/' 'https://test.webrtc.org/'
'https://www.w3schools.com/' 'https://www.browserleaks.com/webrtc'
'http://webglsamples.org/' 'http://webglsamples.org/'
'https://get.webgl.org/' 'https://get.webgl.org/'
'https://www.briskbard.com' 'https://www.briskbard.com'
'https://www.youtube.com' 'https://www.youtube.com'
'https://html5demos.com/drag/' 'https://html5demos.com/drag/'
'https://developers.google.com/maps/documentation/javascript/exam' +
'ples/streetview-embed?hl=fr'
'https://www.w3schools.com/Tags/tryit.asp?filename=tryhtml_iframe' +
'_name'
'http://www-db.deis.unibo.it/courses/TW/DOCS/w3schools/html/tryit' +
'.asp-filename=tryhtml5_html_manifest.html'
'https://www.browserleaks.com/webrtc'
'https://frames-per-second.appspot.com/' 'https://frames-per-second.appspot.com/'
'chrome://version/' 'chrome://version/'
'chrome://net-internals/' 'chrome://net-internals/'

View File

@@ -20,8 +20,8 @@
<ResourceBaseClass Value="Form"/> <ResourceBaseClass Value="Form"/>
<UnitName Value="uOSRExternalPumpBrowser"/> <UnitName Value="uOSRExternalPumpBrowser"/>
<IsVisibleTab Value="True"/> <IsVisibleTab Value="True"/>
<TopLine Value="201"/> <TopLine Value="608"/>
<CursorPos X="25" Y="218"/> <CursorPos X="64" Y="626"/>
<UsageCount Value="91"/> <UsageCount Value="91"/>
<Bookmarks Count="6"> <Bookmarks Count="6">
<Item0 Y="723" ID="2"/> <Item0 Y="723" ID="2"/>
@@ -130,8 +130,8 @@
<Unit15> <Unit15>
<Filename Value="../../../source/uCEFBufferPanel.pas"/> <Filename Value="../../../source/uCEFBufferPanel.pas"/>
<EditorIndex Value="-1"/> <EditorIndex Value="-1"/>
<TopLine Value="469"/> <TopLine Value="475"/>
<CursorPos X="3" Y="482"/> <CursorPos X="3" Y="478"/>
<UsageCount Value="29"/> <UsageCount Value="29"/>
</Unit15> </Unit15>
<Unit16> <Unit16>
@@ -830,127 +830,123 @@
<Define0 Value="UseCthreads"/> <Define0 Value="UseCthreads"/>
<Define1 Value="EnabledGtkThreading"/> <Define1 Value="EnabledGtkThreading"/>
</OtherDefines> </OtherDefines>
<JumpHistory Count="30" HistoryIndex="29"> <JumpHistory Count="29" HistoryIndex="28">
<Position1> <Position1>
<Filename Value="uosrexternalpumpbrowser.pas"/> <Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="724" TopLine="686"/> <Caret Line="91" Column="24" TopLine="59"/>
</Position1> </Position1>
<Position2> <Position2>
<Filename Value="uosrexternalpumpbrowser.pas"/> <Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="762" Column="9" TopLine="717"/> <Caret Line="696" Column="37" TopLine="691"/>
</Position2> </Position2>
<Position3> <Position3>
<Filename Value="uosrexternalpumpbrowser.pas"/> <Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="90" Column="45" TopLine="68"/> <Caret Line="310" TopLine="286"/>
</Position3> </Position3>
<Position4> <Position4>
<Filename Value="uosrexternalpumpbrowser.pas"/> <Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="309" Column="3" TopLine="297"/> <Caret Line="708" TopLine="682"/>
</Position4> </Position4>
<Position5> <Position5>
<Filename Value="uosrexternalpumpbrowser.pas"/> <Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="91" Column="24" TopLine="59"/> <Caret Line="709" Column="22" TopLine="682"/>
</Position5> </Position5>
<Position6> <Position6>
<Filename Value="uosrexternalpumpbrowser.pas"/> <Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="696" Column="37" TopLine="691"/> <Caret Line="706" Column="39" TopLine="682"/>
</Position6> </Position6>
<Position7> <Position7>
<Filename Value="uosrexternalpumpbrowser.pas"/> <Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="310" TopLine="286"/> <Caret Line="72" Column="32" TopLine="54"/>
</Position7> </Position7>
<Position8> <Position8>
<Filename Value="uosrexternalpumpbrowser.pas"/> <Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="708" TopLine="682"/> <Caret Line="117" Column="33" TopLine="92"/>
</Position8> </Position8>
<Position9> <Position9>
<Filename Value="uosrexternalpumpbrowser.pas"/> <Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="709" Column="22" TopLine="682"/> <Caret Line="88" Column="22" TopLine="61"/>
</Position9> </Position9>
<Position10> <Position10>
<Filename Value="uosrexternalpumpbrowser.pas"/> <Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="706" Column="39" TopLine="682"/> <Caret Line="328" Column="58" TopLine="308"/>
</Position10> </Position10>
<Position11> <Position11>
<Filename Value="uosrexternalpumpbrowser.pas"/> <Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="72" Column="32" TopLine="54"/> <Caret Line="216" Column="77" TopLine="205"/>
</Position11> </Position11>
<Position12> <Position12>
<Filename Value="uosrexternalpumpbrowser.pas"/> <Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="117" Column="33" TopLine="92"/> <Caret Line="87" Column="22" TopLine="60"/>
</Position12> </Position12>
<Position13> <Position13>
<Filename Value="uosrexternalpumpbrowser.pas"/> <Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="88" Column="22" TopLine="61"/> <Caret Line="73" Column="13" TopLine="63"/>
</Position13> </Position13>
<Position14> <Position14>
<Filename Value="uosrexternalpumpbrowser.pas"/> <Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="328" Column="58" TopLine="308"/> <Caret Line="410" Column="3" TopLine="406"/>
</Position14> </Position14>
<Position15> <Position15>
<Filename Value="uosrexternalpumpbrowser.pas"/> <Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="216" Column="77" TopLine="205"/> <Caret Line="277" Column="73" TopLine="237"/>
</Position15> </Position15>
<Position16> <Position16>
<Filename Value="uosrexternalpumpbrowser.pas"/> <Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="87" Column="22" TopLine="60"/> <Caret Line="86" Column="24" TopLine="81"/>
</Position16> </Position16>
<Position17> <Position17>
<Filename Value="uosrexternalpumpbrowser.pas"/> <Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="73" Column="13" TopLine="63"/> <Caret Line="768" TopLine="54"/>
</Position17> </Position17>
<Position18> <Position18>
<Filename Value="uosrexternalpumpbrowser.pas"/> <Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="410" Column="3" TopLine="406"/> <Caret Line="195" Column="47" TopLine="172"/>
</Position18> </Position18>
<Position19> <Position19>
<Filename Value="uosrexternalpumpbrowser.pas"/> <Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="277" Column="73" TopLine="237"/> <Caret Line="220" Column="36" TopLine="197"/>
</Position19> </Position19>
<Position20> <Position20>
<Filename Value="uosrexternalpumpbrowser.pas"/> <Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="86" Column="24" TopLine="81"/> <Caret Line="221" Column="51" TopLine="197"/>
</Position20> </Position20>
<Position21> <Position21>
<Filename Value="uosrexternalpumpbrowser.pas"/> <Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="768" TopLine="54"/> <Caret Line="235" Column="62" TopLine="208"/>
</Position21> </Position21>
<Position22> <Position22>
<Filename Value="uosrexternalpumpbrowser.pas"/> <Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="195" Column="47" TopLine="172"/> <Caret Line="240" Column="47" TopLine="205"/>
</Position22> </Position22>
<Position23> <Position23>
<Filename Value="uosrexternalpumpbrowser.pas"/> <Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="220" Column="36" TopLine="197"/> <Caret Line="331" TopLine="310"/>
</Position23> </Position23>
<Position24> <Position24>
<Filename Value="uosrexternalpumpbrowser.pas"/> <Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="221" Column="51" TopLine="197"/> <Caret Line="722" TopLine="713"/>
</Position24> </Position24>
<Position25> <Position25>
<Filename Value="uosrexternalpumpbrowser.pas"/> <Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="235" Column="62" TopLine="208"/> <Caret Line="96" TopLine="74"/>
</Position25> </Position25>
<Position26> <Position26>
<Filename Value="uosrexternalpumpbrowser.pas"/> <Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="240" Column="47" TopLine="205"/> <Caret Line="95" TopLine="73"/>
</Position26> </Position26>
<Position27> <Position27>
<Filename Value="uosrexternalpumpbrowser.pas"/> <Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="331" TopLine="310"/> <Caret Line="317" Column="82" TopLine="291"/>
</Position27> </Position27>
<Position28> <Position28>
<Filename Value="uosrexternalpumpbrowser.pas"/> <Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="722" TopLine="713"/> <Caret Line="79" Column="15" TopLine="65"/>
</Position28> </Position28>
<Position29> <Position29>
<Filename Value="uosrexternalpumpbrowser.pas"/> <Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="96" TopLine="74"/> <Caret Line="620" Column="34" TopLine="596"/>
</Position29> </Position29>
<Position30>
<Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="95" TopLine="73"/>
</Position30>
</JumpHistory> </JumpHistory>
<RunParams> <RunParams>
<FormatVersion Value="2"/> <FormatVersion Value="2"/>

View File

@@ -21,6 +21,7 @@ object Form1: TForm1
Align = alTop Align = alTop
ClientHeight = 30 ClientHeight = 30
ClientWidth = 1001 ClientWidth = 1001
Enabled = False
TabOrder = 0 TabOrder = 0
object AddressEdt: TEdit object AddressEdt: TEdit
Left = 1 Left = 1

View File

@@ -135,7 +135,6 @@ begin
GlobalCEFWorkScheduler := TCEFWorkScheduler.Create(nil); GlobalCEFWorkScheduler := TCEFWorkScheduler.Create(nil);
GlobalCEFApp := TCefApplication.Create; GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.FlashEnabled := False;
GlobalCEFApp.ExternalMessagePump := True; GlobalCEFApp.ExternalMessagePump := True;
GlobalCEFApp.MultiThreadedMessageLoop := False; GlobalCEFApp.MultiThreadedMessageLoop := False;
GlobalCEFApp.OnScheduleMessagePumpWork := GlobalCEFApp_OnScheduleMessagePumpWork; GlobalCEFApp.OnScheduleMessagePumpWork := GlobalCEFApp_OnScheduleMessagePumpWork;

View File

@@ -4,7 +4,7 @@
<PathDelim Value="\"/> <PathDelim Value="\"/>
<Version Value="11"/> <Version Value="11"/>
<BuildModes Active="Default"/> <BuildModes Active="Default"/>
<Units Count="35"> <Units Count="34">
<Unit0> <Unit0>
<Filename Value="MiniBrowser.lpr"/> <Filename Value="MiniBrowser.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
@@ -20,9 +20,10 @@
<ComponentName Value="MiniBrowserFrm"/> <ComponentName Value="MiniBrowserFrm"/>
<HasResources Value="True"/> <HasResources Value="True"/>
<ResourceBaseClass Value="Form"/> <ResourceBaseClass Value="Form"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="1"/> <EditorIndex Value="1"/>
<TopLine Value="40"/> <TopLine Value="823"/>
<CursorPos X="66" Y="839"/> <CursorPos X="60" Y="833"/>
<UsageCount Value="27"/> <UsageCount Value="27"/>
<Loaded Value="True"/> <Loaded Value="True"/>
<LoadedDesigner Value="True"/> <LoadedDesigner Value="True"/>
@@ -185,17 +186,15 @@
</Unit22> </Unit22>
<Unit23> <Unit23>
<Filename Value="..\..\..\source\uCEFMiscFunctions.pas"/> <Filename Value="..\..\..\source\uCEFMiscFunctions.pas"/>
<IsVisibleTab Value="True"/> <EditorIndex Value="-1"/>
<EditorIndex Value="2"/> <TopLine Value="330"/>
<TopLine Value="594"/> <CursorPos Y="353"/>
<CursorPos X="66" Y="588"/>
<UsageCount Value="12"/> <UsageCount Value="12"/>
<Bookmarks Count="3"> <Bookmarks Count="3">
<Item0 X="9" Y="1299" ID="1"/> <Item0 X="9" Y="1299" ID="1"/>
<Item1 X="26" Y="896" ID="2"/> <Item1 X="26" Y="896" ID="2"/>
<Item2 X="7" Y="1355" ID="3"/> <Item2 X="7" Y="1355" ID="3"/>
</Bookmarks> </Bookmarks>
<Loaded Value="True"/>
</Unit23> </Unit23>
<Unit24> <Unit24>
<Filename Value="C:\lazarus\fpc\3.0.4\source\rtl\inc\systemh.inc"/> <Filename Value="C:\lazarus\fpc\3.0.4\source\rtl\inc\systemh.inc"/>
@@ -267,15 +266,8 @@
<CursorPos Y="154"/> <CursorPos Y="154"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
</Unit33> </Unit33>
<Unit34>
<Filename Value="C:\lazarus\fpc\3.2.0\source\rtl\objpas\sysutils\datih.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="31"/>
<CursorPos X="4" Y="45"/>
<UsageCount Value="10"/>
</Unit34>
</Units> </Units>
<JumpHistory Count="7" HistoryIndex="6"> <JumpHistory Count="5" HistoryIndex="4">
<Position1> <Position1>
<Filename Value="uMiniBrowser.pas"/> <Filename Value="uMiniBrowser.pas"/>
<Caret Line="305" TopLine="293"/> <Caret Line="305" TopLine="293"/>
@@ -296,14 +288,6 @@
<Filename Value="uMiniBrowser.pas"/> <Filename Value="uMiniBrowser.pas"/>
<Caret Line="232" Column="74" TopLine="213"/> <Caret Line="232" Column="74" TopLine="213"/>
</Position5> </Position5>
<Position6>
<Filename Value="..\..\..\source\uCEFMiscFunctions.pas"/>
<Caret Line="151" Column="39" TopLine="135"/>
</Position6>
<Position7>
<Filename Value="..\..\..\source\uCEFMiscFunctions.pas"/>
<Caret Line="580" Column="3" TopLine="573"/>
</Position7>
</JumpHistory> </JumpHistory>
<RunParams> <RunParams>
<FormatVersion Value="2"/> <FormatVersion Value="2"/>

View File

@@ -127,22 +127,18 @@ object MiniBrowserFrm: TMiniBrowserFrm
'https://www.w3schools.com/js/tryit.asp?filename=tryjs_win_close' 'https://www.w3schools.com/js/tryit.asp?filename=tryjs_win_close'
'https://www.w3schools.com/js/tryit.asp?filename=tryjs_alert' 'https://www.w3schools.com/js/tryit.asp?filename=tryjs_alert'
'https://www.w3schools.com/js/tryit.asp?filename=tryjs_loc_assign' 'https://www.w3schools.com/js/tryit.asp?filename=tryjs_loc_assign'
'https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_style_backgroundcolor'
'https://www.w3schools.com/Tags/tryit.asp?filename=tryhtml_iframe_name'
'https://www.w3schools.com/html/html5_video.asp' 'https://www.w3schools.com/html/html5_video.asp'
'http://www.adobe.com/software/flash/about/'
'http://isflashinstalled.com/'
'http://html5test.com/' 'http://html5test.com/'
'https://webrtc.github.io/samples/src/content/devices/input-output/' 'https://webrtc.github.io/samples/src/content/devices/input-output/'
'https://test.webrtc.org/' 'https://test.webrtc.org/'
'https://www.w3schools.com/' 'https://www.browserleaks.com/webrtc'
'http://webglsamples.org/' 'http://webglsamples.org/'
'https://get.webgl.org/' 'https://get.webgl.org/'
'https://www.briskbard.com' 'https://www.briskbard.com'
'https://www.youtube.com' 'https://www.youtube.com'
'https://html5demos.com/drag/' 'https://html5demos.com/drag/'
'https://developers.google.com/maps/documentation/javascript/examples/streetview-embed?hl=fr'
'https://www.w3schools.com/Tags/tryit.asp?filename=tryhtml_iframe_name'
'http://www-db.deis.unibo.it/courses/TW/DOCS/w3schools/html/tryit.asp-filename=tryhtml5_html_manifest.html'
'https://www.browserleaks.com/webrtc'
'https://frames-per-second.appspot.com/' 'https://frames-per-second.appspot.com/'
'chrome://version/' 'chrome://version/'
'chrome://net-internals/' 'chrome://net-internals/'

View File

@@ -230,3 +230,4 @@ contains
end. end.

View File

@@ -21,7 +21,7 @@
</CompilerOptions> </CompilerOptions>
<Description Value="CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC."/> <Description Value="CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC."/>
<License Value="MPL 1.1"/> <License Value="MPL 1.1"/>
<Version Major="87" Minor="1" Release="13"/> <Version Major="88" Minor="1" Release="4"/>
<Files Count="193"> <Files Count="193">
<Item1> <Item1>
<Filename Value="..\source\uCEFAccessibilityHandler.pas"/> <Filename Value="..\source\uCEFAccessibilityHandler.pas"/>

View File

@@ -63,15 +63,15 @@ uses
uCEFTypes, uCEFInterfaces, uCEFBaseRefCounted, uCEFSchemeRegistrar; uCEFTypes, uCEFInterfaces, uCEFBaseRefCounted, uCEFSchemeRegistrar;
const const
CEF_SUPPORTED_VERSION_MAJOR = 87; CEF_SUPPORTED_VERSION_MAJOR = 88;
CEF_SUPPORTED_VERSION_MINOR = 1; CEF_SUPPORTED_VERSION_MINOR = 1;
CEF_SUPPORTED_VERSION_RELEASE = 13; CEF_SUPPORTED_VERSION_RELEASE = 4;
CEF_SUPPORTED_VERSION_BUILD = 0; CEF_SUPPORTED_VERSION_BUILD = 0;
CEF_CHROMEELF_VERSION_MAJOR = 87; CEF_CHROMEELF_VERSION_MAJOR = 88;
CEF_CHROMEELF_VERSION_MINOR = 0; CEF_CHROMEELF_VERSION_MINOR = 0;
CEF_CHROMEELF_VERSION_RELEASE = 4280; CEF_CHROMEELF_VERSION_RELEASE = 4324;
CEF_CHROMEELF_VERSION_BUILD = 141; CEF_CHROMEELF_VERSION_BUILD = 96;
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
LIBCEF_DLL = 'libcef.dll'; LIBCEF_DLL = 'libcef.dll';
@@ -93,7 +93,6 @@ type
FLocalesRequired : ustring; FLocalesRequired : ustring;
FLogFile : ustring; FLogFile : ustring;
FBrowserSubprocessPath : ustring; FBrowserSubprocessPath : ustring;
FCustomFlashPath : ustring;
FFrameworkDirPath : ustring; FFrameworkDirPath : ustring;
FMainBundlePath : ustring; // Only used in macOS FMainBundlePath : ustring; // Only used in macOS
FChromeRuntime : boolean; FChromeRuntime : boolean;
@@ -121,7 +120,6 @@ type
FDeleteCookies : boolean; FDeleteCookies : boolean;
FCustomCommandLines : TStringList; FCustomCommandLines : TStringList;
FCustomCommandLineValues : TStringList; FCustomCommandLineValues : TStringList;
FFlashEnabled : boolean;
FEnableMediaStream : boolean; FEnableMediaStream : boolean;
FEnableSpeechInput : boolean; FEnableSpeechInput : boolean;
FUseFakeUIForMediaStream : boolean; FUseFakeUIForMediaStream : boolean;
@@ -144,6 +142,7 @@ type
FDisablePDFExtension : boolean; FDisablePDFExtension : boolean;
FLogProcessInfo : boolean; FLogProcessInfo : boolean;
FDisableSiteIsolationTrials : boolean; FDisableSiteIsolationTrials : boolean;
FDisableChromeLoginPrompt : boolean;
FEnableFeatures : ustring; FEnableFeatures : ustring;
FDisableFeatures : ustring; FDisableFeatures : ustring;
FEnableBlinkFeatures : ustring; FEnableBlinkFeatures : ustring;
@@ -338,9 +337,6 @@ type
procedure BeforeInitSubProcess; virtual; procedure BeforeInitSubProcess; virtual;
function CheckCEFLibrary : boolean; function CheckCEFLibrary : boolean;
procedure RegisterWidevineCDM; procedure RegisterWidevineCDM;
{$IFDEF MSWINDOWS}
function FindFlashDLL(var aFileName : ustring) : boolean;
{$ENDIF}
procedure ShowErrorMessageDlg(const aError : string); virtual; procedure ShowErrorMessageDlg(const aError : string); virtual;
procedure UpdateSupportedSchemes(aIncludeDefaults : boolean = True); virtual; procedure UpdateSupportedSchemes(aIncludeDefaults : boolean = True); virtual;
function ParseProcessType : TCefProcessType; function ParseProcessType : TCefProcessType;
@@ -427,7 +423,6 @@ type
// Properties used to set command line switches // Properties used to set command line switches
property SingleProcess : Boolean read FSingleProcess write FSingleProcess; // --single-process property SingleProcess : Boolean read FSingleProcess write FSingleProcess; // --single-process
property FlashEnabled : boolean read FFlashEnabled write FFlashEnabled; // --enable-system-flash
property EnableMediaStream : boolean read FEnableMediaStream write FEnableMediaStream; // --enable-media-stream property EnableMediaStream : boolean read FEnableMediaStream write FEnableMediaStream; // --enable-media-stream
property EnableSpeechInput : boolean read FEnableSpeechInput write FEnableSpeechInput; // --enable-speech-input property EnableSpeechInput : boolean read FEnableSpeechInput write FEnableSpeechInput; // --enable-speech-input
property UseFakeUIForMediaStream : boolean read FUseFakeUIForMediaStream write FUseFakeUIForMediaStream; // --use-fake-ui-for-media-stream property UseFakeUIForMediaStream : boolean read FUseFakeUIForMediaStream write FUseFakeUIForMediaStream; // --use-fake-ui-for-media-stream
@@ -448,6 +443,7 @@ type
property DisableWebSecurity : boolean read FDisableWebSecurity write FDisableWebSecurity; // --disable-web-security property DisableWebSecurity : boolean read FDisableWebSecurity write FDisableWebSecurity; // --disable-web-security
property DisablePDFExtension : boolean read FDisablePDFExtension write FDisablePDFExtension; // --disable-pdf-extension property DisablePDFExtension : boolean read FDisablePDFExtension write FDisablePDFExtension; // --disable-pdf-extension
property DisableSiteIsolationTrials : boolean read FDisableSiteIsolationTrials write FDisableSiteIsolationTrials; // --disable-site-isolation-trials property DisableSiteIsolationTrials : boolean read FDisableSiteIsolationTrials write FDisableSiteIsolationTrials; // --disable-site-isolation-trials
property DisableChromeLoginPrompt : boolean read FDisableChromeLoginPrompt write FDisableChromeLoginPrompt; // --disable-chrome-login-prompt
property DisableExtensions : boolean read FDisableExtensions write FDisableExtensions; // --disable-extensions property DisableExtensions : boolean read FDisableExtensions write FDisableExtensions; // --disable-extensions
property AutoplayPolicy : TCefAutoplayPolicy read FAutoplayPolicy write FAutoplayPolicy; // --autoplay-policy property AutoplayPolicy : TCefAutoplayPolicy read FAutoplayPolicy write FAutoplayPolicy; // --autoplay-policy
property DisableBackgroundNetworking : boolean read FDisableBackgroundNetworking write FDisableBackgroundNetworking; // --disable-background-networking property DisableBackgroundNetworking : boolean read FDisableBackgroundNetworking write FDisableBackgroundNetworking; // --disable-background-networking
@@ -504,7 +500,6 @@ type
property DeviceScaleFactor : single read FDeviceScaleFactor; property DeviceScaleFactor : single read FDeviceScaleFactor;
property CheckDevToolsResources : boolean read FCheckDevToolsResources write FCheckDevToolsResources; property CheckDevToolsResources : boolean read FCheckDevToolsResources write FCheckDevToolsResources;
property LocalesRequired : ustring read FLocalesRequired write FLocalesRequired; property LocalesRequired : ustring read FLocalesRequired write FLocalesRequired;
property CustomFlashPath : ustring read FCustomFlashPath write FCustomFlashPath;
property ProcessType : TCefProcessType read FProcessType; property ProcessType : TCefProcessType read FProcessType;
property MustCreateResourceBundleHandler : boolean read GetMustCreateResourceBundleHandler write FMustCreateResourceBundleHandler; property MustCreateResourceBundleHandler : boolean read GetMustCreateResourceBundleHandler write FMustCreateResourceBundleHandler;
property MustCreateBrowserProcessHandler : boolean read GetMustCreateBrowserProcessHandler write FMustCreateBrowserProcessHandler; property MustCreateBrowserProcessHandler : boolean read GetMustCreateBrowserProcessHandler write FMustCreateBrowserProcessHandler;
@@ -655,7 +650,6 @@ begin
FLocale := ''; FLocale := '';
FLogFile := ''; FLogFile := '';
FBrowserSubprocessPath := ''; FBrowserSubprocessPath := '';
FCustomFlashPath := '';
FFrameworkDirPath := ''; FFrameworkDirPath := '';
FMainBundlePath := ''; FMainBundlePath := '';
FChromeRuntime := False; FChromeRuntime := False;
@@ -681,7 +675,6 @@ begin
FExternalMessagePump := False; FExternalMessagePump := False;
FDeleteCache := False; FDeleteCache := False;
FDeleteCookies := False; FDeleteCookies := False;
FFlashEnabled := True;
FEnableMediaStream := True; FEnableMediaStream := True;
FEnableSpeechInput := True; FEnableSpeechInput := True;
FUseFakeUIForMediaStream := False; FUseFakeUIForMediaStream := False;
@@ -700,6 +693,7 @@ begin
FDisableWebSecurity := False; FDisableWebSecurity := False;
FDisablePDFExtension := False; FDisablePDFExtension := False;
FDisableSiteIsolationTrials := False; FDisableSiteIsolationTrials := False;
FDisableChromeLoginPrompt := False;
FLogProcessInfo := False; FLogProcessInfo := False;
FReRaiseExceptions := False; FReRaiseExceptions := False;
FLibLoaded := False; FLibLoaded := False;
@@ -1486,42 +1480,6 @@ begin
end; end;
end; end;
{$IFDEF MSWINDOWS}
function TCefApplicationCore.FindFlashDLL(var aFileName : ustring) : boolean;
var
TempSearchRec : TSearchRec;
TempProductName, TempPath : ustring;
begin
Result := False;
aFileName := '';
try
if (length(FCustomFlashPath) > 0) then
begin
TempPath := IncludeTrailingPathDelimiter(FCustomFlashPath);
if (FindFirst(TempPath + '*.dll', faAnyFile, TempSearchRec) = 0) then
begin
repeat
if (TempSearchRec.Attr <> faDirectory) and
GetStringFileInfo(TempPath + TempSearchRec.Name, 'ProductName', TempProductName) and
(CompareText(TempProductName, 'Shockwave Flash') = 0) then
begin
aFileName := TempPath + TempSearchRec.Name;
Result := True;
end;
until Result or (FindNext(TempSearchRec) <> 0);
FindClose(TempSearchRec);
end;
end;
except
on e : exception do
if CustomExceptionHandler('TCefApplicationCore.FindFlashDLL', e) then raise;
end;
end;
{$ENDIF}
procedure TCefApplicationCore.ShowErrorMessageDlg(const aError : string); procedure TCefApplicationCore.ShowErrorMessageDlg(const aError : string);
begin begin
OutputDebugMessage(aError); OutputDebugMessage(aError);
@@ -1836,31 +1794,7 @@ procedure TCefApplicationCore.AddCustomCommandLineSwitches(var aKeys, aValues :
var var
i : integer; i : integer;
TempFormatSettings : TFormatSettings; TempFormatSettings : TFormatSettings;
{$IFDEF MSWINDOWS}
TempVersionInfo : TFileVersionInfo;
TempFileName : ustring;
{$ENDIF}
begin begin
{$IFDEF MSWINDOWS}
if FindFlashDLL(TempFileName) and
GetDLLVersion(TempFileName, TempVersionInfo) then
begin
if FEnableGPU then ReplaceSwitch(aKeys, aValues, '--enable-gpu-plugin');
ReplaceSwitch(aKeys, aValues, '--enable-accelerated-plugins');
ReplaceSwitch(aKeys, aValues, '--ppapi-flash-path', TempFileName);
ReplaceSwitch(aKeys, aValues, '--ppapi-flash-version', FileVersionInfoToString(TempVersionInfo));
end
else
{$ENDIF}
if FFlashEnabled then
begin
if FEnableGPU then ReplaceSwitch(aKeys, aValues, '--enable-gpu-plugin');
ReplaceSwitch(aKeys, aValues, '--enable-accelerated-plugins');
ReplaceSwitch(aKeys, aValues, '--enable-system-flash');
end;
ReplaceSwitch(aKeys, aValues, '--enable-media-stream', IntToStr(Ord(FEnableMediaStream))); ReplaceSwitch(aKeys, aValues, '--enable-media-stream', IntToStr(Ord(FEnableMediaStream)));
ReplaceSwitch(aKeys, aValues, '--enable-speech-input', IntToStr(Ord(FEnableSpeechInput))); ReplaceSwitch(aKeys, aValues, '--enable-speech-input', IntToStr(Ord(FEnableSpeechInput)));
@@ -1931,6 +1865,9 @@ begin
if FDisableSiteIsolationTrials then if FDisableSiteIsolationTrials then
ReplaceSwitch(aKeys, aValues, '--disable-site-isolation-trials'); ReplaceSwitch(aKeys, aValues, '--disable-site-isolation-trials');
if FDisableChromeLoginPrompt then
ReplaceSwitch(aKeys, aValues, '--disable-chrome-login-prompt');
if FSitePerProcess then if FSitePerProcess then
ReplaceSwitch(aKeys, aValues, '--site-per-process'); ReplaceSwitch(aKeys, aValues, '--site-per-process');

View File

@@ -109,7 +109,6 @@ type
FDoNotTrack : boolean; FDoNotTrack : boolean;
FSendReferrer : boolean; FSendReferrer : boolean;
FHyperlinkAuditing : boolean; FHyperlinkAuditing : boolean;
FRunAllFlashInAllowMode : boolean;
FAllowOutdatedPlugins : boolean; FAllowOutdatedPlugins : boolean;
FAlwaysAuthorizePlugins : boolean; FAlwaysAuthorizePlugins : boolean;
FSpellChecking : boolean; FSpellChecking : boolean;
@@ -361,7 +360,6 @@ type
procedure SetDoNotTrack(aValue : boolean); procedure SetDoNotTrack(aValue : boolean);
procedure SetSendReferrer(aValue : boolean); procedure SetSendReferrer(aValue : boolean);
procedure SetHyperlinkAuditing(aValue : boolean); procedure SetHyperlinkAuditing(aValue : boolean);
procedure SetRunAllFlashInAllowMode(aValue : boolean);
procedure SetAllowOutdatedPlugins(aValue : boolean); procedure SetAllowOutdatedPlugins(aValue : boolean);
procedure SetAlwaysAuthorizePlugins(aValue : boolean); procedure SetAlwaysAuthorizePlugins(aValue : boolean);
procedure SetSpellChecking(aValue : boolean); procedure SetSpellChecking(aValue : boolean);
@@ -887,7 +885,6 @@ type
property DoNotTrack : boolean read FDoNotTrack write SetDoNotTrack; property DoNotTrack : boolean read FDoNotTrack write SetDoNotTrack;
property SendReferrer : boolean read FSendReferrer write SetSendReferrer; property SendReferrer : boolean read FSendReferrer write SetSendReferrer;
property HyperlinkAuditing : boolean read FHyperlinkAuditing write SetHyperlinkAuditing; property HyperlinkAuditing : boolean read FHyperlinkAuditing write SetHyperlinkAuditing;
property RunAllFlashInAllowMode : boolean read FRunAllFlashInAllowMode write SetRunAllFlashInAllowMode;
property AllowOutdatedPlugins : boolean read FAllowOutdatedPlugins write SetAllowOutdatedPlugins; property AllowOutdatedPlugins : boolean read FAllowOutdatedPlugins write SetAllowOutdatedPlugins;
property AlwaysAuthorizePlugins : boolean read FAlwaysAuthorizePlugins write SetAlwaysAuthorizePlugins; property AlwaysAuthorizePlugins : boolean read FAlwaysAuthorizePlugins write SetAlwaysAuthorizePlugins;
property SpellChecking : boolean read FSpellChecking write SetSpellChecking; property SpellChecking : boolean read FSpellChecking write SetSpellChecking;
@@ -1206,7 +1203,6 @@ begin
FAddCustomHeader := False; FAddCustomHeader := False;
FDoNotTrack := True; FDoNotTrack := True;
FSendReferrer := True; FSendReferrer := True;
FRunAllFlashInAllowMode := False;
FAllowOutdatedPlugins := False; FAllowOutdatedPlugins := False;
FAlwaysAuthorizePlugins := False; FAlwaysAuthorizePlugins := False;
FSpellChecking := True; FSpellChecking := True;
@@ -3144,15 +3140,6 @@ begin
end; end;
end; end;
procedure TChromiumCore.SetRunAllFlashInAllowMode(aValue : boolean);
begin
if (FRunAllFlashInAllowMode <> aValue) then
begin
FRunAllFlashInAllowMode := aValue;
FUpdatePreferences := True;
end;
end;
procedure TChromiumCore.SetAllowOutdatedPlugins(aValue : boolean); procedure TChromiumCore.SetAllowOutdatedPlugins(aValue : boolean);
begin begin
if (FAllowOutdatedPlugins <> aValue) then if (FAllowOutdatedPlugins <> aValue) then
@@ -4020,7 +4007,6 @@ begin
UpdatePreference(aBrowser, 'enable_do_not_track', FDoNotTrack); UpdatePreference(aBrowser, 'enable_do_not_track', FDoNotTrack);
UpdatePreference(aBrowser, 'enable_referrers', FSendReferrer); UpdatePreference(aBrowser, 'enable_referrers', FSendReferrer);
UpdatePreference(aBrowser, 'enable_a_ping', FHyperlinkAuditing); UpdatePreference(aBrowser, 'enable_a_ping', FHyperlinkAuditing);
UpdatePreference(aBrowser, 'plugins.run_all_flash_in_allow_mode', FRunAllFlashInAllowMode);
UpdatePreference(aBrowser, 'plugins.allow_outdated', FAllowOutdatedPlugins); UpdatePreference(aBrowser, 'plugins.allow_outdated', FAllowOutdatedPlugins);
UpdatePreference(aBrowser, 'plugins.always_authorize', FAlwaysAuthorizePlugins); UpdatePreference(aBrowser, 'plugins.always_authorize', FAlwaysAuthorizePlugins);
UpdatePreference(aBrowser, 'browser.enable_spellchecking', FSpellChecking); UpdatePreference(aBrowser, 'browser.enable_spellchecking', FSpellChecking);
@@ -4053,9 +4039,6 @@ begin
if (FMaxConnectionsPerProxy <> CEF_MAX_CONNECTIONS_PER_PROXY_DEFAULT_VALUE) then if (FMaxConnectionsPerProxy <> CEF_MAX_CONNECTIONS_PER_PROXY_DEFAULT_VALUE) then
UpdatePreference(aBrowser, 'net.max_connections_per_proxy', FMaxConnectionsPerProxy); UpdatePreference(aBrowser, 'net.max_connections_per_proxy', FMaxConnectionsPerProxy);
if FRunAllFlashInAllowMode then
UpdatePreference(aBrowser, 'profile.default_content_setting_values.plugins', 1);
case FWebRTCIPHandlingPolicy of case FWebRTCIPHandlingPolicy of
hpDefaultPublicAndPrivateInterfaces : hpDefaultPublicAndPrivateInterfaces :
UpdatePreference(aBrowser, 'webrtc.ip_handling_policy', 'default_public_and_private_interfaces'); UpdatePreference(aBrowser, 'webrtc.ip_handling_policy', 'default_public_and_private_interfaces');

View File

@@ -527,16 +527,17 @@ const
DUPLEX_MODE_SHORT_EDGE = 2; DUPLEX_MODE_SHORT_EDGE = 2;
// /include/internal/cef_types.h (cef_media_route_create_result_t) // /include/internal/cef_types.h (cef_media_route_create_result_t)
CEF_MRCR_UNKNOWN_ERROR = 0; CEF_MRCR_UNKNOWN_ERROR = 0;
CEF_MRCR_OK = 1; CEF_MRCR_OK = 1;
CEF_MRCR_TIMED_OUT = 2; CEF_MRCR_TIMED_OUT = 2;
CEF_MRCR_ROUTE_NOT_FOUND = 3; CEF_MRCR_ROUTE_NOT_FOUND = 3;
CEF_MRCR_SINK_NOT_FOUND = 4; CEF_MRCR_SINK_NOT_FOUND = 4;
CEF_MRCR_INVALID_ORIGIN = 5; CEF_MRCR_INVALID_ORIGIN = 5;
CEF_MRCR_NO_SUPPORTED_PROVIDER = 7; CEF_MRCR_NO_SUPPORTED_PROVIDER = 7;
CEF_MRCR_CANCELLED = 8; CEF_MRCR_CANCELLED = 8;
CEF_MRCR_ROUTE_ALREADY_EXISTS = 9; CEF_MRCR_ROUTE_ALREADY_EXISTS = 9;
CEF_MRCR_TOTAL_COUNT = 11; CEF_MRCR_ROUTE_ALREADY_TERMINATED = 11;
CEF_MRCR_TOTAL_COUNT = 12;
// /include/internal/cef_types.h (cef_cookie_priority_t) // /include/internal/cef_types.h (cef_cookie_priority_t)
CEF_COOKIE_PRIORITY_LOW = -1; CEF_COOKIE_PRIORITY_LOW = -1;

View File

@@ -229,7 +229,6 @@ function CefClearCrossOriginWhitelist: Boolean;
procedure UInt64ToFileVersionInfo(const aVersion : uint64; var aVersionInfo : TFileVersionInfo); procedure UInt64ToFileVersionInfo(const aVersion : uint64; var aVersionInfo : TFileVersionInfo);
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
function GetExtendedFileVersion(const aFileName : ustring) : uint64; function GetExtendedFileVersion(const aFileName : ustring) : uint64;
function GetStringFileInfo(const aFileName, aField : ustring; var aValue : ustring) : boolean;
function GetDLLVersion(const aDLLFile : ustring; var aVersionInfo : TFileVersionInfo) : boolean; function GetDLLVersion(const aDLLFile : ustring; var aVersionInfo : TFileVersionInfo) : boolean;
procedure OutputLastErrorMessage; procedure OutputLastErrorMessage;
{$ENDIF} {$ENDIF}
@@ -1338,96 +1337,6 @@ begin
{$ENDIF} {$ENDIF}
end; end;
function GetStringFileInfo(const aFileName, aField : ustring; var aValue : ustring) : boolean;
type
PLangAndCodepage = ^TLangAndCodepage;
TLangAndCodepage = record
wLanguage : word;
wCodePage : word;
end;
var
TempSize : DWORD;
TempBuffer : pointer;
TempHandle : cardinal;
TempPointer : pointer;
TempSubBlock : ustring;
TempLang : PLangAndCodepage;
TempArray : array of TLangAndCodepage;
i, j : DWORD;
begin
Result := False;
TempBuffer := nil;
TempArray := nil;
aValue := '';
try
try
TempSize := GetFileVersionInfoSizeW(PWideChar(aFileName), TempHandle);
if (TempSize > 0) then
begin
GetMem(TempBuffer, TempSize);
if GetFileVersionInfoW(PWideChar(aFileName), 0, TempSize, TempBuffer) then
begin
if VerQueryValue(TempBuffer, '\VarFileInfo\Translation\', Pointer(TempLang), TempSize) then
begin
i := 0;
j := TempSize div SizeOf(TLangAndCodepage);
SetLength(TempArray, j);
while (i < j) do
begin
TempArray[i].wLanguage := TempLang^.wLanguage;
TempArray[i].wCodePage := TempLang^.wCodePage;
inc(TempLang);
inc(i);
end;
end;
i := 0;
j := Length(TempArray);
while (i < j) and not(Result) do
begin
TempSubBlock := '\StringFileInfo\' +
IntToHex(TempArray[i].wLanguage, 4) + IntToHex(TempArray[i].wCodePage, 4) +
'\' + aField;
if VerQueryValueW(TempBuffer, PWideChar(TempSubBlock), TempPointer, TempSize) then
begin
aValue := trim(PChar(TempPointer));
Result := (length(aValue) > 0);
end;
inc(i);
end;
// Adobe's flash player DLL uses a different codepage to store the StringFileInfo fields
if not(Result) and (j > 0) and (TempArray[0].wCodePage <> 1252) then
begin
TempSubBlock := '\StringFileInfo\' +
IntToHex(TempArray[0].wLanguage, 4) + IntToHex(1252, 4) +
'\' + aField;
if VerQueryValueW(TempBuffer, PWideChar(TempSubBlock), TempPointer, TempSize) then
begin
aValue := trim(PChar(TempPointer));
Result := (length(aValue) > 0);
end;
end;
end;
end;
except
on e : exception do
if CustomExceptionHandler('GetStringFileInfo', e) then raise;
end;
finally
if (TempBuffer <> nil) then FreeMem(TempBuffer);
end;
end;
function GetDLLVersion(const aDLLFile : ustring; var aVersionInfo : TFileVersionInfo) : boolean; function GetDLLVersion(const aDLLFile : ustring; var aVersionInfo : TFileVersionInfo) : boolean;
var var
TempVersion : uint64; TempVersion : uint64;

View File

@@ -2,9 +2,9 @@
"UpdateLazPackages" : [ "UpdateLazPackages" : [
{ {
"ForceNotify" : true, "ForceNotify" : true,
"InternalVersion" : 236, "InternalVersion" : 237,
"Name" : "cef4delphi_lazarus.lpk", "Name" : "cef4delphi_lazarus.lpk",
"Version" : "87.1.13.0" "Version" : "88.1.4.0"
} }
], ],
"UpdatePackageData" : { "UpdatePackageData" : {