Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
ebc6d2a
chore(windows): Delphi 11/12 source compatibility
MattGyverLee Jun 2, 2026
a57500f
docs(windows): surface KEYMAN_DELPHI_VERSION in windows.md
MattGyverLee Jul 2, 2026
b611e81
revert: drop unnecessary JclSynch.pas Boolean/BOOL cast patches
MattGyverLee Jul 2, 2026
d7b3784
revert: drop JvComponent.pas OldCreateOrder patch pending verification
MattGyverLee Jul 2, 2026
9d53e77
address remaining review points: tripwire acknowledgements, scope
MattGyverLee Jul 2, 2026
736afd9
docs(windows): sync emsdk install version with the pinned minimum
MattGyverLee Jul 3, 2026
9ef5278
fix(devtools): tolerate Delphi 12 EnvOptions.proj Null attrs and Win64x
MattGyverLee Jul 3, 2026
d69d9b7
fix(global): let CustomisationStorage compile under Delphi 12 dcc64
MattGyverLee Jul 3, 2026
4d09020
Reapply JclSynch.pas BOOL casts — needed by TIKE compile chain
MattGyverLee Jul 3, 2026
fc69786
Reapply JvComponent.pas OldCreateOrder patch — needed by TIKE
MattGyverLee Jul 3, 2026
7ebe611
Using the upstream guard for JvComponent.pas
MattGyverLee Jul 9, 2026
1c32b23
fix(windows): align vendored JCL with upstream, apply review suggestions
MattGyverLee Jul 10, 2026
e363227
style(windows): use {$IF Defined()} guards instead of nested {$IFNDEF}
MattGyverLee Jul 10, 2026
90792cf
fix(windows): route JclSynch CreateMutex via RTL for Delphi 12 source…
MattGyverLee Jul 10, 2026
556af89
feat(windows): Delphi CE interactive build workflow
MattGyverLee Jul 10, 2026
f6a2c63
docs(windows): add Delphi CE build guide
MattGyverLee Jul 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
/windows/src/**/*.identcache
/windows/src/**/*.vcxproj.user
/windows/src/**/version.res
/windows/src/**/version*.res
/windows/src/**/*.pch
/windows/src/**/*.wixobj
/windows/src/**/*.sbr
Expand Down
14 changes: 7 additions & 7 deletions common/windows/delphi/components/FixedTrackbar.pas
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,16 @@ procedure TTntFixedDrawGrid.WMEraseBkgnd(var Message: TMessage);

Tested on VER320 (10.2)
Tested on VER330 (10.3) - 29 Oct 2019 - mcdurdin
TODO: Not yet fully verified against Vcl.Grids.pas in VER350 (11) or VER360 (12)
}

{$IFNDEF VER340}
{$MESSAGE WARN 'Not yet checked against Delphi 10.4'}
{$IFNDEF VER330}
{$IFNDEF VER320}
{$IF Defined(VER340) or Defined(VER350) or Defined(VER360)}
{$MESSAGE WARN 'TODO: Trackbar scrolling on bottom cell not yet checked against Delphi 10.4, 11.0 or 12.0'}
{$ELSEIF Defined(VER320) or Defined(VER330)}
// Tested on Delphi 10.2 (VER320) and 10.3 (VER330)
{$ELSE}
{$MESSAGE ERROR 'Check that this fix is still applicable for a new version of Delphi. Checked against Delphi 10.2, 10.3' }
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$IFEND}

