mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2024-12-04 09:26:52 +02:00
New ConsoleBrowser demo
This commit is contained in:
parent
139f1dded2
commit
b57d11d6ce
14
demos/ConsoleBrowser/00-DeleteDCUs.bat
Normal file
14
demos/ConsoleBrowser/00-DeleteDCUs.bat
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
del /s /q *.dcu
|
||||||
|
del /s /q *.exe
|
||||||
|
del /s /q *.res
|
||||||
|
del /s /q *.log
|
||||||
|
del /s /q *.dsk
|
||||||
|
del /s /q *.identcache
|
||||||
|
del /s /q *.stat
|
||||||
|
del /s /q *.local
|
||||||
|
del /s /q *.~*
|
||||||
|
rmdir Win32\Debug
|
||||||
|
rmdir Win32\Release
|
||||||
|
rmdir Win32
|
||||||
|
rmdir __history
|
||||||
|
rmdir __recovery
|
79
demos/ConsoleBrowser/ConsoleLoader.dpr
Normal file
79
demos/ConsoleBrowser/ConsoleLoader.dpr
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
// ************************************************************************
|
||||||
|
// ***************************** CEF4Delphi *******************************
|
||||||
|
// ************************************************************************
|
||||||
|
//
|
||||||
|
// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based
|
||||||
|
// browser in Delphi applications.
|
||||||
|
//
|
||||||
|
// The original license of DCEF3 still applies to CEF4Delphi.
|
||||||
|
//
|
||||||
|
// For more information about CEF4Delphi visit :
|
||||||
|
// https://www.briskbard.com/index.php?lang=en&pageid=cef
|
||||||
|
//
|
||||||
|
// Copyright © 2018 Salvador Díaz Fau. All rights reserved.
|
||||||
|
//
|
||||||
|
// ************************************************************************
|
||||||
|
// ************ vvvv Original license and comments below vvvv *************
|
||||||
|
// ************************************************************************
|
||||||
|
(*
|
||||||
|
* Delphi Chromium Embedded 3
|
||||||
|
*
|
||||||
|
* Usage allowed under the restrictions of the Lesser GNU General Public License
|
||||||
|
* or alternatively the restrictions of the Mozilla Public License 1.1
|
||||||
|
*
|
||||||
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
|
||||||
|
* the specific language governing rights and limitations under the License.
|
||||||
|
*
|
||||||
|
* Unit owner : Henri Gourvest <hgourvest@gmail.com>
|
||||||
|
* Web site : http://www.progdigy.com
|
||||||
|
* Repository : http://code.google.com/p/delphichromiumembedded/
|
||||||
|
* Group : http://groups.google.com/group/delphichromiumembedded
|
||||||
|
*
|
||||||
|
* Embarcadero Technologies, Inc is not permitted to use or redistribute
|
||||||
|
* this source code without explicit permission.
|
||||||
|
*
|
||||||
|
*)
|
||||||
|
|
||||||
|
program ConsoleLoader;
|
||||||
|
|
||||||
|
{$APPTYPE CONSOLE}
|
||||||
|
|
||||||
|
{$I cef.inc}
|
||||||
|
|
||||||
|
{$R *.res}
|
||||||
|
|
||||||
|
uses
|
||||||
|
{$IFDEF DELPHI16_UP}
|
||||||
|
WinApi.Windows, System.SysUtils;
|
||||||
|
{$ELSE}
|
||||||
|
Windows, SysUtils;
|
||||||
|
{$ENDIF }
|
||||||
|
|
||||||
|
procedure InitializeCEF4Delphi; stdcall; external 'OSRDLLBrowser.dll';
|
||||||
|
procedure FinalizeCEF4Delphi; stdcall; external 'OSRDLLBrowser.dll';
|
||||||
|
procedure ShowBrowser; stdcall; external 'OSRDLLBrowser.dll';
|
||||||
|
|
||||||
|
// CEF3 needs to set the LARGEADDRESSAWARE flag which allows 32-bit processes to use up to 3GB of RAM.
|
||||||
|
{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
|
||||||
|
|
||||||
|
procedure ExecuteProgram;
|
||||||
|
var
|
||||||
|
TempKey : char;
|
||||||
|
begin
|
||||||
|
Write('Press ENTER to show a web browser created in a Delphi DLL :');
|
||||||
|
Read(TempKey);
|
||||||
|
|
||||||
|
InitializeCEF4Delphi;
|
||||||
|
ShowBrowser;
|
||||||
|
FinalizeCEF4Delphi;
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ExecuteProgram;
|
||||||
|
except
|
||||||
|
on E: Exception do
|
||||||
|
Writeln('Error : ', E.Message);
|
||||||
|
end;
|
||||||
|
end.
|
576
demos/ConsoleBrowser/ConsoleLoader.dproj
Normal file
576
demos/ConsoleBrowser/ConsoleLoader.dproj
Normal file
@ -0,0 +1,576 @@
|
|||||||
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ProjectGuid>{858411CB-BCF0-45AC-9723-BCDF2D2236BF}</ProjectGuid>
|
||||||
|
<ProjectVersion>18.2</ProjectVersion>
|
||||||
|
<FrameworkType>None</FrameworkType>
|
||||||
|
<MainSource>ConsoleLoader.dpr</MainSource>
|
||||||
|
<Base>True</Base>
|
||||||
|
<Config Condition="'$(Config)'==''">Debug</Config>
|
||||||
|
<Platform Condition="'$(Platform)'==''">Win32</Platform>
|
||||||
|
<TargetedPlatforms>1</TargetedPlatforms>
|
||||||
|
<AppType>Console</AppType>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
|
||||||
|
<Base_Win32>true</Base_Win32>
|
||||||
|
<CfgParent>Base</CfgParent>
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
|
||||||
|
<Base_Win64>true</Base_Win64>
|
||||||
|
<CfgParent>Base</CfgParent>
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
|
||||||
|
<Cfg_1>true</Cfg_1>
|
||||||
|
<CfgParent>Base</CfgParent>
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
|
||||||
|
<Cfg_1_Win32>true</Cfg_1_Win32>
|
||||||
|
<CfgParent>Cfg_1</CfgParent>
|
||||||
|
<Cfg_1>true</Cfg_1>
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
|
||||||
|
<Cfg_2>true</Cfg_2>
|
||||||
|
<CfgParent>Base</CfgParent>
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Base)'!=''">
|
||||||
|
<DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
|
||||||
|
<DCC_ExeOutput>..\..\bin</DCC_ExeOutput>
|
||||||
|
<DCC_E>false</DCC_E>
|
||||||
|
<DCC_N>false</DCC_N>
|
||||||
|
<DCC_S>false</DCC_S>
|
||||||
|
<DCC_F>false</DCC_F>
|
||||||
|
<DCC_K>false</DCC_K>
|
||||||
|
<DCC_UsePackage>RESTComponents;emsclientfiredac;FireDAC;FireDACSqliteDriver;soaprtl;FireDACIBDriver;soapmidas;FireDACCommon;emsclient;RESTBackendComponents;soapserver;FireDACCommonDriver;CloudService;inet;$(DCC_UsePackage)</DCC_UsePackage>
|
||||||
|
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)</DCC_Namespace>
|
||||||
|
<SanitizedProjectName>ConsoleLoader</SanitizedProjectName>
|
||||||
|
<VerInfo_Locale>3082</VerInfo_Locale>
|
||||||
|
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Base_Win32)'!=''">
|
||||||
|
<DCC_UsePackage>DBXSqliteDriver;bindcompdbx;fmxase;DBXDb2Driver;DBXInterBaseDriver;vcl;DBXSybaseASEDriver;vclactnband;vclFireDAC;FireDACDb2Driver;DataSnapFireDAC;svnui;tethering;dsnapcon;FireDACADSDriver;FireDACMSAccDriver;fmxFireDAC;DBXMSSQLDriver;vclimg;FireDACInfxDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;svn;FireDACPgDriver;DBXOracleDriver;inetdb;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;DbxCommonDriver;IndyProtocols240;IndySystem240;fmx;DataSnapServer;xmlrtl;DataSnapNativeClient;fmxobj;fmxdae;vclwinx;rtl;FireDACDSDriver;DbxClientDriver;IndyCore240;DBXSybaseASADriver;CustomIPTransport;vcldsnap;dbexpress;FireDACDBXDriver;vclx;bindcomp;appanalytics;dsnap;DataSnapCommon;DBXInformixDriver;bindcompvcl;DataSnapConnectors;VCLRESTComponents;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;vclie;CEF4Delphi_FMX;bindengine;DBXMySQLDriver;FireDACOracleDriver;dsnapxml;FireDACMySQLDriver;dbrtl;inetdbxpress;DBXFirebirdDriver;DataSnapProviderClient;FireDACMongoDBDriver;FireDACCommonODBC;DataSnapClient;DataSnapServerMidas;$(DCC_UsePackage)</DCC_UsePackage>
|
||||||
|
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
|
||||||
|
<BT_BuildType>Debug</BT_BuildType>
|
||||||
|
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||||
|
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||||
|
<DCC_ConsoleTarget>true</DCC_ConsoleTarget>
|
||||||
|
<UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
|
||||||
|
<UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Base_Win64)'!=''">
|
||||||
|
<DCC_UsePackage>DBXSqliteDriver;bindcompdbx;fmxase;DBXDb2Driver;DBXInterBaseDriver;vcl;DBXSybaseASEDriver;vclactnband;vclFireDAC;FireDACDb2Driver;DataSnapFireDAC;tethering;dsnapcon;FireDACADSDriver;FireDACMSAccDriver;fmxFireDAC;DBXMSSQLDriver;vclimg;FireDACInfxDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;FireDACPgDriver;DBXOracleDriver;inetdb;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;DbxCommonDriver;IndyProtocols240;IndySystem240;fmx;DataSnapServer;xmlrtl;DataSnapNativeClient;fmxobj;fmxdae;vclwinx;rtl;FireDACDSDriver;DbxClientDriver;IndyCore240;DBXSybaseASADriver;CustomIPTransport;vcldsnap;dbexpress;FireDACDBXDriver;vclx;bindcomp;appanalytics;dsnap;DataSnapCommon;DBXInformixDriver;bindcompvcl;DataSnapConnectors;VCLRESTComponents;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;vclie;bindengine;DBXMySQLDriver;FireDACOracleDriver;dsnapxml;FireDACMySQLDriver;dbrtl;inetdbxpress;DBXFirebirdDriver;DataSnapProviderClient;FireDACMongoDBDriver;FireDACCommonODBC;DataSnapClient;DataSnapServerMidas;$(DCC_UsePackage)</DCC_UsePackage>
|
||||||
|
<DCC_ConsoleTarget>true</DCC_ConsoleTarget>
|
||||||
|
<UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
|
||||||
|
<UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Cfg_1)'!=''">
|
||||||
|
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
|
||||||
|
<DCC_DebugDCUs>true</DCC_DebugDCUs>
|
||||||
|
<DCC_Optimize>false</DCC_Optimize>
|
||||||
|
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
|
||||||
|
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
|
||||||
|
<DCC_RemoteDebug>true</DCC_RemoteDebug>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
|
||||||
|
<DCC_RemoteDebug>false</DCC_RemoteDebug>
|
||||||
|
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||||
|
<Manifest_File>(None)</Manifest_File>
|
||||||
|
<AppEnableHighDPI>true</AppEnableHighDPI>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Cfg_2)'!=''">
|
||||||
|
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
|
||||||
|
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
|
||||||
|
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
|
||||||
|
<DCC_DebugInformation>0</DCC_DebugInformation>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<DelphiCompile Include="$(MainSource)">
|
||||||
|
<MainSource>MainSource</MainSource>
|
||||||
|
</DelphiCompile>
|
||||||
|
<BuildConfiguration Include="Release">
|
||||||
|
<Key>Cfg_2</Key>
|
||||||
|
<CfgParent>Base</CfgParent>
|
||||||
|
</BuildConfiguration>
|
||||||
|
<BuildConfiguration Include="Base">
|
||||||
|
<Key>Base</Key>
|
||||||
|
</BuildConfiguration>
|
||||||
|
<BuildConfiguration Include="Debug">
|
||||||
|
<Key>Cfg_1</Key>
|
||||||
|
<CfgParent>Base</CfgParent>
|
||||||
|
</BuildConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<ProjectExtensions>
|
||||||
|
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
|
||||||
|
<Borland.ProjectType>Application</Borland.ProjectType>
|
||||||
|
<BorlandProject>
|
||||||
|
<Delphi.Personality>
|
||||||
|
<Source>
|
||||||
|
<Source Name="MainSource">ConsoleLoader.dpr</Source>
|
||||||
|
</Source>
|
||||||
|
<Excluded_Packages>
|
||||||
|
<Excluded_Packages Name="$(BDSBIN)\dclIPIndyImpl250.bpl">IP Abstraction Indy Implementation Design Time</Excluded_Packages>
|
||||||
|
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k250.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||||
|
<Excluded_Packages Name="$(BDSBIN)\dclofficexp250.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||||
|
</Excluded_Packages>
|
||||||
|
</Delphi.Personality>
|
||||||
|
<Deployment Version="3">
|
||||||
|
<DeployFile LocalName="$(BDS)\Redist\osx32\libcgunwind.1.0.dylib" Class="DependencyModule">
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<Overwrite>true</Overwrite>
|
||||||
|
</Platform>
|
||||||
|
</DeployFile>
|
||||||
|
<DeployFile LocalName="$(BDS)\Redist\iossimulator\libcgunwind.1.0.dylib" Class="DependencyModule">
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Overwrite>true</Overwrite>
|
||||||
|
</Platform>
|
||||||
|
</DeployFile>
|
||||||
|
<DeployFile LocalName="$(BDS)\Redist\iossimulator\libPCRE.dylib" Class="DependencyModule">
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Overwrite>true</Overwrite>
|
||||||
|
</Platform>
|
||||||
|
</DeployFile>
|
||||||
|
<DeployFile LocalName="$(BDS)\Redist\osx32\libcgsqlite3.dylib" Class="DependencyModule">
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<Overwrite>true</Overwrite>
|
||||||
|
</Platform>
|
||||||
|
</DeployFile>
|
||||||
|
<DeployFile LocalName="Win32\Debug\ConsoleLoader.exe" Configuration="Debug" Class="ProjectOutput">
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<RemoteName>ConsoleLoader.exe</RemoteName>
|
||||||
|
<Overwrite>true</Overwrite>
|
||||||
|
</Platform>
|
||||||
|
</DeployFile>
|
||||||
|
<DeployClass Name="AdditionalDebugSymbols">
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||||
|
<Operation>0</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="AndroidClassesDexFile">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>classes</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="AndroidGDBServer">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="AndroidLibnativeArmeabiFile">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>library\lib\armeabi</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="AndroidLibnativeMipsFile">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>library\lib\mips</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="AndroidServiceOutput">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="AndroidSplashImageDef">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="AndroidSplashStyles">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\values</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="Android_DefaultAppIcon">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="Android_LauncherIcon144">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="Android_LauncherIcon36">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable-ldpi</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="Android_LauncherIcon48">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable-mdpi</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="Android_LauncherIcon72">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable-hdpi</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="Android_LauncherIcon96">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable-xhdpi</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="Android_SplashImage426">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable-small</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="Android_SplashImage470">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable-normal</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="Android_SplashImage640">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable-large</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="Android_SplashImage960">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable-xlarge</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="DebugSymbols">
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<Operation>0</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="DependencyFramework">
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
<Extensions>.framework</Extensions>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<Operation>0</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="DependencyModule">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
<Extensions>.dylib</Extensions>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
<Extensions>.dylib</Extensions>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
<Extensions>.dylib</Extensions>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
<Extensions>.dylib</Extensions>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<Operation>0</Operation>
|
||||||
|
<Extensions>.dll;.bpl</Extensions>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Required="true" Name="DependencyPackage">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
<Extensions>.dylib</Extensions>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
<Extensions>.dylib</Extensions>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
<Extensions>.dylib</Extensions>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
<Extensions>.dylib</Extensions>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<Operation>0</Operation>
|
||||||
|
<Extensions>.bpl</Extensions>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="File">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<Operation>0</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>0</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>0</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>0</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<RemoteDir>Contents\Resources\StartUp\</RemoteDir>
|
||||||
|
<Operation>0</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<Operation>0</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="iPad_Launch1024">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="iPad_Launch1536">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="iPad_Launch2048">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="iPad_Launch768">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="iPhone_Launch320">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="iPhone_Launch640">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="iPhone_Launch640x1136">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="ProjectAndroidManifest">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="ProjectiOSDeviceDebug">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="ProjectiOSDeviceResourceRules">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="ProjectiOSEntitlements">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<RemoteDir>..\</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<RemoteDir>..\</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="ProjectiOSInfoPList">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="ProjectiOSResource">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="ProjectOSXEntitlements">
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<RemoteDir>..\</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="ProjectOSXInfoPList">
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<RemoteDir>Contents</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="ProjectOSXResource">
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<RemoteDir>Contents\Resources</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Required="true" Name="ProjectOutput">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Linux64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<Operation>0</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="ProjectUWPManifest">
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Win64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="UWP_DelphiLogo150">
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<RemoteDir>Assets</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Win64">
|
||||||
|
<RemoteDir>Assets</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="UWP_DelphiLogo44">
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<RemoteDir>Assets</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Win64">
|
||||||
|
<RemoteDir>Assets</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
|
||||||
|
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
|
||||||
|
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
|
||||||
|
<ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
|
||||||
|
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
|
||||||
|
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME).app"/>
|
||||||
|
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
|
||||||
|
<ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
|
||||||
|
</Deployment>
|
||||||
|
<Platforms>
|
||||||
|
<Platform value="Linux64">False</Platform>
|
||||||
|
<Platform value="Win32">True</Platform>
|
||||||
|
<Platform value="Win64">False</Platform>
|
||||||
|
</Platforms>
|
||||||
|
</BorlandProject>
|
||||||
|
<ProjectFileVersion>12</ProjectFileVersion>
|
||||||
|
</ProjectExtensions>
|
||||||
|
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
|
||||||
|
<Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
|
||||||
|
<Import Project="$(MSBuildProjectName).deployproj" Condition="Exists('$(MSBuildProjectName).deployproj')"/>
|
||||||
|
</Project>
|
144
demos/ConsoleBrowser/OSRDLLBrowser.dpr
Normal file
144
demos/ConsoleBrowser/OSRDLLBrowser.dpr
Normal file
@ -0,0 +1,144 @@
|
|||||||
|
// ************************************************************************
|
||||||
|
// ***************************** CEF4Delphi *******************************
|
||||||
|
// ************************************************************************
|
||||||
|
//
|
||||||
|
// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based
|
||||||
|
// browser in Delphi applications.
|
||||||
|
//
|
||||||
|
// The original license of DCEF3 still applies to CEF4Delphi.
|
||||||
|
//
|
||||||
|
// For more information about CEF4Delphi visit :
|
||||||
|
// https://www.briskbard.com/index.php?lang=en&pageid=cef
|
||||||
|
//
|
||||||
|
// Copyright © 2018 Salvador Díaz Fau. All rights reserved.
|
||||||
|
//
|
||||||
|
// ************************************************************************
|
||||||
|
// ************ vvvv Original license and comments below vvvv *************
|
||||||
|
// ************************************************************************
|
||||||
|
(*
|
||||||
|
* Delphi Chromium Embedded 3
|
||||||
|
*
|
||||||
|
* Usage allowed under the restrictions of the Lesser GNU General Public License
|
||||||
|
* or alternatively the restrictions of the Mozilla Public License 1.1
|
||||||
|
*
|
||||||
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
|
||||||
|
* the specific language governing rights and limitations under the License.
|
||||||
|
*
|
||||||
|
* Unit owner : Henri Gourvest <hgourvest@gmail.com>
|
||||||
|
* Web site : http://www.progdigy.com
|
||||||
|
* Repository : http://code.google.com/p/delphichromiumembedded/
|
||||||
|
* Group : http://groups.google.com/group/delphichromiumembedded
|
||||||
|
*
|
||||||
|
* Embarcadero Technologies, Inc is not permitted to use or redistribute
|
||||||
|
* this source code without explicit permission.
|
||||||
|
*
|
||||||
|
*)
|
||||||
|
|
||||||
|
library OSRDLLBrowser;
|
||||||
|
|
||||||
|
{ Important note about DLL memory management: ShareMem must be the
|
||||||
|
first unit in your library's USES clause AND your project's (select
|
||||||
|
Project-View Source) USES clause if your DLL exports any procedures or
|
||||||
|
functions that pass strings as parameters or function results. This
|
||||||
|
applies to all strings passed to and from your DLL--even those that
|
||||||
|
are nested in records and classes. ShareMem is the interface unit to
|
||||||
|
the BORLNDMM.DLL shared memory manager, which must be deployed along
|
||||||
|
with your DLL. To avoid using BORLNDMM.DLL, pass string information
|
||||||
|
using PChar or ShortString parameters. }
|
||||||
|
|
||||||
|
{$I cef.inc}
|
||||||
|
|
||||||
|
uses
|
||||||
|
{$IFDEF DELPHI16_UP}
|
||||||
|
System.SysUtils,
|
||||||
|
{$ELSE}
|
||||||
|
SysUtils,
|
||||||
|
{$ENDIF }
|
||||||
|
uCEFApplication,
|
||||||
|
uCEFConstants,
|
||||||
|
uWebBrowser in 'uWebBrowser.pas' {WebBrowserFrm};
|
||||||
|
|
||||||
|
{$R *.res}
|
||||||
|
|
||||||
|
|
||||||
|
// This is the simplest way to create a DLL with all that it's necessary to show a
|
||||||
|
// Chromium based browser using CEF4Delphi
|
||||||
|
|
||||||
|
// This demo uses the OSR mode and disables the multithreaded mode. For this reason, the ShowBrowser
|
||||||
|
// functions calls GlobalCEFApp.RunMessageLoop and the browser form calls GlobalCEFApp.QuitMessageLoop as the last step in
|
||||||
|
// the form destruction.
|
||||||
|
|
||||||
|
// To test this demo you need to build the ConsoleLoader, OSRDLLBrowser and OSRSubProcess projects found in this directory.
|
||||||
|
|
||||||
|
// CEF3 needs to be initialized and finalized outside the DLL's initialization and
|
||||||
|
// finalization sections. For this reason, you need to call InitializeCEF4Delphi
|
||||||
|
// after you load this DLL and you also need to call FinalizeCEF4Delphi before
|
||||||
|
// unloading this DLL.
|
||||||
|
|
||||||
|
// CEF3 can only be initialized once per process and this means that :
|
||||||
|
// 1. You can only call InitializeCEF4Delphi and FinalizeCEF4Delphi once.
|
||||||
|
// 2. If you use a DLL like this as a plugin and there's another loaded plugin using
|
||||||
|
// CEF you will have problems.
|
||||||
|
|
||||||
|
// When you use CEF in a DLL you must use a different EXE for the subprocesses and that EXE
|
||||||
|
// must configure GlobalCEFApp with the same properties.
|
||||||
|
|
||||||
|
// ***************************
|
||||||
|
// This demo is incomplete!!!!
|
||||||
|
// ***************************
|
||||||
|
// As all other demos, you need to close all web browsers before calling FinalizeCEF4Delphi.
|
||||||
|
// All the browsers must be closed following the destruction sequence described in uWebBrowser.pas.
|
||||||
|
|
||||||
|
procedure InitializeCEF4Delphi; stdcall;
|
||||||
|
begin
|
||||||
|
GlobalCEFApp := TCefApplication.Create;
|
||||||
|
|
||||||
|
// In case you want to use custom directories for the CEF3 binaries, cache, cookies and user data.
|
||||||
|
// If you don't set a cache directory the browser will use in-memory cache.
|
||||||
|
// The cache, cookies and user data directories must be writable.
|
||||||
|
{
|
||||||
|
GlobalCEFApp.FrameworkDirPath := 'cef';
|
||||||
|
GlobalCEFApp.ResourcesDirPath := 'cef';
|
||||||
|
GlobalCEFApp.LocalesDirPath := 'cef\locales';
|
||||||
|
GlobalCEFApp.cache := 'cef\cache';
|
||||||
|
GlobalCEFApp.cookies := 'cef\cookies';
|
||||||
|
GlobalCEFApp.UserDataPath := 'cef\User Data';
|
||||||
|
GlobalCEFApp.LogFile := 'debug.log';
|
||||||
|
GlobalCEFApp.LogSeverity := LOGSEVERITY_INFO;
|
||||||
|
}
|
||||||
|
|
||||||
|
GlobalCEFApp.WindowlessRenderingEnabled := True;
|
||||||
|
GlobalCEFApp.EnableHighDPISupport := True;
|
||||||
|
GlobalCEFApp.SetCurrentDir := True;
|
||||||
|
GlobalCEFApp.BrowserSubprocessPath := 'OSRSubProcess.exe';
|
||||||
|
GlobalCEFApp.ExternalMessagePump := False;
|
||||||
|
GlobalCEFApp.MultiThreadedMessageLoop := False;
|
||||||
|
|
||||||
|
// This demo uses a different EXE for the subprocesses.
|
||||||
|
// With this configuration it's not necessary to have the
|
||||||
|
// GlobalCEFApp.StartMainProcess call in a if..then clause.
|
||||||
|
|
||||||
|
GlobalCEFApp.StartMainProcess;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure FinalizeCEF4Delphi; stdcall;
|
||||||
|
begin
|
||||||
|
DestroyGlobalCEFApp;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure ShowBrowser; stdcall;
|
||||||
|
begin
|
||||||
|
WebBrowserFrm := TWebBrowserFrm.Create(nil);
|
||||||
|
WebBrowserFrm.Show;
|
||||||
|
GlobalCEFApp.RunMessageLoop;
|
||||||
|
end;
|
||||||
|
|
||||||
|
exports
|
||||||
|
InitializeCEF4Delphi,
|
||||||
|
FinalizeCEF4Delphi,
|
||||||
|
ShowBrowser;
|
||||||
|
|
||||||
|
begin
|
||||||
|
//
|
||||||
|
end.
|
575
demos/ConsoleBrowser/OSRDLLBrowser.dproj
Normal file
575
demos/ConsoleBrowser/OSRDLLBrowser.dproj
Normal file
@ -0,0 +1,575 @@
|
|||||||
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ProjectGuid>{1FC0DDFD-096D-4CF6-9F5C-81A99053956E}</ProjectGuid>
|
||||||
|
<ProjectVersion>18.2</ProjectVersion>
|
||||||
|
<FrameworkType>VCL</FrameworkType>
|
||||||
|
<MainSource>OSRDLLBrowser.dpr</MainSource>
|
||||||
|
<Base>True</Base>
|
||||||
|
<Config Condition="'$(Config)'==''">Debug</Config>
|
||||||
|
<Platform Condition="'$(Platform)'==''">Win32</Platform>
|
||||||
|
<TargetedPlatforms>1</TargetedPlatforms>
|
||||||
|
<AppType>Library</AppType>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
|
||||||
|
<Base_Win32>true</Base_Win32>
|
||||||
|
<CfgParent>Base</CfgParent>
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
|
||||||
|
<Base_Win64>true</Base_Win64>
|
||||||
|
<CfgParent>Base</CfgParent>
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
|
||||||
|
<Cfg_1>true</Cfg_1>
|
||||||
|
<CfgParent>Base</CfgParent>
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
|
||||||
|
<Cfg_1_Win32>true</Cfg_1_Win32>
|
||||||
|
<CfgParent>Cfg_1</CfgParent>
|
||||||
|
<Cfg_1>true</Cfg_1>
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
|
||||||
|
<Cfg_2>true</Cfg_2>
|
||||||
|
<CfgParent>Base</CfgParent>
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Base)'!=''">
|
||||||
|
<DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
|
||||||
|
<DCC_ExeOutput>..\..\bin</DCC_ExeOutput>
|
||||||
|
<DCC_E>false</DCC_E>
|
||||||
|
<DCC_N>false</DCC_N>
|
||||||
|
<DCC_S>false</DCC_S>
|
||||||
|
<DCC_F>false</DCC_F>
|
||||||
|
<DCC_K>false</DCC_K>
|
||||||
|
<GenDll>true</GenDll>
|
||||||
|
<DCC_UsePackage>RESTComponents;emsclientfiredac;FireDAC;FireDACSqliteDriver;soaprtl;FireDACIBDriver;soapmidas;FireDACCommon;emsclient;RESTBackendComponents;soapserver;FireDACCommonDriver;CloudService;inet;$(DCC_UsePackage)</DCC_UsePackage>
|
||||||
|
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace)</DCC_Namespace>
|
||||||
|
<SanitizedProjectName>OSRDLLBrowser</SanitizedProjectName>
|
||||||
|
<VerInfo_Locale>3082</VerInfo_Locale>
|
||||||
|
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Base_Win32)'!=''">
|
||||||
|
<DCC_UsePackage>DBXSqliteDriver;bindcompdbx;fmxase;DBXDb2Driver;DBXInterBaseDriver;vcl;DBXSybaseASEDriver;vclactnband;vclFireDAC;FireDACDb2Driver;DataSnapFireDAC;svnui;tethering;dsnapcon;FireDACADSDriver;FireDACMSAccDriver;fmxFireDAC;DBXMSSQLDriver;vclimg;FireDACInfxDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;svn;FireDACPgDriver;DBXOracleDriver;inetdb;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;DbxCommonDriver;IndyProtocols240;IndySystem240;fmx;DataSnapServer;xmlrtl;DataSnapNativeClient;fmxobj;fmxdae;vclwinx;rtl;FireDACDSDriver;DbxClientDriver;IndyCore240;DBXSybaseASADriver;CustomIPTransport;vcldsnap;dbexpress;FireDACDBXDriver;vclx;bindcomp;appanalytics;dsnap;DataSnapCommon;DBXInformixDriver;bindcompvcl;DataSnapConnectors;VCLRESTComponents;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;vclie;CEF4Delphi_FMX;bindengine;DBXMySQLDriver;FireDACOracleDriver;dsnapxml;FireDACMySQLDriver;dbrtl;inetdbxpress;DBXFirebirdDriver;DataSnapProviderClient;FireDACMongoDBDriver;FireDACCommonODBC;DataSnapClient;DataSnapServerMidas;$(DCC_UsePackage)</DCC_UsePackage>
|
||||||
|
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
|
||||||
|
<BT_BuildType>Debug</BT_BuildType>
|
||||||
|
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||||
|
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||||
|
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Base_Win64)'!=''">
|
||||||
|
<DCC_UsePackage>DBXSqliteDriver;bindcompdbx;fmxase;DBXDb2Driver;DBXInterBaseDriver;vcl;DBXSybaseASEDriver;vclactnband;vclFireDAC;FireDACDb2Driver;DataSnapFireDAC;tethering;dsnapcon;FireDACADSDriver;FireDACMSAccDriver;fmxFireDAC;DBXMSSQLDriver;vclimg;FireDACInfxDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;FireDACPgDriver;DBXOracleDriver;inetdb;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;DbxCommonDriver;IndyProtocols240;IndySystem240;fmx;DataSnapServer;xmlrtl;DataSnapNativeClient;fmxobj;fmxdae;vclwinx;rtl;FireDACDSDriver;DbxClientDriver;IndyCore240;DBXSybaseASADriver;CustomIPTransport;vcldsnap;dbexpress;FireDACDBXDriver;vclx;bindcomp;appanalytics;dsnap;DataSnapCommon;DBXInformixDriver;bindcompvcl;DataSnapConnectors;VCLRESTComponents;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;vclie;bindengine;DBXMySQLDriver;FireDACOracleDriver;dsnapxml;FireDACMySQLDriver;dbrtl;inetdbxpress;DBXFirebirdDriver;DataSnapProviderClient;FireDACMongoDBDriver;FireDACCommonODBC;DataSnapClient;DataSnapServerMidas;$(DCC_UsePackage)</DCC_UsePackage>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Cfg_1)'!=''">
|
||||||
|
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
|
||||||
|
<DCC_DebugDCUs>true</DCC_DebugDCUs>
|
||||||
|
<DCC_Optimize>false</DCC_Optimize>
|
||||||
|
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
|
||||||
|
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
|
||||||
|
<DCC_RemoteDebug>true</DCC_RemoteDebug>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
|
||||||
|
<DCC_RemoteDebug>false</DCC_RemoteDebug>
|
||||||
|
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||||
|
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||||
|
<Manifest_File>(None)</Manifest_File>
|
||||||
|
<Debugger_HostApplication>C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\bin\ConsoleLoader.exe</Debugger_HostApplication>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Cfg_2)'!=''">
|
||||||
|
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
|
||||||
|
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
|
||||||
|
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
|
||||||
|
<DCC_DebugInformation>0</DCC_DebugInformation>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<DelphiCompile Include="$(MainSource)">
|
||||||
|
<MainSource>MainSource</MainSource>
|
||||||
|
</DelphiCompile>
|
||||||
|
<DCCReference Include="uWebBrowser.pas">
|
||||||
|
<Form>WebBrowserFrm</Form>
|
||||||
|
</DCCReference>
|
||||||
|
<BuildConfiguration Include="Release">
|
||||||
|
<Key>Cfg_2</Key>
|
||||||
|
<CfgParent>Base</CfgParent>
|
||||||
|
</BuildConfiguration>
|
||||||
|
<BuildConfiguration Include="Base">
|
||||||
|
<Key>Base</Key>
|
||||||
|
</BuildConfiguration>
|
||||||
|
<BuildConfiguration Include="Debug">
|
||||||
|
<Key>Cfg_1</Key>
|
||||||
|
<CfgParent>Base</CfgParent>
|
||||||
|
</BuildConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<ProjectExtensions>
|
||||||
|
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
|
||||||
|
<Borland.ProjectType>Application</Borland.ProjectType>
|
||||||
|
<BorlandProject>
|
||||||
|
<Delphi.Personality>
|
||||||
|
<Source>
|
||||||
|
<Source Name="MainSource">OSRDLLBrowser.dpr</Source>
|
||||||
|
</Source>
|
||||||
|
<Excluded_Packages>
|
||||||
|
<Excluded_Packages Name="$(BDSBIN)\dclIPIndyImpl250.bpl">IP Abstraction Indy Implementation Design Time</Excluded_Packages>
|
||||||
|
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k250.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||||
|
<Excluded_Packages Name="$(BDSBIN)\dclofficexp250.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||||
|
</Excluded_Packages>
|
||||||
|
</Delphi.Personality>
|
||||||
|
<Deployment Version="3">
|
||||||
|
<DeployFile LocalName="$(BDS)\Redist\osx32\libcgunwind.1.0.dylib" Class="DependencyModule">
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<Overwrite>true</Overwrite>
|
||||||
|
</Platform>
|
||||||
|
</DeployFile>
|
||||||
|
<DeployFile LocalName="$(BDS)\Redist\iossimulator\libcgunwind.1.0.dylib" Class="DependencyModule">
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Overwrite>true</Overwrite>
|
||||||
|
</Platform>
|
||||||
|
</DeployFile>
|
||||||
|
<DeployFile LocalName="$(BDS)\Redist\iossimulator\libPCRE.dylib" Class="DependencyModule">
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Overwrite>true</Overwrite>
|
||||||
|
</Platform>
|
||||||
|
</DeployFile>
|
||||||
|
<DeployFile LocalName="$(BDS)\Redist\osx32\libcgsqlite3.dylib" Class="DependencyModule">
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<Overwrite>true</Overwrite>
|
||||||
|
</Platform>
|
||||||
|
</DeployFile>
|
||||||
|
<DeployFile LocalName="..\..\bin\OSRDLLBrowser.dll" Configuration="Debug" Class="ProjectOutput">
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<RemoteName>OSRDLLBrowser.dll</RemoteName>
|
||||||
|
<Overwrite>true</Overwrite>
|
||||||
|
</Platform>
|
||||||
|
</DeployFile>
|
||||||
|
<DeployClass Name="AdditionalDebugSymbols">
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||||
|
<Operation>0</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="AndroidClassesDexFile">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>classes</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="AndroidGDBServer">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="AndroidLibnativeArmeabiFile">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>library\lib\armeabi</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="AndroidLibnativeMipsFile">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>library\lib\mips</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="AndroidServiceOutput">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="AndroidSplashImageDef">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="AndroidSplashStyles">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\values</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="Android_DefaultAppIcon">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="Android_LauncherIcon144">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="Android_LauncherIcon36">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable-ldpi</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="Android_LauncherIcon48">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable-mdpi</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="Android_LauncherIcon72">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable-hdpi</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="Android_LauncherIcon96">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable-xhdpi</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="Android_SplashImage426">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable-small</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="Android_SplashImage470">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable-normal</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="Android_SplashImage640">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable-large</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="Android_SplashImage960">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable-xlarge</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="DebugSymbols">
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<Operation>0</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="DependencyFramework">
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
<Extensions>.framework</Extensions>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<Operation>0</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="DependencyModule">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
<Extensions>.dylib</Extensions>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
<Extensions>.dylib</Extensions>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
<Extensions>.dylib</Extensions>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
<Extensions>.dylib</Extensions>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<Operation>0</Operation>
|
||||||
|
<Extensions>.dll;.bpl</Extensions>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Required="true" Name="DependencyPackage">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
<Extensions>.dylib</Extensions>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
<Extensions>.dylib</Extensions>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
<Extensions>.dylib</Extensions>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
<Extensions>.dylib</Extensions>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<Operation>0</Operation>
|
||||||
|
<Extensions>.bpl</Extensions>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="File">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<Operation>0</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>0</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>0</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>0</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<RemoteDir>Contents\Resources\StartUp\</RemoteDir>
|
||||||
|
<Operation>0</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<Operation>0</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="iPad_Launch1024">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="iPad_Launch1536">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="iPad_Launch2048">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="iPad_Launch768">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="iPhone_Launch320">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="iPhone_Launch640">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="iPhone_Launch640x1136">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="ProjectAndroidManifest">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="ProjectiOSDeviceDebug">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="ProjectiOSDeviceResourceRules">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="ProjectiOSEntitlements">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<RemoteDir>..\</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<RemoteDir>..\</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="ProjectiOSInfoPList">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="ProjectiOSResource">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="ProjectOSXEntitlements">
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<RemoteDir>..\</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="ProjectOSXInfoPList">
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<RemoteDir>Contents</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="ProjectOSXResource">
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<RemoteDir>Contents\Resources</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Required="true" Name="ProjectOutput">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Linux64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<Operation>0</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="ProjectUWPManifest">
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Win64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="UWP_DelphiLogo150">
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<RemoteDir>Assets</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Win64">
|
||||||
|
<RemoteDir>Assets</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="UWP_DelphiLogo44">
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<RemoteDir>Assets</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Win64">
|
||||||
|
<RemoteDir>Assets</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
|
||||||
|
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
|
||||||
|
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
|
||||||
|
<ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
|
||||||
|
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
|
||||||
|
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME).app"/>
|
||||||
|
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
|
||||||
|
<ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
|
||||||
|
</Deployment>
|
||||||
|
<Platforms>
|
||||||
|
<Platform value="Win32">True</Platform>
|
||||||
|
<Platform value="Win64">False</Platform>
|
||||||
|
</Platforms>
|
||||||
|
</BorlandProject>
|
||||||
|
<ProjectFileVersion>12</ProjectFileVersion>
|
||||||
|
</ProjectExtensions>
|
||||||
|
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
|
||||||
|
<Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
|
||||||
|
<Import Project="$(MSBuildProjectName).deployproj" Condition="Exists('$(MSBuildProjectName).deployproj')"/>
|
||||||
|
</Project>
|
87
demos/ConsoleBrowser/OSRSubProcess.dpr
Normal file
87
demos/ConsoleBrowser/OSRSubProcess.dpr
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
// ************************************************************************
|
||||||
|
// ***************************** CEF4Delphi *******************************
|
||||||
|
// ************************************************************************
|
||||||
|
//
|
||||||
|
// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based
|
||||||
|
// browser in Delphi applications.
|
||||||
|
//
|
||||||
|
// The original license of DCEF3 still applies to CEF4Delphi.
|
||||||
|
//
|
||||||
|
// For more information about CEF4Delphi visit :
|
||||||
|
// https://www.briskbard.com/index.php?lang=en&pageid=cef
|
||||||
|
//
|
||||||
|
// Copyright © 2018 Salvador Díaz Fau. All rights reserved.
|
||||||
|
//
|
||||||
|
// ************************************************************************
|
||||||
|
// ************ vvvv Original license and comments below vvvv *************
|
||||||
|
// ************************************************************************
|
||||||
|
(*
|
||||||
|
* Delphi Chromium Embedded 3
|
||||||
|
*
|
||||||
|
* Usage allowed under the restrictions of the Lesser GNU General Public License
|
||||||
|
* or alternatively the restrictions of the Mozilla Public License 1.1
|
||||||
|
*
|
||||||
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
|
||||||
|
* the specific language governing rights and limitations under the License.
|
||||||
|
*
|
||||||
|
* Unit owner : Henri Gourvest <hgourvest@gmail.com>
|
||||||
|
* Web site : http://www.progdigy.com
|
||||||
|
* Repository : http://code.google.com/p/delphichromiumembedded/
|
||||||
|
* Group : http://groups.google.com/group/delphichromiumembedded
|
||||||
|
*
|
||||||
|
* Embarcadero Technologies, Inc is not permitted to use or redistribute
|
||||||
|
* this source code without explicit permission.
|
||||||
|
*
|
||||||
|
*)
|
||||||
|
|
||||||
|
program OSRSubProcess;
|
||||||
|
|
||||||
|
{$I cef.inc}
|
||||||
|
|
||||||
|
uses
|
||||||
|
{$IFDEF DELPHI16_UP}
|
||||||
|
WinApi.Windows,
|
||||||
|
{$ELSE}
|
||||||
|
Windows,
|
||||||
|
{$ENDIF}
|
||||||
|
uCEFApplication,
|
||||||
|
uCEFConstants;
|
||||||
|
|
||||||
|
// CEF3 needs to set the LARGEADDRESSAWARE flag which allows 32-bit processes to use up to 3GB of RAM.
|
||||||
|
{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
|
||||||
|
|
||||||
|
// To test this demo you need to build the ConsoleLoader, OSRDLLBrowser and OSRSubProcess projects found in this directory.
|
||||||
|
|
||||||
|
begin
|
||||||
|
GlobalCEFApp := TCefApplication.Create;
|
||||||
|
|
||||||
|
// The main process and the subprocess *MUST* have the same FrameworkDirPath, ResourcesDirPath,
|
||||||
|
// LocalesDirPath, cache, cookies and UserDataPath paths
|
||||||
|
|
||||||
|
// The demos are compiled into the BIN directory. Make sure SubProcess.exe and SimpleBrowser.exe are in that
|
||||||
|
// directory or this demo won't work.
|
||||||
|
|
||||||
|
// In case you want to use custom directories for the CEF3 binaries, cache, cookies and user data.
|
||||||
|
{
|
||||||
|
GlobalCEFApp.FrameworkDirPath := 'cef';
|
||||||
|
GlobalCEFApp.ResourcesDirPath := 'cef';
|
||||||
|
GlobalCEFApp.LocalesDirPath := 'cef\locales';
|
||||||
|
GlobalCEFApp.cache := 'cef\cache';
|
||||||
|
GlobalCEFApp.cookies := 'cef\cookies';
|
||||||
|
GlobalCEFApp.UserDataPath := 'cef\User Data';
|
||||||
|
GlobalCEFApp.LogFile := 'debug.log';
|
||||||
|
GlobalCEFApp.LogSeverity := LOGSEVERITY_INFO;
|
||||||
|
}
|
||||||
|
|
||||||
|
GlobalCEFApp.WindowlessRenderingEnabled := True;
|
||||||
|
GlobalCEFApp.EnableHighDPISupport := True;
|
||||||
|
GlobalCEFApp.SetCurrentDir := True;
|
||||||
|
GlobalCEFApp.ExternalMessagePump := False;
|
||||||
|
GlobalCEFApp.MultiThreadedMessageLoop := False;
|
||||||
|
|
||||||
|
GlobalCEFApp.StartSubProcess;
|
||||||
|
GlobalCEFApp.Free;
|
||||||
|
GlobalCEFApp := nil;
|
||||||
|
end.
|
||||||
|
|
570
demos/ConsoleBrowser/OSRSubProcess.dproj
Normal file
570
demos/ConsoleBrowser/OSRSubProcess.dproj
Normal file
@ -0,0 +1,570 @@
|
|||||||
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ProjectGuid>{6ABCF641-08D0-4F35-9D13-2FBD18E5152A}</ProjectGuid>
|
||||||
|
<ProjectVersion>18.2</ProjectVersion>
|
||||||
|
<FrameworkType>VCL</FrameworkType>
|
||||||
|
<MainSource>OSRSubProcess.dpr</MainSource>
|
||||||
|
<Base>True</Base>
|
||||||
|
<Config Condition="'$(Config)'==''">Release</Config>
|
||||||
|
<Platform Condition="'$(Platform)'==''">Win32</Platform>
|
||||||
|
<TargetedPlatforms>1</TargetedPlatforms>
|
||||||
|
<AppType>Application</AppType>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
|
||||||
|
<Base_Win32>true</Base_Win32>
|
||||||
|
<CfgParent>Base</CfgParent>
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
|
||||||
|
<Base_Win64>true</Base_Win64>
|
||||||
|
<CfgParent>Base</CfgParent>
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
|
||||||
|
<Cfg_1>true</Cfg_1>
|
||||||
|
<CfgParent>Base</CfgParent>
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
|
||||||
|
<Cfg_1_Win32>true</Cfg_1_Win32>
|
||||||
|
<CfgParent>Cfg_1</CfgParent>
|
||||||
|
<Cfg_1>true</Cfg_1>
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
|
||||||
|
<Cfg_2>true</Cfg_2>
|
||||||
|
<CfgParent>Base</CfgParent>
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
|
||||||
|
<Cfg_2_Win32>true</Cfg_2_Win32>
|
||||||
|
<CfgParent>Cfg_2</CfgParent>
|
||||||
|
<Cfg_2>true</Cfg_2>
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Base)'!=''">
|
||||||
|
<VerInfo_Locale>3082</VerInfo_Locale>
|
||||||
|
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace)</DCC_Namespace>
|
||||||
|
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||||
|
<Icon_MainIcon>$(BDS)\bin\delphi_PROJECTICON.ico</Icon_MainIcon>
|
||||||
|
<SanitizedProjectName>OSRSubProcess</SanitizedProjectName>
|
||||||
|
<DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
|
||||||
|
<DCC_E>false</DCC_E>
|
||||||
|
<DCC_N>false</DCC_N>
|
||||||
|
<DCC_S>false</DCC_S>
|
||||||
|
<DCC_F>false</DCC_F>
|
||||||
|
<DCC_K>false</DCC_K>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Base_Win32)'!=''">
|
||||||
|
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
|
||||||
|
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||||
|
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||||
|
<VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
|
||||||
|
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
|
||||||
|
<DCC_UsePackage>DBXSqliteDriver;RESTComponents;DataSnapServerMidas;DBXDb2Driver;DBXInterBaseDriver;vclactnband;frxe23;vclFireDAC;emsclientfiredac;DataSnapFireDAC;svnui;tethering;Componentes;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;svn;Intraweb;DBXOracleDriver;inetdb;Componentes_Int;CEF4Delphi;FmxTeeUI;FireDACIBDriver;fmx;fmxdae;vclib;FireDACDBXDriver;dbexpress;IndyProtocols230;vclx;dsnap;DataSnapCommon;emsclient;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;frxTee23;vclie;bindengine;DBXMySQLDriver;FireDACOracleDriver;CloudService;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonDriver;DataSnapClient;inet;bindcompdbx;vcl;DBXSybaseASEDriver;FireDACDb2Driver;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;Componentes_UI;TeeDB;FireDAC;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;Componentes_Misc;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;ibxbindings;rtl;FireDACDSDriver;DbxClientDriver;DBXSybaseASADriver;CustomIPTransport;vcldsnap;bindcomp;appanalytics;Componentes_RTF;DBXInformixDriver;bindcompvcl;frxDB23;Componentes_vCard;TeeUI;IndyCore230;vclribbon;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;IndySystem230;dsnapxml;DataSnapProviderClient;dbrtl;inetdbxpress;FireDACMongoDBDriver;frx23;fmxase;$(DCC_UsePackage)</DCC_UsePackage>
|
||||||
|
<UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
|
||||||
|
<UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
|
||||||
|
<DCC_ExeOutput>..\..\bin</DCC_ExeOutput>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Base_Win64)'!=''">
|
||||||
|
<DCC_UsePackage>DBXSqliteDriver;RESTComponents;DataSnapServerMidas;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;emsclientfiredac;DataSnapFireDAC;tethering;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;Intraweb;DBXOracleDriver;inetdb;FmxTeeUI;FireDACIBDriver;fmx;fmxdae;vclib;FireDACDBXDriver;dbexpress;IndyProtocols230;vclx;dsnap;DataSnapCommon;emsclient;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;FireDACOracleDriver;CloudService;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonDriver;DataSnapClient;inet;bindcompdbx;vcl;DBXSybaseASEDriver;FireDACDb2Driver;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;TeeDB;FireDAC;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;ibxbindings;rtl;FireDACDSDriver;DbxClientDriver;DBXSybaseASADriver;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;bindcompvcl;TeeUI;IndyCore230;vclribbon;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;IndySystem230;dsnapxml;DataSnapProviderClient;dbrtl;inetdbxpress;FireDACMongoDBDriver;fmxase;$(DCC_UsePackage)</DCC_UsePackage>
|
||||||
|
<UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
|
||||||
|
<UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Cfg_1)'!=''">
|
||||||
|
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
|
||||||
|
<DCC_DebugDCUs>true</DCC_DebugDCUs>
|
||||||
|
<DCC_Optimize>false</DCC_Optimize>
|
||||||
|
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
|
||||||
|
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
|
||||||
|
<DCC_RemoteDebug>true</DCC_RemoteDebug>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
|
||||||
|
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||||
|
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||||
|
<AppEnableHighDPI>true</AppEnableHighDPI>
|
||||||
|
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
|
||||||
|
<DCC_RemoteDebug>false</DCC_RemoteDebug>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Cfg_2)'!=''">
|
||||||
|
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
|
||||||
|
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
|
||||||
|
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
|
||||||
|
<DCC_DebugInformation>0</DCC_DebugInformation>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
|
||||||
|
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
|
||||||
|
<AppEnableHighDPI>true</AppEnableHighDPI>
|
||||||
|
<BT_BuildType>Debug</BT_BuildType>
|
||||||
|
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||||
|
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||||
|
<VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<DelphiCompile Include="$(MainSource)">
|
||||||
|
<MainSource>MainSource</MainSource>
|
||||||
|
</DelphiCompile>
|
||||||
|
<BuildConfiguration Include="Release">
|
||||||
|
<Key>Cfg_2</Key>
|
||||||
|
<CfgParent>Base</CfgParent>
|
||||||
|
</BuildConfiguration>
|
||||||
|
<BuildConfiguration Include="Base">
|
||||||
|
<Key>Base</Key>
|
||||||
|
</BuildConfiguration>
|
||||||
|
<BuildConfiguration Include="Debug">
|
||||||
|
<Key>Cfg_1</Key>
|
||||||
|
<CfgParent>Base</CfgParent>
|
||||||
|
</BuildConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<ProjectExtensions>
|
||||||
|
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
|
||||||
|
<Borland.ProjectType>Application</Borland.ProjectType>
|
||||||
|
<BorlandProject>
|
||||||
|
<Delphi.Personality>
|
||||||
|
<Source>
|
||||||
|
<Source Name="MainSource">OSRSubProcess.dpr</Source>
|
||||||
|
</Source>
|
||||||
|
<Excluded_Packages>
|
||||||
|
<Excluded_Packages Name="$(BDSBIN)\dclIPIndyImpl250.bpl">IP Abstraction Indy Implementation Design Time</Excluded_Packages>
|
||||||
|
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k250.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||||
|
<Excluded_Packages Name="$(BDSBIN)\dclofficexp250.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||||
|
</Excluded_Packages>
|
||||||
|
</Delphi.Personality>
|
||||||
|
<Deployment Version="3">
|
||||||
|
<DeployFile LocalName="..\..\bin\OSRSubProcess.exe" Configuration="Release" Class="ProjectOutput">
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<RemoteName>OSRSubProcess.exe</RemoteName>
|
||||||
|
<Overwrite>true</Overwrite>
|
||||||
|
</Platform>
|
||||||
|
</DeployFile>
|
||||||
|
<DeployFile LocalName="Win32\Debug\SubProcess.exe" Configuration="Debug" Class="ProjectOutput"/>
|
||||||
|
<DeployClass Name="AdditionalDebugSymbols">
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||||
|
<Operation>0</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="AndroidClassesDexFile">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>classes</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="AndroidGDBServer">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="AndroidLibnativeArmeabiFile">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>library\lib\armeabi</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="AndroidLibnativeMipsFile">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>library\lib\mips</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="AndroidServiceOutput">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="AndroidSplashImageDef">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="AndroidSplashStyles">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\values</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="Android_DefaultAppIcon">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="Android_LauncherIcon144">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="Android_LauncherIcon36">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable-ldpi</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="Android_LauncherIcon48">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable-mdpi</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="Android_LauncherIcon72">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable-hdpi</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="Android_LauncherIcon96">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable-xhdpi</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="Android_SplashImage426">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable-small</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="Android_SplashImage470">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable-normal</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="Android_SplashImage640">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable-large</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="Android_SplashImage960">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>res\drawable-xlarge</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="DebugSymbols">
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<Operation>0</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="DependencyFramework">
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
<Extensions>.framework</Extensions>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<Operation>0</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="DependencyModule">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
<Extensions>.dylib</Extensions>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
<Extensions>.dylib</Extensions>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
<Extensions>.dylib</Extensions>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
<Extensions>.dylib</Extensions>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<Operation>0</Operation>
|
||||||
|
<Extensions>.dll;.bpl</Extensions>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Required="true" Name="DependencyPackage">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
<Extensions>.dylib</Extensions>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
<Extensions>.dylib</Extensions>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
<Extensions>.dylib</Extensions>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
<Extensions>.dylib</Extensions>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<Operation>0</Operation>
|
||||||
|
<Extensions>.bpl</Extensions>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="File">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<Operation>0</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>0</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>0</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>0</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<RemoteDir>Contents\Resources\StartUp\</RemoteDir>
|
||||||
|
<Operation>0</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<Operation>0</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="iPad_Launch1024">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="iPad_Launch1536">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="iPad_Launch2048">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="iPad_Launch768">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="iPhone_Launch320">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="iPhone_Launch640">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="iPhone_Launch640x1136">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="ProjectAndroidManifest">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="ProjectiOSDeviceDebug">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="ProjectiOSDeviceResourceRules">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="ProjectiOSEntitlements">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<RemoteDir>..\</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<RemoteDir>..\</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="ProjectiOSInfoPList">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="ProjectiOSResource">
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="ProjectOSXEntitlements">
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<RemoteDir>..\</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="ProjectOSXInfoPList">
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<RemoteDir>Contents</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="ProjectOSXResource">
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<RemoteDir>Contents\Resources</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Required="true" Name="ProjectOutput">
|
||||||
|
<Platform Name="Android">
|
||||||
|
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSDevice64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="iOSSimulator">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Linux64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="OSX32">
|
||||||
|
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<Operation>0</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="ProjectUWPManifest">
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Win64">
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="UWP_DelphiLogo150">
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<RemoteDir>Assets</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Win64">
|
||||||
|
<RemoteDir>Assets</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<DeployClass Name="UWP_DelphiLogo44">
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<RemoteDir>Assets</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
<Platform Name="Win64">
|
||||||
|
<RemoteDir>Assets</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
|
</DeployClass>
|
||||||
|
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
|
||||||
|
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
|
||||||
|
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
|
||||||
|
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
|
||||||
|
<ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
|
||||||
|
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME).app"/>
|
||||||
|
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
|
||||||
|
<ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
|
||||||
|
</Deployment>
|
||||||
|
<Platforms>
|
||||||
|
<Platform value="Win32">True</Platform>
|
||||||
|
<Platform value="Win64">False</Platform>
|
||||||
|
</Platforms>
|
||||||
|
</BorlandProject>
|
||||||
|
<ProjectFileVersion>12</ProjectFileVersion>
|
||||||
|
</ProjectExtensions>
|
||||||
|
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
|
||||||
|
<Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
|
||||||
|
<Import Project="$(MSBuildProjectName).deployproj" Condition="Exists('$(MSBuildProjectName).deployproj')"/>
|
||||||
|
</Project>
|
81
demos/ConsoleBrowser/uWebBrowser.dfm
Normal file
81
demos/ConsoleBrowser/uWebBrowser.dfm
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
object WebBrowserFrm: TWebBrowserFrm
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
BorderIcons = [biSystemMenu, biMinimize]
|
||||||
|
BorderStyle = bsSingle
|
||||||
|
Caption = 'Initializing browser. Please wait...'
|
||||||
|
ClientHeight = 600
|
||||||
|
ClientWidth = 800
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'Tahoma'
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poScreenCenter
|
||||||
|
OnAfterMonitorDpiChanged = FormAfterMonitorDpiChanged
|
||||||
|
OnCloseQuery = FormCloseQuery
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnHide = FormHide
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
object Panel1: TBufferPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 800
|
||||||
|
Height = 600
|
||||||
|
Align = alClient
|
||||||
|
Caption = 'Panel1'
|
||||||
|
TabOrder = 0
|
||||||
|
TabStop = True
|
||||||
|
OnClick = Panel1Click
|
||||||
|
OnEnter = Panel1Enter
|
||||||
|
OnExit = Panel1Exit
|
||||||
|
OnMouseDown = Panel1MouseDown
|
||||||
|
OnMouseMove = Panel1MouseMove
|
||||||
|
OnMouseUp = Panel1MouseUp
|
||||||
|
OnResize = Panel1Resize
|
||||||
|
OnMouseLeave = Panel1MouseLeave
|
||||||
|
ExplicitTop = 30
|
||||||
|
ExplicitWidth = 988
|
||||||
|
ExplicitHeight = 638
|
||||||
|
end
|
||||||
|
object chrmosr: TChromium
|
||||||
|
OnTooltip = chrmosrTooltip
|
||||||
|
OnBeforePopup = chrmosrBeforePopup
|
||||||
|
OnAfterCreated = chrmosrAfterCreated
|
||||||
|
OnBeforeClose = chrmosrBeforeClose
|
||||||
|
OnClose = chrmosrClose
|
||||||
|
OnGetViewRect = chrmosrGetViewRect
|
||||||
|
OnGetScreenPoint = chrmosrGetScreenPoint
|
||||||
|
OnGetScreenInfo = chrmosrGetScreenInfo
|
||||||
|
OnPopupShow = chrmosrPopupShow
|
||||||
|
OnPopupSize = chrmosrPopupSize
|
||||||
|
OnPaint = chrmosrPaint
|
||||||
|
OnCursorChange = chrmosrCursorChange
|
||||||
|
Left = 24
|
||||||
|
Top = 56
|
||||||
|
end
|
||||||
|
object AppEvents: TApplicationEvents
|
||||||
|
OnMessage = AppEventsMessage
|
||||||
|
Left = 24
|
||||||
|
Top = 128
|
||||||
|
end
|
||||||
|
object SaveDialog1: TSaveDialog
|
||||||
|
DefaultExt = 'bmp'
|
||||||
|
Filter = 'Bitmap files (*.bmp)|*.BMP'
|
||||||
|
Title = 'Save snapshot'
|
||||||
|
Left = 24
|
||||||
|
Top = 278
|
||||||
|
end
|
||||||
|
object Timer1: TTimer
|
||||||
|
Enabled = False
|
||||||
|
Interval = 300
|
||||||
|
OnTimer = Timer1Timer
|
||||||
|
Left = 24
|
||||||
|
Top = 206
|
||||||
|
end
|
||||||
|
end
|
840
demos/ConsoleBrowser/uWebBrowser.pas
Normal file
840
demos/ConsoleBrowser/uWebBrowser.pas
Normal file
@ -0,0 +1,840 @@
|
|||||||
|
// ************************************************************************
|
||||||
|
// ***************************** CEF4Delphi *******************************
|
||||||
|
// ************************************************************************
|
||||||
|
//
|
||||||
|
// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based
|
||||||
|
// browser in Delphi applications.
|
||||||
|
//
|
||||||
|
// The original license of DCEF3 still applies to CEF4Delphi.
|
||||||
|
//
|
||||||
|
// For more information about CEF4Delphi visit :
|
||||||
|
// https://www.briskbard.com/index.php?lang=en&pageid=cef
|
||||||
|
//
|
||||||
|
// Copyright © 2018 Salvador Diaz Fau. All rights reserved.
|
||||||
|
//
|
||||||
|
// ************************************************************************
|
||||||
|
// ************ vvvv Original license and comments below vvvv *************
|
||||||
|
// ************************************************************************
|
||||||
|
(*
|
||||||
|
* Delphi Chromium Embedded 3
|
||||||
|
*
|
||||||
|
* Usage allowed under the restrictions of the Lesser GNU General Public License
|
||||||
|
* or alternatively the restrictions of the Mozilla Public License 1.1
|
||||||
|
*
|
||||||
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
|
||||||
|
* the specific language governing rights and limitations under the License.
|
||||||
|
*
|
||||||
|
* Unit owner : Henri Gourvest <hgourvest@gmail.com>
|
||||||
|
* Web site : http://www.progdigy.com
|
||||||
|
* Repository : http://code.google.com/p/delphichromiumembedded/
|
||||||
|
* Group : http://groups.google.com/group/delphichromiumembedded
|
||||||
|
*
|
||||||
|
* Embarcadero Technologies, Inc is not permitted to use or redistribute
|
||||||
|
* this source code without explicit permission.
|
||||||
|
*
|
||||||
|
*)
|
||||||
|
|
||||||
|
unit uWebBrowser;
|
||||||
|
|
||||||
|
{$I cef.inc}
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
{$IFDEF DELPHI16_UP}
|
||||||
|
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes,
|
||||||
|
System.SyncObjs, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls,
|
||||||
|
Vcl.ExtCtrls, Vcl.AppEvnts,
|
||||||
|
{$ELSE}
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, SyncObjs,
|
||||||
|
Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, AppEvnts,
|
||||||
|
{$ENDIF}
|
||||||
|
uCEFChromium, uCEFTypes, uCEFInterfaces, uCEFConstants, uBufferPanel;
|
||||||
|
|
||||||
|
type
|
||||||
|
TWebBrowserFrm = class(TForm)
|
||||||
|
chrmosr: TChromium;
|
||||||
|
AppEvents: TApplicationEvents;
|
||||||
|
SaveDialog1: TSaveDialog;
|
||||||
|
Timer1: TTimer;
|
||||||
|
Panel1: TBufferPanel;
|
||||||
|
|
||||||
|
procedure AppEventsMessage(var Msg: tagMSG; var Handled: Boolean);
|
||||||
|
procedure GoBtnEnter(Sender: TObject);
|
||||||
|
|
||||||
|
procedure Panel1Enter(Sender: TObject);
|
||||||
|
procedure Panel1Exit(Sender: TObject);
|
||||||
|
procedure Panel1Resize(Sender: TObject);
|
||||||
|
procedure Panel1Click(Sender: TObject);
|
||||||
|
procedure Panel1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
procedure Panel1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
procedure Panel1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
|
||||||
|
procedure Panel1MouseLeave(Sender: TObject);
|
||||||
|
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure FormHide(Sender: TObject);
|
||||||
|
procedure FormAfterMonitorDpiChanged(Sender: TObject; OldDPI, NewDPI: Integer);
|
||||||
|
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
||||||
|
|
||||||
|
procedure chrmosrPaint(Sender: TObject; const browser: ICefBrowser; kind: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; const buffer: Pointer; width, height: Integer);
|
||||||
|
procedure chrmosrCursorChange(Sender: TObject; const browser: ICefBrowser; cursor: HICON; cursorType: TCefCursorType; const customCursorInfo: PCefCursorInfo);
|
||||||
|
procedure chrmosrGetViewRect(Sender: TObject; const browser: ICefBrowser; var rect: TCefRect; out Result: Boolean);
|
||||||
|
procedure chrmosrGetScreenPoint(Sender: TObject; const browser: ICefBrowser; viewX, viewY: Integer; var screenX, screenY: Integer; out Result: Boolean);
|
||||||
|
procedure chrmosrGetScreenInfo(Sender: TObject; const browser: ICefBrowser; var screenInfo: TCefScreenInfo; out Result: Boolean);
|
||||||
|
procedure chrmosrPopupShow(Sender: TObject; const browser: ICefBrowser; show: Boolean);
|
||||||
|
procedure chrmosrPopupSize(Sender: TObject; const browser: ICefBrowser; const rect: PCefRect);
|
||||||
|
procedure chrmosrAfterCreated(Sender: TObject; const browser: ICefBrowser);
|
||||||
|
procedure chrmosrTooltip(Sender: TObject; const browser: ICefBrowser; var text: ustring; out Result: Boolean);
|
||||||
|
procedure chrmosrBeforePopup(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const targetUrl, targetFrameName: ustring; targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean; const popupFeatures: TCefPopupFeatures; var windowInfo: TCefWindowInfo; var client: ICefClient; var settings: TCefBrowserSettings; var noJavascriptAccess: Boolean; var Result: Boolean);
|
||||||
|
procedure chrmosrClose(Sender: TObject; const browser: ICefBrowser; out Result: Boolean);
|
||||||
|
procedure chrmosrBeforeClose(Sender: TObject; const browser: ICefBrowser);
|
||||||
|
|
||||||
|
procedure SnapshotBtnClick(Sender: TObject);
|
||||||
|
procedure Timer1Timer(Sender: TObject);
|
||||||
|
procedure SnapshotBtnEnter(Sender: TObject);
|
||||||
|
procedure ComboBox1Enter(Sender: TObject);
|
||||||
|
|
||||||
|
protected
|
||||||
|
FPopUpBitmap : TBitmap;
|
||||||
|
FPopUpRect : TRect;
|
||||||
|
FShowPopUp : boolean;
|
||||||
|
FResizing : boolean;
|
||||||
|
FPendingResize : boolean;
|
||||||
|
FCanClose : boolean;
|
||||||
|
FClosing : boolean;
|
||||||
|
FResizeCS : TCriticalSection;
|
||||||
|
|
||||||
|
FLastClickCount : integer;
|
||||||
|
FLastClickTime : integer;
|
||||||
|
FLastClickPoint : TPoint;
|
||||||
|
FLastClickButton : TMouseButton;
|
||||||
|
|
||||||
|
function getModifiers(Shift: TShiftState): TCefEventFlags;
|
||||||
|
function GetButton(Button: TMouseButton): TCefMouseButtonType;
|
||||||
|
procedure DoResize;
|
||||||
|
procedure InitializeLastClick;
|
||||||
|
function CancelPreviousClick(x, y : integer; var aCurrentTime : integer) : boolean;
|
||||||
|
|
||||||
|
procedure WMMove(var aMessage : TWMMove); message WM_MOVE;
|
||||||
|
procedure WMMoving(var aMessage : TMessage); message WM_MOVING;
|
||||||
|
procedure WMCaptureChanged(var aMessage : TMessage); message WM_CAPTURECHANGED;
|
||||||
|
procedure WMCancelMode(var aMessage : TMessage); message WM_CANCELMODE;
|
||||||
|
procedure WMEnterMenuLoop(var aMessage: TMessage); message WM_ENTERMENULOOP;
|
||||||
|
procedure WMExitMenuLoop(var aMessage: TMessage); message WM_EXITMENULOOP;
|
||||||
|
procedure BrowserCreatedMsg(var aMessage : TMessage); message CEF_AFTERCREATED;
|
||||||
|
procedure PendingResizeMsg(var aMessage : TMessage); message CEF_PENDINGRESIZE;
|
||||||
|
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
WebBrowserFrm: TWebBrowserFrm;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
uses
|
||||||
|
{$IFDEF DELPHI16_UP}
|
||||||
|
System.Math,
|
||||||
|
{$ELSE}
|
||||||
|
Math,
|
||||||
|
{$ENDIF}
|
||||||
|
uCEFMiscFunctions, uCEFApplication;
|
||||||
|
|
||||||
|
// This is the destruction sequence in OSR mode :
|
||||||
|
// 1- FormCloseQuery sets CanClose to the initial FCanClose value (False) and calls chrmosr.CloseBrowser(True).
|
||||||
|
// 2- chrmosr.CloseBrowser(True) will trigger chrmosr.OnClose and we have to
|
||||||
|
// set "Result" to false and CEF3 will destroy the internal browser immediately.
|
||||||
|
// 3- chrmosr.OnBeforeClose is triggered because the internal browser was destroyed.
|
||||||
|
// Now we set FCanClose to True and send WM_CLOSE to the form.
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.AppEventsMessage(var Msg: tagMSG; var Handled: Boolean);
|
||||||
|
var
|
||||||
|
TempKeyEvent : TCefKeyEvent;
|
||||||
|
TempMouseEvent : TCefMouseEvent;
|
||||||
|
begin
|
||||||
|
case Msg.message of
|
||||||
|
WM_SYSCHAR :
|
||||||
|
if Panel1.Focused then
|
||||||
|
begin
|
||||||
|
TempKeyEvent.kind := KEYEVENT_CHAR;
|
||||||
|
TempKeyEvent.modifiers := GetCefKeyboardModifiers(Msg.wParam, Msg.lParam);
|
||||||
|
TempKeyEvent.windows_key_code := Msg.wParam;
|
||||||
|
TempKeyEvent.native_key_code := Msg.lParam;
|
||||||
|
TempKeyEvent.is_system_key := ord(True);
|
||||||
|
TempKeyEvent.character := #0;
|
||||||
|
TempKeyEvent.unmodified_character := #0;
|
||||||
|
TempKeyEvent.focus_on_editable_field := ord(False);
|
||||||
|
|
||||||
|
chrmosr.SendKeyEvent(@TempKeyEvent);
|
||||||
|
Handled := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
WM_SYSKEYDOWN :
|
||||||
|
if Panel1.Focused then
|
||||||
|
begin
|
||||||
|
TempKeyEvent.kind := KEYEVENT_RAWKEYDOWN;
|
||||||
|
TempKeyEvent.modifiers := GetCefKeyboardModifiers(Msg.wParam, Msg.lParam);
|
||||||
|
TempKeyEvent.windows_key_code := Msg.wParam;
|
||||||
|
TempKeyEvent.native_key_code := Msg.lParam;
|
||||||
|
TempKeyEvent.is_system_key := ord(True);
|
||||||
|
TempKeyEvent.character := #0;
|
||||||
|
TempKeyEvent.unmodified_character := #0;
|
||||||
|
TempKeyEvent.focus_on_editable_field := ord(False);
|
||||||
|
|
||||||
|
chrmosr.SendKeyEvent(@TempKeyEvent);
|
||||||
|
Handled := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
WM_SYSKEYUP :
|
||||||
|
if Panel1.Focused then
|
||||||
|
begin
|
||||||
|
TempKeyEvent.kind := KEYEVENT_KEYUP;
|
||||||
|
TempKeyEvent.modifiers := GetCefKeyboardModifiers(Msg.wParam, Msg.lParam);
|
||||||
|
TempKeyEvent.windows_key_code := Msg.wParam;
|
||||||
|
TempKeyEvent.native_key_code := Msg.lParam;
|
||||||
|
TempKeyEvent.is_system_key := ord(True);
|
||||||
|
TempKeyEvent.character := #0;
|
||||||
|
TempKeyEvent.unmodified_character := #0;
|
||||||
|
TempKeyEvent.focus_on_editable_field := ord(False);
|
||||||
|
|
||||||
|
chrmosr.SendKeyEvent(@TempKeyEvent);
|
||||||
|
Handled := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
WM_KEYDOWN :
|
||||||
|
if Panel1.Focused then
|
||||||
|
begin
|
||||||
|
TempKeyEvent.kind := KEYEVENT_RAWKEYDOWN;
|
||||||
|
TempKeyEvent.modifiers := GetCefKeyboardModifiers(Msg.wParam, Msg.lParam);
|
||||||
|
TempKeyEvent.windows_key_code := Msg.wParam;
|
||||||
|
TempKeyEvent.native_key_code := Msg.lParam;
|
||||||
|
TempKeyEvent.is_system_key := ord(False);
|
||||||
|
TempKeyEvent.character := #0;
|
||||||
|
TempKeyEvent.unmodified_character := #0;
|
||||||
|
TempKeyEvent.focus_on_editable_field := ord(False);
|
||||||
|
|
||||||
|
chrmosr.SendKeyEvent(@TempKeyEvent);
|
||||||
|
Handled := (Msg.wParam = VK_TAB);
|
||||||
|
end;
|
||||||
|
|
||||||
|
WM_KEYUP :
|
||||||
|
if Panel1.Focused then
|
||||||
|
begin
|
||||||
|
TempKeyEvent.kind := KEYEVENT_KEYUP;
|
||||||
|
TempKeyEvent.modifiers := GetCefKeyboardModifiers(Msg.wParam, Msg.lParam);
|
||||||
|
TempKeyEvent.windows_key_code := Msg.wParam;
|
||||||
|
TempKeyEvent.native_key_code := Msg.lParam;
|
||||||
|
TempKeyEvent.is_system_key := ord(False);
|
||||||
|
TempKeyEvent.character := #0;
|
||||||
|
TempKeyEvent.unmodified_character := #0;
|
||||||
|
TempKeyEvent.focus_on_editable_field := ord(False);
|
||||||
|
|
||||||
|
chrmosr.SendKeyEvent(@TempKeyEvent);
|
||||||
|
Handled := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
WM_CHAR :
|
||||||
|
if Panel1.Focused then
|
||||||
|
begin
|
||||||
|
TempKeyEvent.kind := KEYEVENT_CHAR;
|
||||||
|
TempKeyEvent.modifiers := GetCefKeyboardModifiers(Msg.wParam, Msg.lParam);
|
||||||
|
TempKeyEvent.windows_key_code := Msg.wParam;
|
||||||
|
TempKeyEvent.native_key_code := Msg.lParam;
|
||||||
|
TempKeyEvent.is_system_key := ord(False);
|
||||||
|
TempKeyEvent.character := #0;
|
||||||
|
TempKeyEvent.unmodified_character := #0;
|
||||||
|
TempKeyEvent.focus_on_editable_field := ord(False);
|
||||||
|
|
||||||
|
chrmosr.SendKeyEvent(@TempKeyEvent);
|
||||||
|
Handled := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
WM_MOUSEWHEEL :
|
||||||
|
if Panel1.Focused and (GlobalCEFApp <> nil) then
|
||||||
|
begin
|
||||||
|
TempMouseEvent.x := Msg.lParam and $FFFF;
|
||||||
|
TempMouseEvent.y := Msg.lParam shr 16;
|
||||||
|
TempMouseEvent.modifiers := GetCefMouseModifiers(Msg.wParam);
|
||||||
|
DeviceToLogical(TempMouseEvent, GlobalCEFApp.DeviceScaleFactor);
|
||||||
|
chrmosr.SendMouseWheelEvent(@TempMouseEvent, 0, int16(Msg.wParam shr 16));
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.GoBtnEnter(Sender: TObject);
|
||||||
|
begin
|
||||||
|
chrmosr.SendFocusEvent(False);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.chrmosrAfterCreated(Sender: TObject; const browser: ICefBrowser);
|
||||||
|
begin
|
||||||
|
PostMessage(Handle, CEF_AFTERCREATED, 0, 0);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.chrmosrBeforeClose(Sender: TObject; const browser: ICefBrowser);
|
||||||
|
begin
|
||||||
|
FCanClose := True;
|
||||||
|
PostMessage(Handle, WM_CLOSE, 0, 0);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.chrmosrBeforePopup(Sender : TObject;
|
||||||
|
const browser : ICefBrowser;
|
||||||
|
const frame : ICefFrame;
|
||||||
|
const targetUrl : ustring;
|
||||||
|
const targetFrameName : ustring;
|
||||||
|
targetDisposition : TCefWindowOpenDisposition;
|
||||||
|
userGesture : Boolean;
|
||||||
|
const popupFeatures : TCefPopupFeatures;
|
||||||
|
var windowInfo : TCefWindowInfo;
|
||||||
|
var client : ICefClient;
|
||||||
|
var settings : TCefBrowserSettings;
|
||||||
|
var noJavascriptAccess : Boolean;
|
||||||
|
var Result : Boolean);
|
||||||
|
begin
|
||||||
|
// For simplicity, this demo blocks all popup windows and new tabs
|
||||||
|
Result := (targetDisposition in [WOD_NEW_FOREGROUND_TAB, WOD_NEW_BACKGROUND_TAB, WOD_NEW_POPUP, WOD_NEW_WINDOW]);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.chrmosrClose(Sender: TObject; const browser: ICefBrowser; out Result: Boolean);
|
||||||
|
begin
|
||||||
|
Result := False;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.chrmosrCursorChange(Sender : TObject;
|
||||||
|
const browser : ICefBrowser;
|
||||||
|
cursor : HICON;
|
||||||
|
cursorType : TCefCursorType;
|
||||||
|
const customCursorInfo : PCefCursorInfo);
|
||||||
|
begin
|
||||||
|
Panel1.Cursor := GefCursorToWindowsCursor(cursorType);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.chrmosrGetScreenInfo(Sender : TObject;
|
||||||
|
const browser : ICefBrowser;
|
||||||
|
var screenInfo : TCefScreenInfo;
|
||||||
|
out Result : Boolean);
|
||||||
|
var
|
||||||
|
TempRect : TCEFRect;
|
||||||
|
begin
|
||||||
|
if (GlobalCEFApp <> nil) then
|
||||||
|
begin
|
||||||
|
TempRect.x := 0;
|
||||||
|
TempRect.y := 0;
|
||||||
|
TempRect.width := DeviceToLogical(Panel1.Width, GlobalCEFApp.DeviceScaleFactor);
|
||||||
|
TempRect.height := DeviceToLogical(Panel1.Height, GlobalCEFApp.DeviceScaleFactor);
|
||||||
|
|
||||||
|
screenInfo.device_scale_factor := GlobalCEFApp.DeviceScaleFactor;
|
||||||
|
screenInfo.depth := 0;
|
||||||
|
screenInfo.depth_per_component := 0;
|
||||||
|
screenInfo.is_monochrome := Ord(False);
|
||||||
|
screenInfo.rect := TempRect;
|
||||||
|
screenInfo.available_rect := TempRect;
|
||||||
|
|
||||||
|
Result := True;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
Result := False;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.chrmosrGetScreenPoint(Sender : TObject;
|
||||||
|
const browser : ICefBrowser;
|
||||||
|
viewX : Integer;
|
||||||
|
viewY : Integer;
|
||||||
|
var screenX : Integer;
|
||||||
|
var screenY : Integer;
|
||||||
|
out Result : Boolean);
|
||||||
|
var
|
||||||
|
TempScreenPt, TempViewPt : TPoint;
|
||||||
|
begin
|
||||||
|
if (GlobalCEFApp <> nil) then
|
||||||
|
begin
|
||||||
|
TempViewPt.x := LogicalToDevice(viewX, GlobalCEFApp.DeviceScaleFactor);
|
||||||
|
TempViewPt.y := LogicalToDevice(viewY, GlobalCEFApp.DeviceScaleFactor);
|
||||||
|
TempScreenPt := Panel1.ClientToScreen(TempViewPt);
|
||||||
|
screenX := TempScreenPt.x;
|
||||||
|
screenY := TempScreenPt.y;
|
||||||
|
Result := True;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
Result := False;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.chrmosrGetViewRect(Sender : TObject;
|
||||||
|
const browser : ICefBrowser;
|
||||||
|
var rect : TCefRect;
|
||||||
|
out Result : Boolean);
|
||||||
|
begin
|
||||||
|
if (GlobalCEFApp <> nil) then
|
||||||
|
begin
|
||||||
|
rect.x := 0;
|
||||||
|
rect.y := 0;
|
||||||
|
rect.width := DeviceToLogical(Panel1.Width, GlobalCEFApp.DeviceScaleFactor);
|
||||||
|
rect.height := DeviceToLogical(Panel1.Height, GlobalCEFApp.DeviceScaleFactor);
|
||||||
|
Result := True;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
Result := False;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.chrmosrPaint(Sender : TObject;
|
||||||
|
const browser : ICefBrowser;
|
||||||
|
kind : TCefPaintElementType;
|
||||||
|
dirtyRectsCount : NativeUInt;
|
||||||
|
const dirtyRects : PCefRectArray;
|
||||||
|
const buffer : Pointer;
|
||||||
|
width : Integer;
|
||||||
|
height : Integer);
|
||||||
|
var
|
||||||
|
src, dst: PByte;
|
||||||
|
i, j, TempLineSize, TempSrcOffset, TempDstOffset, SrcStride, DstStride : Integer;
|
||||||
|
n : NativeUInt;
|
||||||
|
TempWidth, TempHeight, TempScanlineSize : integer;
|
||||||
|
TempBufferBits : Pointer;
|
||||||
|
TempForcedResize : boolean;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
FResizeCS.Acquire;
|
||||||
|
TempForcedResize := False;
|
||||||
|
|
||||||
|
if Panel1.BeginBufferDraw then
|
||||||
|
begin
|
||||||
|
if (kind = PET_POPUP) then
|
||||||
|
begin
|
||||||
|
if (FPopUpBitmap = nil) or
|
||||||
|
(width <> FPopUpBitmap.Width) or
|
||||||
|
(height <> FPopUpBitmap.Height) then
|
||||||
|
begin
|
||||||
|
if (FPopUpBitmap <> nil) then FPopUpBitmap.Free;
|
||||||
|
|
||||||
|
FPopUpBitmap := TBitmap.Create;
|
||||||
|
FPopUpBitmap.PixelFormat := pf32bit;
|
||||||
|
FPopUpBitmap.HandleType := bmDIB;
|
||||||
|
FPopUpBitmap.Width := width;
|
||||||
|
FPopUpBitmap.Height := height;
|
||||||
|
end;
|
||||||
|
|
||||||
|
TempWidth := FPopUpBitmap.Width;
|
||||||
|
TempHeight := FPopUpBitmap.Height;
|
||||||
|
TempScanlineSize := FPopUpBitmap.Width * SizeOf(TRGBQuad);
|
||||||
|
TempBufferBits := FPopUpBitmap.Scanline[pred(FPopUpBitmap.Height)];
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
TempForcedResize := Panel1.UpdateBufferDimensions(Width, Height) or not(Panel1.BufferIsResized(False));
|
||||||
|
TempWidth := Panel1.BufferWidth;
|
||||||
|
TempHeight := Panel1.BufferHeight;
|
||||||
|
TempScanlineSize := Panel1.ScanlineSize;
|
||||||
|
TempBufferBits := Panel1.BufferBits;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if (TempBufferBits <> nil) then
|
||||||
|
begin
|
||||||
|
SrcStride := Width * SizeOf(TRGBQuad);
|
||||||
|
DstStride := - TempScanlineSize;
|
||||||
|
|
||||||
|
n := 0;
|
||||||
|
|
||||||
|
while (n < dirtyRectsCount) do
|
||||||
|
begin
|
||||||
|
if (dirtyRects[n].x >= 0) and (dirtyRects[n].y >= 0) then
|
||||||
|
begin
|
||||||
|
TempLineSize := min(dirtyRects[n].width, TempWidth - dirtyRects[n].x) * SizeOf(TRGBQuad);
|
||||||
|
|
||||||
|
if (TempLineSize > 0) then
|
||||||
|
begin
|
||||||
|
TempSrcOffset := ((dirtyRects[n].y * Width) + dirtyRects[n].x) * SizeOf(TRGBQuad);
|
||||||
|
TempDstOffset := ((TempScanlineSize * pred(TempHeight)) - (dirtyRects[n].y * TempScanlineSize)) +
|
||||||
|
(dirtyRects[n].x * SizeOf(TRGBQuad));
|
||||||
|
|
||||||
|
src := @PByte(buffer)[TempSrcOffset];
|
||||||
|
dst := @PByte(TempBufferBits)[TempDstOffset];
|
||||||
|
|
||||||
|
i := 0;
|
||||||
|
j := min(dirtyRects[n].height, TempHeight - dirtyRects[n].y);
|
||||||
|
|
||||||
|
while (i < j) do
|
||||||
|
begin
|
||||||
|
Move(src^, dst^, TempLineSize);
|
||||||
|
|
||||||
|
Inc(dst, DstStride);
|
||||||
|
Inc(src, SrcStride);
|
||||||
|
inc(i);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
inc(n);
|
||||||
|
end;
|
||||||
|
|
||||||
|
if FShowPopup and (FPopUpBitmap <> nil) then
|
||||||
|
Panel1.BufferDraw(FPopUpRect.Left, FPopUpRect.Top, FPopUpBitmap);
|
||||||
|
end;
|
||||||
|
|
||||||
|
Panel1.EndBufferDraw;
|
||||||
|
Panel1.InvalidatePanel;
|
||||||
|
|
||||||
|
if (kind = PET_VIEW) then
|
||||||
|
begin
|
||||||
|
if TempForcedResize or FPendingResize then PostMessage(Handle, CEF_PENDINGRESIZE, 0, 0);
|
||||||
|
|
||||||
|
FResizing := False;
|
||||||
|
FPendingResize := False;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
FResizeCS.Release;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.chrmosrPopupShow(Sender : TObject;
|
||||||
|
const browser : ICefBrowser;
|
||||||
|
show : Boolean);
|
||||||
|
begin
|
||||||
|
if show then
|
||||||
|
FShowPopUp := True
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
FShowPopUp := False;
|
||||||
|
FPopUpRect := rect(0, 0, 0, 0);
|
||||||
|
|
||||||
|
if (chrmosr <> nil) then chrmosr.Invalidate(PET_VIEW);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.chrmosrPopupSize(Sender : TObject;
|
||||||
|
const browser : ICefBrowser;
|
||||||
|
const rect : PCefRect);
|
||||||
|
begin
|
||||||
|
if (GlobalCEFApp <> nil) then
|
||||||
|
begin
|
||||||
|
LogicalToDevice(rect^, GlobalCEFApp.DeviceScaleFactor);
|
||||||
|
|
||||||
|
FPopUpRect.Left := rect.x;
|
||||||
|
FPopUpRect.Top := rect.y;
|
||||||
|
FPopUpRect.Right := rect.x + rect.width - 1;
|
||||||
|
FPopUpRect.Bottom := rect.y + rect.height - 1;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.chrmosrTooltip(Sender: TObject; const browser: ICefBrowser; var text: ustring; out Result: Boolean);
|
||||||
|
begin
|
||||||
|
Panel1.hint := text;
|
||||||
|
Panel1.ShowHint := (length(text) > 0);
|
||||||
|
Result := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.ComboBox1Enter(Sender: TObject);
|
||||||
|
begin
|
||||||
|
chrmosr.SendFocusEvent(False);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TWebBrowserFrm.getModifiers(Shift: TShiftState): TCefEventFlags;
|
||||||
|
begin
|
||||||
|
Result := EVENTFLAG_NONE;
|
||||||
|
|
||||||
|
if (ssShift in Shift) then Result := Result or EVENTFLAG_SHIFT_DOWN;
|
||||||
|
if (ssAlt in Shift) then Result := Result or EVENTFLAG_ALT_DOWN;
|
||||||
|
if (ssCtrl in Shift) then Result := Result or EVENTFLAG_CONTROL_DOWN;
|
||||||
|
if (ssLeft in Shift) then Result := Result or EVENTFLAG_LEFT_MOUSE_BUTTON;
|
||||||
|
if (ssRight in Shift) then Result := Result or EVENTFLAG_RIGHT_MOUSE_BUTTON;
|
||||||
|
if (ssMiddle in Shift) then Result := Result or EVENTFLAG_MIDDLE_MOUSE_BUTTON;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TWebBrowserFrm.GetButton(Button: TMouseButton): TCefMouseButtonType;
|
||||||
|
begin
|
||||||
|
case Button of
|
||||||
|
TMouseButton.mbRight : Result := MBT_RIGHT;
|
||||||
|
TMouseButton.mbMiddle : Result := MBT_MIDDLE;
|
||||||
|
else Result := MBT_LEFT;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.WMMove(var aMessage : TWMMove);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
|
||||||
|
if (chrmosr <> nil) then chrmosr.NotifyMoveOrResizeStarted;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.WMMoving(var aMessage : TMessage);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
|
||||||
|
if (chrmosr <> nil) then chrmosr.NotifyMoveOrResizeStarted;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.WMCaptureChanged(var aMessage : TMessage);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
|
||||||
|
if (chrmosr <> nil) then chrmosr.SendCaptureLostEvent;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.WMCancelMode(var aMessage : TMessage);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
|
||||||
|
if (chrmosr <> nil) then chrmosr.SendCaptureLostEvent;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.WMEnterMenuLoop(var aMessage: TMessage);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
|
||||||
|
if (aMessage.wParam = 0) and (GlobalCEFApp <> nil) then GlobalCEFApp.OsmodalLoop := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.WMExitMenuLoop(var aMessage: TMessage);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
|
||||||
|
if (aMessage.wParam = 0) and (GlobalCEFApp <> nil) then GlobalCEFApp.OsmodalLoop := False;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.BrowserCreatedMsg(var aMessage : TMessage);
|
||||||
|
begin
|
||||||
|
Caption := 'DLL OSR Browser';
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.FormAfterMonitorDpiChanged(Sender: TObject; OldDPI, NewDPI: Integer);
|
||||||
|
begin
|
||||||
|
if (chrmosr <> nil) then
|
||||||
|
begin
|
||||||
|
chrmosr.NotifyScreenInfoChanged;
|
||||||
|
chrmosr.WasResized;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
||||||
|
begin
|
||||||
|
CanClose := FCanClose;
|
||||||
|
|
||||||
|
if FClosing then
|
||||||
|
GlobalCEFApp.QuitMessageLoop
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
FClosing := True;
|
||||||
|
Visible := False;
|
||||||
|
chrmosr.CloseBrowser(True);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
FPopUpBitmap := nil;
|
||||||
|
FPopUpRect := rect(0, 0, 0, 0);
|
||||||
|
FShowPopUp := False;
|
||||||
|
FResizing := False;
|
||||||
|
FPendingResize := False;
|
||||||
|
FCanClose := False;
|
||||||
|
FClosing := False;
|
||||||
|
FResizeCS := TCriticalSection.Create;
|
||||||
|
|
||||||
|
chrmosr.DefaultURL := 'https://www.google.com';
|
||||||
|
|
||||||
|
InitializeLastClick;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
chrmosr.ShutdownDragAndDrop;
|
||||||
|
|
||||||
|
if (FPopUpBitmap <> nil) then FreeAndNil(FPopUpBitmap);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.FormHide(Sender: TObject);
|
||||||
|
begin
|
||||||
|
chrmosr.SendFocusEvent(False);
|
||||||
|
chrmosr.WasHidden(True);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if chrmosr.Initialized then
|
||||||
|
begin
|
||||||
|
chrmosr.WasHidden(False);
|
||||||
|
chrmosr.SendFocusEvent(True);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
// opaque white background color
|
||||||
|
chrmosr.Options.BackgroundColor := CefColorSetARGB($FF, $FF, $FF, $FF);
|
||||||
|
|
||||||
|
if chrmosr.CreateBrowser(nil, '') then
|
||||||
|
chrmosr.InitializeDragAndDrop(Panel1)
|
||||||
|
else
|
||||||
|
Timer1.Enabled := True;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.Panel1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Panel1.SetFocus;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.Panel1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
var
|
||||||
|
TempEvent : TCefMouseEvent;
|
||||||
|
TempTime : integer;
|
||||||
|
begin
|
||||||
|
if (GlobalCEFApp <> nil) and (chrmosr <> nil) then
|
||||||
|
begin
|
||||||
|
Panel1.SetFocus;
|
||||||
|
|
||||||
|
if not(CancelPreviousClick(x, y, TempTime)) and (Button = FLastClickButton) then
|
||||||
|
inc(FLastClickCount)
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
FLastClickPoint.x := x;
|
||||||
|
FLastClickPoint.y := y;
|
||||||
|
FLastClickCount := 1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
FLastClickTime := TempTime;
|
||||||
|
FLastClickButton := Button;
|
||||||
|
|
||||||
|
TempEvent.x := X;
|
||||||
|
TempEvent.y := Y;
|
||||||
|
TempEvent.modifiers := getModifiers(Shift);
|
||||||
|
DeviceToLogical(TempEvent, GlobalCEFApp.DeviceScaleFactor);
|
||||||
|
chrmosr.SendMouseClickEvent(@TempEvent, GetButton(Button), False, FLastClickCount);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.Panel1MouseLeave(Sender: TObject);
|
||||||
|
var
|
||||||
|
TempEvent : TCefMouseEvent;
|
||||||
|
TempPoint : TPoint;
|
||||||
|
TempTime : integer;
|
||||||
|
begin
|
||||||
|
if (GlobalCEFApp <> nil) and (chrmosr <> nil) then
|
||||||
|
begin
|
||||||
|
GetCursorPos(TempPoint);
|
||||||
|
TempPoint := Panel1.ScreenToclient(TempPoint);
|
||||||
|
|
||||||
|
if CancelPreviousClick(TempPoint.x, TempPoint.y, TempTime) then InitializeLastClick;
|
||||||
|
|
||||||
|
TempEvent.x := TempPoint.x;
|
||||||
|
TempEvent.y := TempPoint.y;
|
||||||
|
TempEvent.modifiers := GetCefMouseModifiers;
|
||||||
|
DeviceToLogical(TempEvent, GlobalCEFApp.DeviceScaleFactor);
|
||||||
|
chrmosr.SendMouseMoveEvent(@TempEvent, True);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.Panel1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
|
||||||
|
var
|
||||||
|
TempEvent : TCefMouseEvent;
|
||||||
|
TempTime : integer;
|
||||||
|
begin
|
||||||
|
if (GlobalCEFApp <> nil) and (chrmosr <> nil) then
|
||||||
|
begin
|
||||||
|
if CancelPreviousClick(x, y, TempTime) then InitializeLastClick;
|
||||||
|
|
||||||
|
TempEvent.x := x;
|
||||||
|
TempEvent.y := y;
|
||||||
|
TempEvent.modifiers := getModifiers(Shift);
|
||||||
|
DeviceToLogical(TempEvent, GlobalCEFApp.DeviceScaleFactor);
|
||||||
|
chrmosr.SendMouseMoveEvent(@TempEvent, False);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.Panel1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
var
|
||||||
|
TempEvent : TCefMouseEvent;
|
||||||
|
begin
|
||||||
|
if (GlobalCEFApp <> nil) and (chrmosr <> nil) then
|
||||||
|
begin
|
||||||
|
TempEvent.x := X;
|
||||||
|
TempEvent.y := Y;
|
||||||
|
TempEvent.modifiers := getModifiers(Shift);
|
||||||
|
DeviceToLogical(TempEvent, GlobalCEFApp.DeviceScaleFactor);
|
||||||
|
chrmosr.SendMouseClickEvent(@TempEvent, GetButton(Button), True, FLastClickCount);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.Panel1Resize(Sender: TObject);
|
||||||
|
begin
|
||||||
|
DoResize;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.PendingResizeMsg(var aMessage : TMessage);
|
||||||
|
begin
|
||||||
|
DoResize;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.DoResize;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
FResizeCS.Acquire;
|
||||||
|
|
||||||
|
if FResizing then
|
||||||
|
FPendingResize := True
|
||||||
|
else
|
||||||
|
if Panel1.BufferIsResized then
|
||||||
|
chrmosr.Invalidate(PET_VIEW)
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
FResizing := True;
|
||||||
|
chrmosr.WasResized;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
FResizeCS.Release;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.InitializeLastClick;
|
||||||
|
begin
|
||||||
|
FLastClickCount := 0;
|
||||||
|
FLastClickTime := 0;
|
||||||
|
FLastClickPoint.x := 0;
|
||||||
|
FLastClickPoint.y := 0;
|
||||||
|
FLastClickButton := mbLeft;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TWebBrowserFrm.CancelPreviousClick(x, y : integer; var aCurrentTime : integer) : boolean;
|
||||||
|
begin
|
||||||
|
aCurrentTime := GetMessageTime;
|
||||||
|
|
||||||
|
Result := (abs(FLastClickPoint.x - x) > (GetSystemMetrics(SM_CXDOUBLECLK) div 2)) or
|
||||||
|
(abs(FLastClickPoint.y - y) > (GetSystemMetrics(SM_CYDOUBLECLK) div 2)) or
|
||||||
|
(cardinal(aCurrentTime - FLastClickTime) > GetDoubleClickTime);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.Panel1Enter(Sender: TObject);
|
||||||
|
begin
|
||||||
|
chrmosr.SendFocusEvent(True);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.Panel1Exit(Sender: TObject);
|
||||||
|
begin
|
||||||
|
chrmosr.SendFocusEvent(False);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.SnapshotBtnClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if SaveDialog1.Execute then Panel1.SaveToFile(SaveDialog1.FileName);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.SnapshotBtnEnter(Sender: TObject);
|
||||||
|
begin
|
||||||
|
chrmosr.SendFocusEvent(False);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWebBrowserFrm.Timer1Timer(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Timer1.Enabled := False;
|
||||||
|
|
||||||
|
if chrmosr.CreateBrowser(nil, '') then
|
||||||
|
chrmosr.InitializeDragAndDrop(Panel1)
|
||||||
|
else
|
||||||
|
if not(chrmosr.Initialized) then Timer1.Enabled := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user