diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..274f440b --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,4 @@ +github: salvadordf +patreon: salvadordf +liberapay: salvadordf +custom: https://paypal.me/briskbard diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..64284b90 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +--- +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" diff --git a/.github/workflows/make.pas b/.github/workflows/make.pas new file mode 100644 index 00000000..27c5fc75 --- /dev/null +++ b/.github/workflows/make.pas @@ -0,0 +1,223 @@ +//castle-engine.io/modern_pascal + +program Make; +{$mode objfpc}{$H+} + +uses + Classes, + SysUtils, + StrUtils, + FileUtil, + LazFileUtils, + Zipper, + fphttpclient, + RegExpr, + openssl, + LazUTF8, + opensslsockets, + eventlog, + Process; + + function OutLog(const Knd: TEventType; const Msg: string): string; + begin + case Knd of + etError: Result := #27'[31m%s: %s'#27'[0m'; + etInfo: Result := #27'[32m%s: %s'#27'[0m'; + etDebug: Result := #27'[33m%s: %s'#27'[0m'; + end; + Writeln(stderr, UTF8ToConsole(Result.Format([FormatDateTime('hh:nn:ss', Time), Msg]))); + end; + + function AddPackage(const Path: string): string; + begin + with TRegExpr.Create do + begin + Expression := + {$IFDEF MSWINDOWS} + '(cocoa|x11|_template)' + {$ELSE} + '(cocoa|gdi|_template)' + {$ENDIF} + ; + if not Exec(Path) then + if RunCommand('lazbuild', ['--add-package-link', Path], Result, [poStderrToOutPut]) then + OutLog(etDebug, 'Add package:'#9 + Path) + else + begin + ExitCode += 1; + OutLog(etError, Result); + end; + Free; + end; + end; + + function SelectString(const Input, Reg: string): string; + var + Line: string; + begin + Result := EmptyStr; + with TRegExpr.Create do + begin + Expression := Reg; + for Line in Input.Split(LineEnding) do + if Exec(Line) then + Result += Line + LineEnding; + Free; + end; + end; + + function RunTest(const Path: String): string; + begin + OutLog(etDebug, #9'run:'#9 + Path); + if RunCommand(Path, ['--all', '--format=plain'], Result, [poStderrToOutPut]) then + OutLog(etInfo, #9'success!') + else + begin + ExitCode += 1; + OutLog(etError, Result); + end; + end; + + function AddDDL(const LibPath, Path: String): string; + begin + OutLog(etDebug, #9'add:'#9 + Path); + if not FileExists(LibPath + ExtractFileName(Path)) then + if RunCommand('sudo', ['bash', '-c', 'cp %s %s; ldconfig --verbose'.Format([Path, LibPath])], Result, [poStderrToOutPut]) then + OutLog(etInfo, #9'success!') + else + begin + ExitCode += 1; + OutLog(etError, Result); + end; + end; + + function BuildProject(const Text, Path: string): string; + begin + OutLog(etDebug, 'Build from:'#9 + Path); + if RunCommand('lazbuild', + ['--build-all', '--recursive', '--no-write-project', Path], Result, [poStderrToOutPut]) then + begin + Result := SelectString(Result, 'Linking').Split(' ')[2].Replace(LineEnding, EmptyStr); + OutLog(etInfo, #9'to:'#9 + Result); + if Text.Contains('program') and Text.Contains('consoletestrunner') then + RunTest(Result) + else if Text.Contains('library') and Text.Contains('exports') then + AddDDL('/usr/lib/', Result) + end + else + begin + ExitCode += 1; + OutLog(etError, SelectString(Result, '(Fatal|Error):')); + end; + end; + + function DownloadFile(const Uri: string): string; + var + OutFile: TStream; + begin + InitSSLInterface; + Result := GetTempFileName; + OutFile := TFileStream.Create(Result, fmCreate or fmOpenWrite); + with TFPHttpClient.Create(nil) do + begin + try + AddHeader('User-Agent', 'Mozilla/5.0 (compatible; fpweb)'); + AllowRedirect := True; + Get(Uri, OutFile); + OutLog(etDebug, 'Download from %s to %s'.Format([Uri, Result])); + finally + Free; + OutFile.Free; + end; + end; + end; + + procedure UnZip(const ZipFile, ZipPath: string); + begin + with TUnZipper.Create do + begin + try + FileName := ZipFile; + OutputPath := ZipPath; + Examine; + UnZipAllFiles; + OutLog(etDebug, 'Unzip from'#9 + ZipFile + #9'to'#9 + ZipPath); + DeleteFile(ZipFile); + finally + Free; + end; + end; + end; + + function InstallOPM(const Path: string): string; + begin + Result := + {$IFDEF MSWINDOWS} + GetEnvironmentVariable('APPDATA') + '\.lazarus\onlinepackagemanager\packages\' + {$ELSE} + GetEnvironmentVariable('HOME') + '/.lazarus/onlinepackagemanager/packages/' + {$ENDIF} + + Path; + if not DirectoryExists(Result) then + begin + if ForceDirectories(Result) then + UnZip(DownloadFile('https://packages.lazarus-ide.org/%s.zip'.Format([Path])), Result); + end; + end; + + function BuildAll(const DT: TDateTime; const Dependencies: array of string): string; + var + List: TStringList; + begin + if FileExists('.gitmodules') then + if RunCommand('git', ['submodule', 'update', '--init', '--recursive', + '--force', '--remote'], Result, [poStderrToOutPut]) then + OutLog(etInfo, Result) + else + begin + ExitCode += 1; + OutLog(etError, Result); + end; + List := FindAllFiles(GetCurrentDir, '*.lpk'); + try + for Result in Dependencies do + List.AddStrings(FindAllFiles(InstallOPM(Result), '*.lpk')); + for Result in List do + AddPackage(Result); + List := FindAllFiles(GetCurrentDir, '*.lpi'); + List.Sort; + for Result in List do + if not Result.Contains(DirectorySeparator + 'use' + DirectorySeparator) then + BuildProject(ReadFileToString(Result.Replace('.lpi', '.lpr')), Result); + finally + List.Free; + end; +{ + if not RunCommand('delp', ['-r', GetCurrentDir], Result, [poStderrToOutPut]) then + OutLog(etError, Result); +} + OutLog(etDebug, 'Duration:'#9 + FormatDateTime('hh:nn:ss', Time - DT)); + case ExitCode of + 0: OutLog(etInfo, 'Errors:'#9 + ExitCode.ToString); + else + OutLog(etError, 'Errors:'#9 + ExitCode.ToString); + end; + end; + +//============================================================================== +// ENDPOINT +//============================================================================== + +begin + try + if ParamCount > 0 then + case ParamStr(1) of + 'build': BuildAll(Time, ['DCPcrypt']); + else + OutLog(etDebug, ParamStr(1)); + end; + except + on E: Exception do + OutLog(etError, E.ClassName + #9 + E.Message); + end; +end. diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml new file mode 100644 index 00000000..14cb0b92 --- /dev/null +++ b/.github/workflows/make.yml @@ -0,0 +1,64 @@ +--- +name: Make + +on: + schedule: + - cron: '0 0 1 * *' + push: + branches: + - "**" + pull_request: + branches: + - master + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: ${{ matrix.os }} + timeout-minutes: 120 + strategy: + matrix: + os: + - ubuntu-latest + # - windows-latest + + steps: + - name: Checkout + uses: actions/checkout@v6 + with: + submodules: true + + - name: Build on Linux + if: runner.os == 'Linux' + shell: bash + run: | + set -xeuo pipefail + sudo bash -c ' + apt-get update; apt-get -y install lazarus + ' >/dev/null + declare -rx INSTANTFPCOPTIONS=-Fu/usr/lib/lazarus/*/components/lazutils + instantfpc '.github/workflows/make.pas' build + + - name: Build on Windows + if: runner.os == 'Windows' + shell: powershell + run: | + $ErrorActionPreference = 'stop' + Set-PSDebug -Strict + New-Variable -Option Constant -Name VAR -Value @{ + Uri = 'https://is.gd/Yuk8a1' + OutFile = (New-TemporaryFile).FullName + '.exe' + } + Invoke-WebRequest @VAR + & $VAR.OutFile.Replace('Temp', 'Temp\.') /SP- /VERYSILENT /NORESTART ` + /SUPPRESSMSGBOXES | Out-Null + $Env:PATH+=';C:\Lazarus' + (Get-Command 'lazbuild').Source | Out-Host + $Env:PATH+=';C:\Lazarus\fpc\3.2.2\bin\x86_64-win64' + (Get-Command 'instantfpc').Source | Out-Host + $Env:INSTANTFPCOPTIONS='-FuC:\Lazarus\components\lazutils' + instantfpc '.github\workflows\make.pas' build diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..946d7a89 --- /dev/null +++ b/.gitignore @@ -0,0 +1,82 @@ +# Uncomment these types if you want even more clean repository. But be careful. +# It can make harm to an existing project source. Read explanations below. +# +# Resource files are binaries containing manifest, project icon and version info. +# They can not be viewed as text or compared by diff-tools. Consider replacing them with .rc files. +#*.res +# +# Type library file (binary). In old Delphi versions it should be stored. +# Since Delphi 2009 it is produced from .ridl file and can safely be ignored. +#*.tlb +# +# Diagram Portfolio file. Used by the diagram editor up to Delphi 7. +# Uncomment this if you are not using diagrams or use newer Delphi version. +#*.ddp +# +# Visual LiveBindings file. Added in Delphi XE2. +# Uncomment this if you are not using LiveBindings Designer. +#*.vlb +# +# Deployment Manager configuration file for your project. Added in Delphi XE2. +# Uncomment this if it is not mobile development and you do not use remote debug feature. +#*.deployproj +# +# C++ object files produced when C/C++ Output file generation is configured. +# Uncomment this if you are not using external objects (zlib library for example). +#*.obj +# + +# Delphi compiler-generated binaries (safe to delete) +*.exe +*.dll +*.bpl +*.bpi +*.dcp +*.so +*.apk +*.drc +*.map +*.dres +*.rsm +*.tds +*.dcu +*.lib +*.a +*.o +*.ocx + +# Delphi autogenerated files (duplicated info) +*.cfg +*.hpp +*Resource.rc + +# Delphi local files (user-specific info) +*.local +*.identcache +*.projdata +*.tvsconfig +*.dsk +*.dsv + +# Delphi history and backups +__history/ +__recovery/ +*.~* + +# FPC / Lazarus +*.lps +**/backup +**/lib/i386-win32 +**/lib/x86_64-win64 + +# Castalia statistics file (since XE7 Castalia is distributed with Delphi) +*.stat + +# Project specific +bin/*.log +bin/*.pak +bin/locales +bin/*.bin +bin/*.dat +demos/FMXExternalPumpBrowser/FMXExternalPumpBrowser.res + diff --git a/Delphinus.Info.json b/Delphinus.Info.json new file mode 100644 index 00000000..43ef2307 --- /dev/null +++ b/Delphinus.Info.json @@ -0,0 +1,17 @@ +{ + "id": "{45F23B07-EB18-4F94-B753-CDAA46B6B6D4}", + "picture": "packages\\res\\tchromium.png", + "licenses": + [ + { + "type": "LGPL-2.1-only", + "file": "LICENSE.md" + } + { + "type": "MPL-1.1", + "file": "LICENSE.md" + } + ], + "platforms": "Win32;Win64", + "dependencies": [] +} diff --git a/Delphinus.Install.json b/Delphinus.Install.json new file mode 100644 index 00000000..aa4e033b --- /dev/null +++ b/Delphinus.Install.json @@ -0,0 +1,109 @@ +{ + "search_pathes": + [ + { + "pathes": "source", + "platforms": "Win32;Win64" + } + ], + "browsing_pathes": + [ + { + "pathes": "source", + "platforms": "Win32;Win64" + } + ], + + "source_folders": + [ + { + "folder": "\\", + "base": "\\", + "recursive": true, + "filter": "*;*.*" + } + ], + + "raw_folders": [], + + "projects": + [ + { + "project": "packages\\CEF4Delphi.dproj", + "compiler_min": 22, + "compiler_max": 22, + } + { + "project": "packages\\CEF4Delphi.dproj", + "compiler_min": 23, + "compiler_max": 23, + } + { + "project": "packages\\CEF4Delphi.dproj", + "compiler_min": 24, + "compiler_max": 24, + } + { + "project": "packages\\CEF4Delphi.dproj", + "compiler_min": 25, + "compiler_max": 25, + } + { + "project": "packages\\CEF4Delphi.dproj", + "compiler_min": 26, + "compiler_max": 26, + } + { + "project": "packages\\CEF4Delphi.dproj", + "compiler_min": 27, + "compiler_max": 27, + } + { + "project": "packages\\CEF4Delphi.dproj", + "compiler_min": 28, + "compiler_max": 28, + } + { + "project": "packages\\CEF4Delphi.dproj", + "compiler_min": 29, + "compiler_max": 29, + } + { + "project": "packages\\CEF4Delphi.dproj", + "compiler_min": 30, + "compiler_max": 30, + } + { + "project": "packages\\CEF4Delphi.dproj", + "compiler_min": 31, + "compiler_max": 31, + } + { + "project": "packages\\CEF4Delphi_FMX.dproj", + "compiler_min": 32, + "compiler_max": 32, + } + { + "project": "packages\\CEF4Delphi_FMX.dproj", + "compiler_min": 33, + "compiler_max": 33, + } + { + "project": "packages\\CEF4Delphi_FMX.dproj", + "compiler_min": 34, + "compiler_max": 34, + } + { + "project": "packages\\CEF4Delphi_FMX.dproj", + "compiler_min": 35, + "compiler_max": 35, + } + { + "project": "packages\\CEF4Delphi_FMX.dproj", + "compiler_min": 36, + "compiler_max": 36, + } + ], + + "experts": [] +} diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 00000000..cc423535 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,409 @@ +# CEF4Delphi + +CEF4Delphi is based on [DCEF3](https://github.com/hgourvest/dcef3) and [fpCEF3](https://github.com/dliw/fpCEF3) that use [CEF](https://bitbucket.org/chromiumembedded/cef/) to embed a chromium-based browser in Delphi and Lazarus/FPC applications. + +The original licenses of those projects still apply to CEF4Delphi. + +For more information about CEF4Delphi visit : + https://www.briskbard.com/index.php?lang=en&pageid=cef + + Copyright © 2026 Salvador Díaz Fau. All rights reserved. + + +## Original licenses + +### DCEF3 license + + 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
+
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. + + +### fpCEF3 license + +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/README.md b/README.md index 3fb1d4a4..5d7eae0e 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,79 @@ # CEF4Delphi [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Use%20CEF4Delphi%20to%20embed%20Chromium-based%20browsers%20in%20your%20application&url=https://github.com/salvadordf/CEF4Delphi&via=briskbard&hashtags=cef4delphi,delphi,lazarus,fpc) -CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC. +CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chromium-based browsers in applications made with [Delphi](https://www.embarcadero.com/products/delphi/starter) or [Lazarus/FPC](https://www.lazarus-ide.org/) for Windows, Linux and MacOS. -CEF4Delphi is based on DCEF3, made by Henri Gourvest. The original license of DCEF3 still applies to CEF4Delphi. Read the license terms in the first lines of any *.pas file. +CEF4Delphi is based on DCEF3 and fpCEF3. The original license of those projects still applies to CEF4Delphi. Read the license terms in the LICENSE.md file. -CEF4Delphi uses CEF 3.3497.1831.g461fa1f which includes Chromium 69.0.3497.100. -The CEF3 binaries used by CEF4Delphi are available for download at spotify : -* [32 bits](http://opensource.spotify.com/cefbuilds/cef_binary_3.3497.1831.g461fa1f_windows32.tar.bz2) -* [64 bits](http://opensource.spotify.com/cefbuilds/cef_binary_3.3497.1831.g461fa1f_windows64.tar.bz2) +CEF4Delphi uses CEF 146.0.12 which includes Chromium 146.0.7680.179. +The CEF binaries used by CEF4Delphi are available for download at Spotify : +* [Windows 32 bits](https://cef-builds.spotifycdn.com/cef_binary_146.0.12%2Bg6214c8e%2Bchromium-146.0.7680.179_windows32.tar.bz2) +* [Windows 64 bits](https://cef-builds.spotifycdn.com/cef_binary_146.0.12%2Bg6214c8e%2Bchromium-146.0.7680.179_windows64.tar.bz2) +* [Linux x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_146.0.12%2Bg6214c8e%2Bchromium-146.0.7680.179_linux64.tar.bz2) +* [Linux ARM 32 bits](https://cef-builds.spotifycdn.com/cef_binary_146.0.12%2Bg6214c8e%2Bchromium-146.0.7680.179_linuxarm.tar.bz2) +* [Linux ARM 64 bits](https://cef-builds.spotifycdn.com/cef_binary_146.0.12%2Bg6214c8e%2Bchromium-146.0.7680.179_linuxarm64.tar.bz2) +* [MacOS x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_146.0.12%2Bg6214c8e%2Bchromium-146.0.7680.179_macosx64.tar.bz2) -CEF4Delphi was developed and tested on Delphi 10.2 Tokyo and it has been tested in Delphi 7, Delphi XE, Delphi 10 and Lazarus 1.8.4/FPC 3.0.4. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components. +CEF4Delphi was developed and tested on Delphi 13.1 and it has been tested in Delphi 6, Delphi XE, Delphi 10, Delphi 11 and Lazarus 4.6/FPC 3.2.2. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components. + +CEF4Delphi demos have been tested in Windows 10, Windows 11, Linux Mint 22.3 and Raspberry Pi OS. ## Links * [Installation instructions and more information about CEF4Delphi](https://www.briskbard.com/index.php?lang=en&pageid=cef) * [Developer Forums](https://www.briskbard.com/forum) -* These components need Windows 7, 8, 8.1, 10 or newer to run. If you need Windows XP and Vista support use [OldCEF4Delphi](https://github.com/salvadordf/OldCEF4Delphi) +* The Windows components need Windows 10, 11 or newer to run. If you need Windows XP and Vista support use [OldCEF4Delphi](https://github.com/salvadordf/OldCEF4Delphi). If you need Windows 7, 8/8.1 support use [this CEF4Delphi release](https://github.com/salvadordf/CEF4Delphi/releases/tag/109.0.5414.120). + +## Stable releases +This is the development branch and it may have issues. Use the [latest release](https://github.com/salvadordf/CEF4Delphi/releases/latest) if you need a stable component. -## Donate +## Support If you find this project useful, please consider making a donation. [![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FTSD2CCGXTD86) + +You can also support this project with Patreon. + +Patreon donate button + +You can also support this project with Liberapay. + +Donate using Liberapay + +Additional: +Delphinus-Support + +## Related projects +* [WebView4Delphi](https://github.com/salvadordf/WebView4Delphi) +* [WebUI4Delphi](https://github.com/salvadordf/WebUI4Delphi) +* [WebUI4CSharp](https://github.com/salvadordf/WebUI4CSharp) +* [Tesseract4Delphi](https://github.com/salvadordf/Tesseract4Delphi) +* [VirtualTouchKeyboard4Delphi](https://github.com/salvadordf/VirtualTouchKeyboard4Delphi) +* [DCEF3](https://github.com/hgourvest/dcef3) +* [fpCEF3](https://github.com/dliw/fpCEF3) +* [CEF](https://bitbucket.org/chromiumembedded/cef/) +* [DCPcrypt](https://sourceforge.net/projects/lazarus-ccr/files/DCPcrypt/) +* [PasDoc](https://pasdoc.github.io/) +* [Chromium](https://chromium.googlesource.com/chromium/src/) +* [CefSharp](https://github.com/cefsharp/CefSharp) +* [CefGlue](https://gitlab.com/xiliumhq/chromiumembedded/cefglue) +* [Cef2Go](https://github.com/cztomczak/cef2go) +* [Energy](https://github.com/energye/energy) +* [java-cef](https://bitbucket.org/chromiumembedded/java-cef) +* [cefpython](https://github.com/cztomczak/cefpython) + +## Other resources +* [Learn Delphi](https://learndelphi.org/) +* [Essential Pascal by Marco Cantù](https://www.marcocantu.com/epascal/) +* [Free Pascal Reference guide](https://www.freepascal.org/docs-html/ref/ref.html) +* [Modern Object Pascal Introduction for Programmers](https://castle-engine.io/modern_pascal) +* [FreePascal from Square One by Jeff Duntemann](http://www.copperwood.com/pub/FreePascalFromSquareOne.pdf) +* [Pascal and Lazarus Books and Magazines](https://wiki.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines) +* [Lazarus Documentation](https://wiki.freepascal.org/Lazarus_Documentation) +* [Delphi Succinctly](https://www.syncfusion.com/succinctly-free-ebooks/delphi) +* [Start Programming using Object Pascal](https://code.sd/startprog/StartProgUsingPascal.pdf) +* [Free Pascal and Lazarus Programming Textbook](https://sourceforge.net/p/lazarus-wiki-projects/code/ci/master/tree/FPC_Lazarus_Textbook/) +* [LAZARUS FREE PASCAL Développement rapide](https://lazaruscomponents.com/2025/11/08/livrel-lazarus-free-pascad/) + +## Attribution +* [Fugue & Diagona icons](http://yusukekamiyamane.com/) +* [FatCow Farm-Fresh Web Icons](https://github.com/gammasoft/fatcow) +* [Material Design Icons](https://github.com/google/material-design-icons) diff --git a/bin/EditorBrowser.html b/bin/EditorBrowser.html new file mode 100644 index 00000000..1912d790 --- /dev/null +++ b/bin/EditorBrowser.html @@ -0,0 +1,11 @@ + + + +

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor +incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis +nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore +eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt +in culpa qui officia deserunt mollit anim id est laborum.

+ + \ No newline at end of file diff --git a/bin/JSWindowBindingWithArrayBuffer.html b/bin/JSWindowBindingWithArrayBuffer.html new file mode 100644 index 00000000..111168c3 --- /dev/null +++ b/bin/JSWindowBindingWithArrayBuffer.html @@ -0,0 +1,21 @@ + + + + +

JS Window Binding with an ArrayBuffer demo.

+ +

The CEF document describing JavaScript Window Bindings is here :
+https://bitbucket.org/chromiumembedded/cef/wiki/JavaScriptIntegration.md

+ +

The following button shows the contents of the ArrayBuffer in window.myobj which was set in the GlobalCEFApp.OnContextCreated event.

+ + + + + + \ No newline at end of file diff --git a/bin/PopupBrowser.html b/bin/PopupBrowser.html index 833447cd..6cb4c79a 100644 --- a/bin/PopupBrowser.html +++ b/bin/PopupBrowser.html @@ -3,12 +3,16 @@

The following button opens google.com in a popup window.

- +

+

+

+

+