Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1169 commits
Select commit Hold shift + click to select a range
dfec99a
Added the Alerts helper to FMXExternalPumpBrowser for macOS
salvadordf Sep 4, 2024
9981b77
Added TChromiumCore.CredentialsService
salvadordf Sep 5, 2024
dfaf639
Added the Alerts helper to AppHelper for macOS
salvadordf Sep 5, 2024
3819aa6
Added one more test site to MobileBrowser demo
salvadordf Sep 6, 2024
ba603a4
Update to CEF 128.4.9
salvadordf Sep 6, 2024
83cc098
Added "Outgoing network socket for connecting" entitlement to FMXExte…
salvadordf Sep 6, 2024
a1f5d91
Added the Alerts helper to the other Lazarus demos for macOS
salvadordf Sep 6, 2024
853510b
Replaced deprecated NSBGOnly with LSUIElement in FMXExternalPumpBrows…
salvadordf Sep 7, 2024
d36c6e3
Merge branch 'master' of https://github.com/salvadordf/CEF4Delphi
salvadordf Sep 7, 2024
e2815ed
Check macOS version before initialization
salvadordf Sep 8, 2024
a42f3df
Fixed issue #527 : Demo ExternalPumpBrowser Helper (GPU) crash on Mac…
salvadordf Sep 9, 2024
b5e337f
Block F1 and F11 in MiniBrowser demos
salvadordf Sep 12, 2024
aba0ec3
Always run TryCloseBrowser in the CEF UI thread
salvadordf Sep 12, 2024
66279dd
Improved loadlibrary error info in Lazarus
salvadordf Sep 12, 2024
a447ac2
Added Delphi 12.2 mention
salvadordf Sep 14, 2024
11eb0f9
Update to CEF 128.4.12
salvadordf Sep 17, 2024
165ab6e
Updated TCefErrorCode values and code comments
salvadordf Sep 17, 2024
f062dad
Updated TCefErrorCode values and code comments
salvadordf Sep 17, 2024
788b65a
Updated readme to Lazarus 3.6
salvadordf Oct 1, 2024
a7a1fd2
Update to CEF 129.0.10
salvadordf Oct 1, 2024
0aef2e6
Update to CEF 129.0.11
salvadordf Oct 3, 2024
cf01920
Fixed issue #535 ; Blurry text in FMX demos using OSR mode.
salvadordf Oct 10, 2024
2b69873
Update to CEF 129.0.12
salvadordf Oct 10, 2024
52bff28
Fixed TChromiumCore.OnRenderCompMsg
salvadordf Oct 16, 2024
0aebca3
Update to CEF 130.1.2
salvadordf Oct 19, 2024
2ada0a9
Update to CEF 130.1.3
salvadordf Oct 22, 2024
f73e603
Update to CEF 130.1.7
salvadordf Oct 23, 2024
627ff6a
Update to CEF 130.1.9
salvadordf Oct 24, 2024
cf106b5
Copy the HTML usiing JS in DOMVIsitor
salvadordf Oct 28, 2024
f0f3e99
Update to CEF 130.1.10
salvadordf Nov 1, 2024
3d93de5
Fixed memory leak in TCEFFileDialogInfo.ConvertExtensions
salvadordf Nov 2, 2024
f26b3f0
Update to CEF 130.1.14
salvadordf Nov 5, 2024
c465423
Update to CEF 130.1.15
salvadordf Nov 6, 2024
00bf20f
Update to CEF 130.1.16
salvadordf Nov 7, 2024
6256c2c
Convert GlobalCEFApp.LogFile to an absolute path
salvadordf Nov 14, 2024
87843f4
Update to CEF 131.2.3
salvadordf Nov 16, 2024
90d937a
Update to CEF 131.2.4
salvadordf Nov 20, 2024
5d4705c
Update to CEF 131.2.7
salvadordf Nov 22, 2024
6badc8f
Fixed ConsoleBrowser2 resize issues
salvadordf Nov 30, 2024
a872564
Possible fix for issue #538
salvadordf Dec 4, 2024
607f7c5
Update to CEF 131.3.1
salvadordf Dec 5, 2024
1d7a2ed
Update to CEF 131.3.1
salvadordf Dec 5, 2024
8e5b4e4
Added a GlobalCEFApp.OnAlreadyRunningAppRelaunch example to the Tabbe…
salvadordf Dec 5, 2024
0c66acb
Update to CEF 131.3.2
salvadordf Dec 12, 2024
571c78a
Update to CEF 131.3.4
salvadordf Dec 13, 2024
ba4ca3a
Windows : Fix popup DevTools issue.
salvadordf Dec 16, 2024
54d4bd1
Fixed GlobalCEFApp.DeleteCache and GlobalCEFApp.DeleteCookies
salvadordf Dec 18, 2024
f9de87d
Fixed invisible select items in FullScreenBrowser demos
salvadordf Dec 19, 2024
373c941
Update to CEF 131.3.5
salvadordf Dec 20, 2024
d93b699
Added TChromiumCore.AutofillCreditCard
salvadordf Dec 21, 2024
7067405
Added more links to free Pascal books.
salvadordf Dec 30, 2024
b1f2a7d
Update LICENSE.md
salvadordf Jan 1, 2025
526634f
Update to CEF 131.4.1
salvadordf Jan 9, 2025
38b9b5a
TabbedBrowser2 demos now use the Chrome style
salvadordf Jan 9, 2025
373a19f
Added WebpageSnapshot demo for UniGUI
salvadordf Jan 13, 2025
2807be6
Update to CEF 132.3.1
salvadordf Jan 17, 2025
1b15a05
fixed versions in readme
salvadordf Jan 17, 2025
f0f4de8
Added the lazarus lpk file that was deleted by mistaker
salvadordf Jan 17, 2025
9e25a06
Update to CEF 132.3.2
salvadordf Feb 4, 2025
e09bf5b
Use the Chrome runtime style in popup windows in the TabbedBrowser2 d…
salvadordf Feb 5, 2025
6760bed
Added IME support to SimpleOSRBrowser in Linux-GTK2 (issue #544)
salvadordf Feb 9, 2025
c0a03f0
Fixed initial browser focus in SimpleOSRBrowser for Linux-GTK2
salvadordf Feb 10, 2025
2081ad5
Block the shortcut to view the HTML source code (Control+U) in MiniBr…
salvadordf Feb 12, 2025
e2bafbd
Update to CEF 133.4.6
salvadordf Feb 16, 2025
44d6976
Removed debug code
salvadordf Feb 16, 2025
7deeeac
Fixed issue #549 : Latest CEF4Delphi Master .dpk does not compile
salvadordf Feb 19, 2025
0ce2206
Fixed issue #547 : Render process crash in the JSRTTIExtension demo
salvadordf Feb 22, 2025
345c99c
Use Chrome runtime style in SchemeRegistrationBrowser to fix issue #548
salvadordf Feb 22, 2025
9c41b46
Update to CEF 133.4.0
salvadordf Feb 26, 2025
032e1e5
Removed GlobalCEFApp.ApiHashUniversal mention in MiniBrowser
salvadordf Feb 26, 2025
dc2de4f
Added custom JS dialogs to SimpleOSRBrowser
salvadordf Feb 26, 2025
cfba87c
Update to CEF 133.4.1
salvadordf Feb 27, 2025
97e967f
Update to CEF 133.4.5
salvadordf Mar 1, 2025
0206d90
Enable multiple tabs and popup windows in TinyBrowser2
salvadordf Mar 5, 2025
752306b
Update to CEF 133.4.8
salvadordf Mar 8, 2025
e223d1c
Update to CEF 134.3.1
salvadordf Mar 13, 2025
04c19a3
Argument name change in TOnPreferenceChangedEvent
salvadordf Mar 13, 2025
8112808
Update to CEF 134.3.2
salvadordf Mar 14, 2025
b731dee
Added a menu option to download a file in MiniBrowser
salvadordf Mar 15, 2025
fba986d
Added GlobalCEFApp.PasswordStorage in Linux
salvadordf Mar 19, 2025
c777bfc
Update to CEF 134.3.5
salvadordf Mar 20, 2025
3138463
Update to CEF 134.3.6
salvadordf Mar 21, 2025
e6f1891
Update to CEF 134.3.7
salvadordf Mar 23, 2025
5de8142
Update to CEF 134.3.8
salvadordf Mar 25, 2025
e6c2ee7
Update to CEF 134.3.9
salvadordf Mar 28, 2025
f070688
Update to CEF 134.3.11
salvadordf Apr 1, 2025
d411184
Update to CEF 135.0.15
salvadordf Apr 2, 2025
2ad0c8a
Update to CEF 135.0.17
salvadordf Apr 3, 2025
73b3328
Update to CEF 135.0.20
salvadordf Apr 10, 2025
56bd985
Update to CEF 135.0.21
salvadordf Apr 18, 2025
232e06c
Update to CEF 135.0.22
salvadordf Apr 25, 2025
3904180
Added GlobalCEFApp.GTKVersion in Linux
salvadordf Apr 25, 2025
207e84f
Removed old conditionals from GlobalCEFApp
salvadordf Apr 26, 2025
5b294f6
add ci
theavege Apr 29, 2025
33d76d9
add DCPcrypt
theavege Apr 29, 2025
febd697
Merge pull request #559 from theavege/add/ci
salvadordf May 2, 2025
8752850
Increment internalversion in update_CEF4Delphi.json
salvadordf May 2, 2025
770019b
Update to CEF 136.1.1
salvadordf May 4, 2025
0f6d0fc
Added Lazarus 4.0 mention
salvadordf May 5, 2025
4a264fc
Update to CEF 136.1.2
salvadordf May 6, 2025
b965e23
Update to CEF 136.1.3
salvadordf May 7, 2025
d3f2b48
Update to CEF 136.1.4
salvadordf May 9, 2025
6285747
Added aNewWindowStyle parameter to TFMXWindowParent.Reparent
salvadordf May 12, 2025
b30adaa
Update to CEF 136.1.5
salvadordf May 15, 2025
13ce632
Update to CEF 136.1.6
salvadordf May 16, 2025
f3ee459
Enable DPI aware setting in Lazarus demos for Windows
salvadordf May 20, 2025
44caea2
Added TChromiumCore.AutofillSaveData
salvadordf May 22, 2025
9ac32a0
Update to CEF 137.0.4
salvadordf May 30, 2025
1608288
Update to CEF 137.0.8
salvadordf May 30, 2025
1e5fbb0
Update to CEF 137.0.10
salvadordf Jun 5, 2025
3f8c396
Fixed memory leak in JSWindowBindingWithArrayBuffer
salvadordf Jun 9, 2025
cb793de
Update to CEF 137.0.11
salvadordf Jun 12, 2025
d0983b7
Update to CEF 137.0.17
salvadordf Jun 14, 2025
44d91fb
Update to CEF 137.0.19
salvadordf Jun 24, 2025
92278a3
Update to CEF 138.0.15
salvadordf Jun 28, 2025
396755f
Update to CEF 138.0.17
salvadordf Jul 3, 2025
80cb846
Update to CEF 138.0.18
salvadordf Jul 11, 2025
302ee14
Update to CEF 138.0.21
salvadordf Jul 12, 2025
24eb369
Update to CEF 138.0.25
salvadordf Jul 17, 2025
3374141
Update to CEF 138.0.26
salvadordf Jul 18, 2025
0a390bc
Added Rad Studio 13.0 to the defines
salvadordf Jul 22, 2025
6ec5c30
Update to CEF 138.0.27
salvadordf Jul 22, 2025
df8c205
Update to CEF 138.0.29
salvadordf Jul 24, 2025
c3ee67c
Update to CEF 138.0.33
salvadordf Jul 25, 2025
b700253
Updated documentation
salvadordf Jul 25, 2025
58fbd83
Removed TChromiumCore.AcceptLanguageList
salvadordf Jul 25, 2025
229da76
Remove AcceptLanguageList from the MiniBrowser demos
salvadordf Jul 26, 2025
72f863c
Added the KioskBrowser demo
salvadordf Jul 26, 2025
c1e9b5e
Update to CEF 138.0.34
salvadordf Jul 31, 2025
2bb9d86
Update to CEF 138.0.36
salvadordf Aug 6, 2025
4d950db
Update to CEF 139.0.17
salvadordf Aug 9, 2025
1754c84
Added KioskBrowser for Lazarus
salvadordf Aug 10, 2025
57f283d
Update to CEF 139.0.20
salvadordf Aug 14, 2025
360d602
Update to CEF 139.0.23
salvadordf Aug 15, 2025
c750228
Update to CEF 139.0.24
salvadordf Aug 20, 2025
3daee8a
Update to CEF 139.0.26
salvadordf Aug 21, 2025
8871908
Update to CEF 139.0.28
salvadordf Aug 22, 2025
6fc5983
Fixed GetScreenDPI in VirtualBox with Linux guest and using Lazarus
salvadordf Aug 25, 2025
372bea8
Added SimpleOSRBrowser demo for Lazarus using GTK3
salvadordf Aug 25, 2025
7f75aac
Fixed Lazarus package
salvadordf Aug 25, 2025
68d581f
GTK3 demos for Lazarus adapted to the new TBufferPanel events.
salvadordf Aug 26, 2025
f32b44a
Fixed IME in GTK3 for Lazarus
salvadordf Aug 26, 2025
00fbd43
Fixed build issue in Windows
salvadordf Aug 26, 2025
2ed634e
Update to CEF 139.0.30
salvadordf Aug 27, 2025
744c05d
Update to CEF 139.0.37
salvadordf Aug 28, 2025
dbf556f
Fixed build issue in Delphi 2007
salvadordf Aug 29, 2025
8d0403e
Update to CEF 139.0.38
salvadordf Aug 30, 2025
7412787
Added required entitlements to FMXExternalPumpBrowser in macOS
salvadordf Aug 30, 2025
dd3dfe5
Bump actions/checkout from 4 to 5
dependabot[bot] Sep 2, 2025
cd67fb9
Merge pull request #568 from salvadordf/dependabot/github_actions/act…
salvadordf Sep 2, 2025
0f1ba28
Added GTKBrowser demo. (work in progress)
salvadordf Sep 7, 2025
491eba7
Increased InternalVersion
salvadordf Sep 7, 2025
0a97240
Added code comments to GTKBrowser
salvadordf Sep 9, 2025
9d38ca7
Update to CEF 139.0.40
salvadordf Sep 11, 2025
c9aba9c
Fixed build issue in QT projects
salvadordf Sep 13, 2025
ded23f3
Added initial QT support (work in progress)
salvadordf Sep 13, 2025
ce571c5
Increment InternalVersion value
salvadordf Sep 13, 2025
435cfe8
Added QT6 support
salvadordf Sep 14, 2025
9533fc2
Fixed issue #569. Multiple fixes to bugs in temporary directory clean…
salvadordf Sep 17, 2025
e5ad04f
Added SimpleOSRBrowser demo for QT6 in Linux (work in progress)
salvadordf Sep 18, 2025
b5c6f18
Update to CEF 140.1.14
salvadordf Sep 19, 2025
de7dbe1
Fixed keyboard issue in Lazarus_Linux_QT6\SimpleOSRBrowser
salvadordf Sep 20, 2025
f893242
Added SimpleOSRBrowser for QT5
salvadordf Sep 21, 2025
ed15f1c
Fixed missing GlobalCEFApp property in SimpleOSRBrowser for QT
salvadordf Sep 21, 2025
4a33371
Added transparency test code to SimpleOSRBrowser in QT
salvadordf Sep 21, 2025
774e1d8
Updated TCefClearDataStorageTypes values
salvadordf Sep 26, 2025
8ec7c17
Removed unnecessary include files and conditionals in Lazarus demos
salvadordf Oct 6, 2025
c45521d
Fixed chrmosrBeforePopup arguments in PopupBrowser for Lazarus
salvadordf Oct 7, 2025
22a7a2f
Workaround for issue #529. The PopupBrowser demo for Lazarus in Windo…
salvadordf Oct 8, 2025
3701c7b
Fixed exception reading the X11Display in Linux if Wayland is enabled
salvadordf Oct 11, 2025
30a66a0
Added GlobalCEFApp.DisplayServer
salvadordf Oct 11, 2025
d9515fc
Fixed some Wayland compatibility issues in the Lazarus demos for Linux
salvadordf Oct 11, 2025
8d047e2
Increased InternalVersion
salvadordf Oct 11, 2025
f8834c0
Fixed possible access violation in Lazarus_Linux_QT6/SimpleBrowser
salvadordf Oct 12, 2025
ff3369a
Update to CEF 141.0.5
salvadordf Oct 15, 2025
d527121
Update to CEF 141.0.6
salvadordf Oct 16, 2025
5436482
Show an error message when CEF initialization is not successfull.
salvadordf Oct 17, 2025
ccd0a3f
Show an error message when CEF initialization is not successfull.
salvadordf Oct 17, 2025
ff698f6
Update to CEF 141.0.7
salvadordf Oct 18, 2025
c790411
Update to CEF 141.0.8
salvadordf Oct 21, 2025
79577e7
Update to CEF 141.0.9
salvadordf Oct 22, 2025
5a9e909
Added GlobalCEFApp.FieldTrialConfig
salvadordf Oct 22, 2025
cb94a47
Update to CEF 141.0.10
salvadordf Oct 23, 2025
c965b0f
Fixed build issue in old Delphi versions.
salvadordf Oct 23, 2025
093555d
Fixed MiniBrowser build issue in old Delphi versions
salvadordf Oct 23, 2025
7587909
Added GlobalCEFApp.DoNotDeElevate
salvadordf Oct 24, 2025
f0bd5bc
Update to CEF 141.0.11
salvadordf Oct 24, 2025
ff091dc
Only call ShowX11Message when the display server is X11
salvadordf Oct 30, 2025
b6b2048
Small improvements reading the display server value in Linux
salvadordf Nov 8, 2025
0c00b11
Update to CEF 142.0.8
salvadordf Nov 9, 2025
5a55481
Show more post information in the SimpleServer demo
salvadordf Nov 9, 2025
936afd0
Dump header information in SimpleServer demo
salvadordf Nov 10, 2025
13ca041
Update to CEF 142.0.10
salvadordf Nov 11, 2025
cde2c4f
Update to CEF 142.0.14
salvadordf Nov 18, 2025
675dba3
Update to CEF 142.0.15
salvadordf Nov 20, 2025
54fa717
Update to CEF 142.0.16
salvadordf Nov 26, 2025
8f33772
Update to CEF 142.0.17
salvadordf Nov 26, 2025
31a0bf7
Bump actions/checkout from 5 to 6
dependabot[bot] Dec 1, 2025
55e949c
Merge pull request #579 from salvadordf/dependabot/github_actions/act…
salvadordf Dec 3, 2025
0a970b7
Renamed "message" argument to "message_" in TChromiumCore.OnConsoleMe…
salvadordf Dec 5, 2025
d42852c
Update to CEF 143.0.9
salvadordf Dec 10, 2025
c935e41
Update to CEF 143.0.10
salvadordf Dec 12, 2025
1a9ba4a
Added GlobalCEFApp.NoDefaultBrowserCheck
salvadordf Dec 13, 2025
c5a6c3b
Removed TCefBatterySaverModeState
salvadordf Dec 15, 2025
1879a18
Use the chrome runtime style in the SimpleFMXBrowser demo
salvadordf Dec 15, 2025
81ec2fe
Use the chrome runtime style in the FMXTabbedBrowser demo
salvadordf Dec 15, 2025
1ba5073
Added SubProcess and PopupBrowser demos for QT6 in Linux
salvadordf Dec 17, 2025
58dd4c3
Added the MiniBrowser demo for QT6 in Linux
salvadordf Dec 17, 2025
cbc5d2e
Added Free Pascal and Lazarus Programming Textbook
salvadordf Dec 17, 2025
c4daebf
Update to CEF 143.0.11
salvadordf Dec 18, 2025
bd2d4cb
Added the TabbedBrowser2 demo for QT6 in Linux
salvadordf Dec 18, 2025
dae9652
Fixed browser destruction issue in QT6 demos
salvadordf Dec 19, 2025
62d9d64
Fixed code comments in QT6 demos
salvadordf Dec 19, 2025
cd8ba2e
Update to CEF 143.0.13
salvadordf Dec 20, 2025
18e8c62
Fixed an issue converting a boolean to integer using Ord in Lazarus.
salvadordf Dec 21, 2025
769460a
Fixed TChromium.OnBeforePopup arguments in PopupBrowser2 demo for Laz…
salvadordf Dec 21, 2025
6be46b2
Removed unused units from the uses clause
salvadordf Dec 29, 2025
030e679
Removed most compiler warnings and hints in Lazarus.
salvadordf Dec 31, 2025
9a6d476
Update copyright year to 2026
salvadordf Jan 1, 2026
be0cdea
Fixed false warning about uninitialized variables in Lazarus
salvadordf Jan 2, 2026
4043641
Added a link to the VirtualTouchKeyboard4Delphi project
salvadordf Jan 4, 2026
f58824e
Add new resource link for Lazarus Free Pascal
salvadordf Jan 5, 2026
f716538
Update to CEF 143.0.14
salvadordf Jan 8, 2026
3beab66
Update to CEF 144.0.6
salvadordf Jan 21, 2026
3dc0ea8
Update to CEF 144.0.7
salvadordf Jan 23, 2026
a3f3392
Update to CEF 144.0.11
salvadordf Jan 26, 2026
0e0fb90
Update to CEF 144.0.12
salvadordf Feb 1, 2026
6d4c3b8
Implemented TChromium.OnOpenUrlFromTab in SimpleOSRBrowser
salvadordf Feb 4, 2026
b61d79a
Update to CEF 144.0.13
salvadordf Feb 5, 2026
f314441
Update to CEF 145.0.22
salvadordf Feb 12, 2026
d0ff96b
Update to CEF 145.0.23
salvadordf Feb 14, 2026
0bfe26b
Update to CEF 145.0.24
salvadordf Feb 17, 2026
b9f9198
Update to CEF 145.0.25
salvadordf Feb 19, 2026
0b6db7d
Update to CEF 145.0.26
salvadordf Feb 20, 2026
e3c1cfb
Update to CEF 145.0.27
salvadordf Feb 25, 2026
9bc2f17
Fixed issue #583 thanks to Gabriel Moraru. invalid pointer typecast i…
salvadordf Feb 28, 2026
fb082e8
Fixed 64 bits compatibility in FMX thanks to Gabriel Moraru
salvadordf Mar 2, 2026
50abc82
Update to CEF 145.0.28
salvadordf Mar 6, 2026
0974f61
Fixed interval data type in TFMXWorkScheduler.
salvadordf Mar 14, 2026
cad90c3
Fixed 64bit compatibility issue in TOLEDataObject.DupGlobalMem
salvadordf Mar 14, 2026
37d42d1
Update to CEF 146.0.5 (BETA)
salvadordf Mar 19, 2026
2ffad7e
Fixed readme links
salvadordf Mar 19, 2026
01cc2b8
Update to CEF 146.0.6 (STABLE)
salvadordf Mar 23, 2026
190e3ee
Update to CEF 146.0.7
salvadordf Mar 26, 2026
af5861d
Update to CEF 146.0.9
salvadordf Mar 30, 2026
27cb213
Fixed docs
salvadordf Mar 30, 2026
30d9edd
Update to CEF 146.0.10
salvadordf Apr 4, 2026
fa8b9da
Update to CEF 146.0.11
salvadordf Apr 15, 2026
0209ac3
Update to CEF 146.0.12
salvadordf Apr 19, 2026
0c7726d
chore(windows): Merge tag '146.0.7680.179' into feat/windows/15896/sy…
rc-swag Aug 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
github: salvadordf
patreon: salvadordf
liberapay: salvadordf
custom: https://paypal.me/briskbard
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
223 changes: 223 additions & 0 deletions .github/workflows/make.pas
Original file line number Diff line number Diff line change
@@ -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.
64 changes: 64 additions & 0 deletions .github/workflows/make.yml
Original file line number Diff line number Diff line change
@@ -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
82 changes: 82 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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

Loading
Loading