procedure TTntFixedDrawGrid.MouseDown(Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
Expand Down
4 changes: 2 additions & 2 deletions common/windows/delphi/general/CleartypeDrawCharacter.pas
Original file line number Diff line number Diff line change
Expand Up @@ -591,11 +591,11 @@ function TestFont(FFontName: string): Boolean;
StrPCopy(lf.lfFaceName, FFontName); //'Code2000');
hdc := GetDC(0);
//FPlane0FontName := 'Code2000';
{$IFDEF VER340}
{$IF Defined(VER340) or Defined(VER350) or Defined(VER360)}
if EnumFontFamiliesEx(hdc, lf, @EnumFallbackFonts, 0, 0) <> 0 then
{$ELSE}
if EnumFontFamiliesEx(hdc, lf, @EnumFallbackFonts, 0, 0) then
{$ENDIF}
{$IFEND}
begin
FPlane0FontName := FFontName;
Result := True;
Expand Down
4 changes: 4 additions & 0 deletions common/windows/delphi/general/JsonUtil.pas
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ function JSONToString(obj: TJSONAncestor; ReplaceSlashes: Boolean = False): stri
begin
builder := TStringBuilder.Create;
try
{$IF Defined(VER350) or Defined(VER360)}
obj.ToChars(builder, []);
{$ELSE}
obj.ToChars(builder);
{$IFEND}
Result := builder.ToString;
finally
builder.Free;
Expand Down
23 changes: 15 additions & 8 deletions common/windows/delphi/tools/devtools/DevIncludePaths.pas
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ class function TIncludePaths.AddPathToProjectXML(const ProjectXMLFileName, Path:
doc: IXMLDocument;
sn, node: IXMLNode;
IncludePath: string;
Condition: string;
I: Integer;
begin
if not FileExists(ProjectXMLFileName) then
Expand All @@ -159,16 +160,20 @@ class function TIncludePaths.AddPathToProjectXML(const ProjectXMLFileName, Path:
for I := 0 to node.ChildNodes.Count - 1 do
begin
sn := node.ChildNodes[I];
// Delphi 12 EnvOptions.proj emits an empty <PropertyGroup/> without a
// Condition attribute; convert defensively via VarToStrDef so a Null or
// Empty variant returns '' instead of raising EVariantTypeCastError in Pos().
Condition := VarToStrDef(sn.Attributes['Condition'], '');
if (sn.NodeName = 'PropertyGroup') and
not VarIsNull(sn.Attributes['Condition']) and
((Pos('Win32', sn.Attributes['Condition']) > 0) or
(Pos('Win64', sn.Attributes['Condition']) > 0)) then
((Pos('''Win32''', Condition) > 0) or (Pos('''Win64''', Condition) > 0)) then
begin
IncludePath := sn.ChildNodes['DelphiBrowsingPath'].NodeValue;
// Guard against empty child nodes (e.g. <DelphiBrowsingPath/>) whose
// NodeValue is Null on Delphi 12 and can't coerce to a string directly.
IncludePath := VarToStrDef(sn.ChildNodes['DelphiBrowsingPath'].NodeValue, '');
if AddPathToIncludePath(IncludePath, Path) then
sn.ChildNodes['DelphiBrowsingPath'].nodeValue := IncludePath;

IncludePath := sn.ChildNodes['DelphiLibraryPath'].NodeValue;
IncludePath := VarToStrDef(sn.ChildNodes['DelphiLibraryPath'].NodeValue, '');
if AddPathToIncludePath(IncludePath, Path) then
sn.ChildNodes['DelphiLibraryPath'].nodeValue := IncludePath;
end;
Expand Down Expand Up @@ -256,6 +261,7 @@ class function TIncludePaths.Reset: Boolean;
doc: IXMLDocument;
node: IXMLNode;
ProjectFileName: string;
Condition: string;
I: Integer;
sn: IXMLNode;
begin
Expand Down Expand Up @@ -296,10 +302,11 @@ class function TIncludePaths.Reset: Boolean;
for I := 0 to node.ChildNodes.Count - 1 do
begin
sn := node.ChildNodes[I];
// See AddPathToProjectXML: guard against Delphi 12's empty
// <PropertyGroup/> where Attributes['Condition'] returns a Null variant.
Condition := VarToStrDef(sn.Attributes['Condition'], '');
if (sn.NodeName = 'PropertyGroup') and
not VarIsNull(sn.Attributes['Condition']) and
((Pos('Win32', sn.Attributes['Condition']) > 0) or
(Pos('Win64', sn.Attributes['Condition']) > 0)) then
((Pos('''Win32''', Condition) > 0) or (Pos('''Win64''', Condition) > 0)) then
begin
sn.ChildNodes['DelphiBrowsingPath'].NodeValue := SDefault_DelphiBrowsingPath;
sn.ChildNodes['DelphiLibraryPath'].NodeValue := SDefault_DelphiSearchPath;
Expand Down
8 changes: 8 additions & 0 deletions common/windows/delphi/tools/devtools/SourceRootPath.pas
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,19 @@ interface
{$IFDEF VER340}
const DelphiMajorVersion = '21.0';
{$ELSE}
{$IFDEF VER350}
const DelphiMajorVersion = '22.0';
{$ELSE}
{$IFDEF VER360}
const DelphiMajorVersion = '23.0';
{$ELSE}
ERROR: must define Delphi version
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$ENDIF}

const DelphiBasePath = 'C:\Program Files (x86)\Embarcadero\Studio\' + DelphiMajorVersion + '\';

Expand Down
13 changes: 9 additions & 4 deletions common/windows/delphi/web/Keyman.System.HttpServer.Base.pas
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,15 @@ function CrackUTF8ZeroExtendedString(CommandType: THTTPCommandType; const p: str
end;

// Indy's UTF8 handling of URLs is *completely* broken.
// We may need to check this with updated versions of Delphi
{$IFNDEF VER330}
ERROR! Check if this is still needed with Delphi update
{$ENDIF}
// We may need to check this with updated versions of Delphi.
// VER340/VER350/VER360 (10.4/11/12): unblocked but not re-verified; workaround kept.
{$IF Defined(VER340) or Defined(VER350) or Defined(VER360)}
{$MESSAGE WARN 'TODO: Check if Indy URL UTF-8 handling is still needed with Delphi 10.4/11.0/12.0'}
{$ELSEIF Defined(VER330)}
// Verified against Delphi 10.3 (VER330)
{$ELSE}
{$MESSAGE ERROR 'Check if Indy URL UTF-8 handling is still needed with Delphi update'}
{$IFEND}

SetLength(s, p.Length);
for i := 1 to p.Length do
Expand Down
5 changes: 4 additions & 1 deletion developer/src/ext/jedi/jcl/jcl/source/common/JclSynch.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,10 @@ constructor TJclMutex.Create(SecAttr: PSecurityAttributes; InitialOwner: Boolean
begin
inherited Create;
FName := Name;
FHandle := JclWin32.CreateMutex(SecAttr, InitialOwner, PChar(Name));
// Keyman patch (D12, source-compiled JCL): JclWin32.CreateMutex is an external
// decl with a BOOL param; D12 rejects Boolean->BOOL there (E2010). Route via the
// RTL like OpenMutex below. Only bites when JCL is built from source.
FHandle := {$IFDEF HAS_UNITSCOPE}Winapi.{$ENDIF}Windows.CreateMutex(SecAttr, BOOL(InitialOwner), PChar(Name));
if FHandle = 0 then
raise EJclMutexError.CreateRes(@RsSynchCreateMutex);
FExisted := GetLastError = ERROR_ALREADY_EXISTS;
Expand Down
2 changes: 2 additions & 0 deletions developer/src/ext/jedi/jvcl/jvcl/run/JvComponent.pas
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,10 @@ constructor TJvForm.Create(AOwner: TComponent);
finally
Exclude(FFormState, fsCreating);
end;
{$IFDEF HAS_PROPERTY_OLDCREATEORDER}
if OldCreateOrder then
DoCreate;
{$ENDIF HAS_PROPERTY_OLDCREATEORDER}
end;
finally
GlobalNameSpace.EndWrite;
Expand Down
20 changes: 20 additions & 0 deletions developer/src/ext/mbcolor/mxs.inc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,26 @@
{$define DELPHI_10_UP}
{$endif}

// Keyman patch (D11/12, vendored mbcolor): define DELPHI_*_UP on VER350/VER360
// too, else HTMLColors.pas drops "uses Variants" and Null won't resolve.
{$ifdef VER350}
{$define DELPHI_5_UP}
{$define DELPHI_6_UP}
{$define DELPHI_7_UP}
{$define DELPHI_8_UP}
{$define DELPHI_9_UP}
{$define DELPHI_10_UP}
{$endif}

{$ifdef VER360}
{$define DELPHI_5_UP}
{$define DELPHI_6_UP}
{$define DELPHI_7_UP}
{$define DELPHI_8_UP}
{$define DELPHI_9_UP}
{$define DELPHI_10_UP}
{$endif}

{$ifdef VER330}
{$define DELPHI_5_UP}
{$define DELPHI_6_UP}
Expand Down
Loading
Loading