Skip to content

Commit d73e076

Browse files
delphidabblercahamo
authored andcommitted
Add Delphi 11 compiler info
Add support for D11 to Compiler namespace code Add support for D11 in INI & XML data file processing (new INI file key "Delphi11A" and XML identifier "d11a")
1 parent 2a5e5a9 commit d73e076

File tree

4 files changed

+29
-19
lines changed

4 files changed

+29
-19
lines changed

Src/Compilers.UBDS.pas

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -150,27 +150,32 @@ function TBDSCompiler.GetIDString: string;
150150
Result := 'D103R';
151151
ciD104S:
152152
Result := 'D104S';
153+
ciD11A:
154+
Result := 'D11A';
153155
else
154156
raise EBug.Create(ClassName + '.GetIDString: Invalid ID');
155157
end;
156158
end;
157159

158160
function TBDSCompiler.GetName: string;
159161
resourcestring
160-
sCompilerName = 'Delphi %d'; // template for name of compiler
161-
sDelphiXE = 'Delphi XE'; // name of Delphi XE compiler
162-
sDelphiXE2 = 'Delphi XE2'; // name of Delphi XE2 compiler
163-
sDelphiXE3 = 'Delphi XE3'; // name of Delphi XE3 compiler
164-
sDelphiXE4 = 'Delphi XE4'; // name of Delphi XE4 compiler
165-
sDelphiXE5 = 'Delphi XE5'; // name of Delphi XE5 compiler
166-
sDelphiXE6 = 'Delphi XE6'; // name of Delphi XE6 compiler
167-
sDelphiXE7 = 'Delphi XE7'; // name of Delphi XE7 compiler
168-
sDelphiXE8 = 'Delphi XE8'; // name of Delphi XE8 compiler
169-
sDelphi10S = 'Delphi 10 Seattle'; // name of Delphi 10 compiler
170-
sDelphi101B = 'Delphi 10.1 Berlin'; // name of Delphi 10.1 compiler
171-
sDelphi102T = 'Delphi 10.2 Tokyo'; // name of Delphi 10.2 compiler
172-
sDelphi103R = 'Delphi 10.3 Rio'; // name of Delphi 10.3 compiler
173-
sDelphi104S = 'Delphi 10.4 Sydney'; // name of Delphi 10.4 compiler
162+
// template for name of compiler with simple integer version number
163+
sCompilerName = 'Delphi %d';
164+
// names of compilers not suitable for use with template
165+
sDelphiXE = 'Delphi XE';
166+
sDelphiXE2 = 'Delphi XE2';
167+
sDelphiXE3 = 'Delphi XE3';
168+
sDelphiXE4 = 'Delphi XE4';
169+
sDelphiXE5 = 'Delphi XE5';
170+
sDelphiXE6 = 'Delphi XE6';
171+
sDelphiXE7 = 'Delphi XE7';
172+
sDelphiXE8 = 'Delphi XE8';
173+
sDelphi10S = 'Delphi 10 Seattle';
174+
sDelphi101B = 'Delphi 10.1 Berlin';
175+
sDelphi102T = 'Delphi 10.2 Tokyo';
176+
sDelphi103R = 'Delphi 10.3 Rio';
177+
sDelphi104S = 'Delphi 10.4 Sydney';
178+
sDelphi11A = 'Delphi 11 Alexandria';
174179
begin
175180
case GetID of
176181
ciDXE:
@@ -199,6 +204,8 @@ function TBDSCompiler.GetName: string;
199204
Result := sDelphi103R;
200205
ciD104S:
201206
Result := sDelphi104S;
207+
ciD11A:
208+
Result := sDelphi11A;
202209
else
203210
Result := Format(sCompilerName, [ProductVersion]);
204211
end;
@@ -232,6 +239,7 @@ function TBDSCompiler.InstallationRegKey: string;
232239
ciD102T : Result := '\Software\Embarcadero\BDS\19.0';
233240
ciD103R : Result := '\Software\Embarcadero\BDS\20.0';
234241
ciD104S : Result := '\Software\Embarcadero\BDS\21.0';
242+
ciD11A : Result := '\Software\Embarcadero\BDS\22.0';
235243
else raise EBug.Create(ClassName + '.InstallationRegKey: Invalid ID');
236244
end;
237245
end;

Src/Compilers.UGlobals.pas

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ interface
4242
ciD101B, // Delphi 10.1 Berlin
4343
ciD102T, // Delphi 10.2 Tokyo
4444
ciD103R, // Delphi 10.3 Rio
45-
ciD104S, // Delphi 10.4 Sydney
45+
ciD104S, // Delphi 10.4 Sydney,
46+
ciD11A, // Delphi 11 Alexandria
4647
ciFPC // Free Pascal
4748
);
4849

@@ -56,7 +57,7 @@ interface
5657
cBDSCompilers = [
5758
ciD2005w32, ciD2006w32, ciD2007, ciD2009w32, ciD2010, ciDXE, ciDXE2,
5859
ciDXE3, ciDXE4, ciDXE5, ciDXE6, ciDXE7, ciDXE8, ciD10S, ciD101B, ciD102T,
59-
ciD103R, ciD104S
60+
ciD103R, ciD104S, ciD11A
6061
];
6162

6263
const

Src/DBIO.UIniDataReader.pas

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,8 @@ implementation
235235
'Delphi2005Win32', 'Delphi2006Win32', 'Delphi2007', 'Delphi2009Win32',
236236
'Delphi2010', 'DelphiXE', 'DelphiXE2', 'DelphiXE3', 'DelphiXE4',
237237
'DelphiXE5', 'DelphiXE6', 'DelphiXE7', 'DelphiXE8', 'Delphi10S',
238-
'Delphi101B', 'Delphi102T', 'Delphi103R', 'Delphi104S', 'FPC'
238+
'Delphi101B', 'Delphi102T', 'Delphi103R', 'Delphi104S', 'Delphi11A',
239+
'FPC'
239240
);
240241

241242
{ TIniDataReader }

Src/UXMLDocConsts.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ interface
6666
cCompilerIDs: array[TCompilerID] of string = (
6767
'd2', 'd3', 'd4', 'd5', 'd6', 'd7',
6868
'd2005', 'd2006', 'd2007', 'd2009', 'd2010',
69-
'dXE', 'dXE2', 'dXE3', 'dDX4' {error, but in use},
69+
'dXE', 'dXE2', 'dXE3', 'dDX4' {error, but in use so can't fix},
7070
'dXE5', 'dXE6', 'dXE7', 'dXE8',
71-
'd10s', 'd101b', 'd102t', 'd103r', 'd104s',
71+
'd10s', 'd101b', 'd102t', 'd103r', 'd104s', 'd11a',
7272
'fpc'
7373
);
7474

0 commit comments

Comments
 (0)