Skip to content

Commit 0b48533

Browse files
committed
refactor: Automation complete on Windows side
1 parent 964baa2 commit 0b48533

9 files changed

Lines changed: 153 additions & 26 deletions

File tree

entries/bfire/src/ConsoleUnit.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ interface
44

55
uses
66
System.SysUtils,
7-
Classes;
7+
System.Classes;
88

99
{$I 'version.inc'}
1010

entries/bfire/src/ProcessUnit.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ interface
55
uses
66
System.SysUtils,
77
System.StrUtils,
8-
Classes,
9-
Math;
8+
System.Classes,
9+
System.Math;
1010

1111
type
1212
TStationDataClass = class(TObject)

entries/bfire/src/bfire.dpr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ program bfire;
55

66
uses
77
System.SysUtils,
8-
Classes,
8+
System.Classes,
99
ConsoleUnit in 'ConsoleUnit.pas',
1010
ProcessUnit in 'ProcessUnit.pas';
1111

entries/bfire/src/bfire.dproj

Lines changed: 84 additions & 2 deletions
Large diffs are not rendered by default.

entries/dcornelius/src/dcornelius.dpr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ program dcornelius;
1313

1414
{$APPTYPE CONSOLE}
1515

16-
{$R *.res}
16+
{.$R *.res}
1717

1818
uses
1919
System.SysUtils, System.Classes,

entries/dcornelius/src/dcornelius.dproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,8 @@
281281
<Excluded_Packages>
282282
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k290.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
283283
<Excluded_Packages Name="$(BDSBIN)\dclofficexp290.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
284+
<Excluded_Packages Name="$(BDSBIN)\bcboffice2k290.bpl">Embarcadero C++Builder Office 2000 Servers Package</Excluded_Packages>
285+
<Excluded_Packages Name="$(BDSBIN)\bcbofficexp290.bpl">Embarcadero C++Builder Office XP Servers Package</Excluded_Packages>
284286
</Excluded_Packages>
285287
</Delphi.Personality>
286288
<Deployment Version="4">

utilities/common/utilities.data.config.pas

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,21 @@ procedure TConfig.setFromJSONObject(const AJSONObject: TJSONObject);
174174
begin
175175
FRootLinux:= AJSONObject.Get(cJSONRootLinux, FRootLinux);
176176
FRootWindows:= AJSONObject.Get(cJSONRootWIndows, FRootWindows);
177+
177178
FEntriesLinux:= AJSONObject.Get(cJSONEntriesLinux, FEntriesLinux);
178179
FEntriesWindows:= AJSONObject.Get(cJSONEntriesWindows, FEntriesWindows);
180+
179181
FResultsFolder:= AJSONObject.Get(cJSONResultsFolder, FResultsFolder);
182+
180183
FBinLinux:= AJSONObject.Get(cJSONBinLinux, FBinLinux);
181184
FBinWindows:= AJSONObject.Get(cJSONBinWindows, FBinWindows);
185+
182186
FInput:= AJSONObject.Get(cJSONInput, FInput);
183187
FHyperfine:= AJSONObject.Get(cJSONHyperfine, FHyperfine);
188+
184189
FLazbuild:= AJSONObject.Get(cJSONLazbuild, FLazbuild);
185190
FDelphiCompiler:= AJSONObject.Get(cJSONDelphiCompiler, FDelphiCompiler);
191+
186192
FOutputHash:= AJSONObject.Get(cJSONOutpuHash, FOutputHash);
187193
FEntries:= TEntries.Create(AJSONObject.Find(cJSONEntries));
188194
end;

utilities/common/utilities.data.entries.pas

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ TEntry = class(TObject)
4040
FEntryFolder: TJSONStringType;
4141
FEntryBinary: TJSONStringType;
4242
FLPI: TJSONStringType;
43-
FDPROJ: TJSONStringType;
43+
FDPR: TJSONStringType;
4444
FHasRelease: Boolean;
4545
FThreads: Integer;
4646
FRunParams: TJSONStringType;
@@ -77,9 +77,9 @@ TEntry = class(TObject)
7777
property LPI: TJSONStringType
7878
read FLPI
7979
write FLPI;
80-
property DPROJ: TJSONStringType
81-
read FDPROJ
82-
write FDPROJ;
80+
property DPR: TJSONStringType
81+
read FDPR
82+
write FDPR;
8383
property HasRelease: Boolean
8484
read FHasRelease
8585
write FHasRelease;
@@ -149,7 +149,7 @@ implementation
149149
cJSONEntryFolder = 'entry-folder';
150150
cJSONEntryBinary = 'entry-binary';
151151
cJSONLPI = 'lpi';
152-
cJSONDPROJ = 'dproj';
152+
cJSONDPR = 'dpr';
153153
cJSONHasRelease = 'has-release';
154154
cJSONThreads = 'threads';
155155
cJSONRunParams = 'run-params';
@@ -172,7 +172,7 @@ constructor TEntry.Create;
172172
FEntryFolder:= '';
173173
FEntryBinary:= '';
174174
FLPI:= '';
175-
FDPROJ:= '';
175+
FDPR:= '';
176176
FHasRelease:= True;
177177
FThreads:= 1;
178178
FRunParams:= '';
@@ -207,7 +207,7 @@ procedure TEntry.setFromJSONObject(const AJSONObject: TJSONObject);
207207
FEntryFolder:= AJSONObject.Get(cJSONEntryFolder, FEntryFolder);
208208
FEntryBinary:= AJSONObject.Get(cJSONEntryBinary, FEntryBinary);
209209
FLPI:= AJSONObject.Get(cJSONLPI, FLPI);
210-
FDPROJ:= AJSONObject.Get(cJSONDPROJ, FDPROJ);
210+
FDPR:= AJSONObject.Get(cJSONDPR, FDPR);
211211
FHasRelease:= AJSONObject.Get(cJSONHasRelease, FHasRelease);
212212
FThreads:= AJSONObject.Get(cJSONThreads, FThreads);
213213
FRunParams:= AJSONObject.Get(cJSONRunParams, FRunParams);

utilities/script_builder/Common/scriptbuilder.common.pas

Lines changed: 49 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,10 @@ implementation
6565
cTestBash = 'test_all.sh';
6666
cRunBash = 'run_all.sh';
6767

68+
{$IFDEF UNIX}
6869
cLazbuildDefault = '%s \'#10' -B \'#10' "%s"';
6970
cLazbuildRelease = '%s \'#10' -B \'#10' --bm="Release" \'#10' "%s"';
71+
{$ENDIF}
7072

7173
cReplaceName = '[[name]]';
7274
cReplaceJSONResults = '[[results-json]]';
@@ -75,8 +77,9 @@ implementation
7577
cReplaceEntryThreads = '[[threads]]';
7678

7779
cBaselineBinary = 'baseline';
80+
{$IFDEF UNIX}
7881
cCompilerFPC = 'fpc';
79-
{$IFNDEF FPC}
82+
{$ELSE}
8083
cCompilerDelphi = 'delphi';
8184
{$ENDIF}
8285
cSSD = 'SSD';
@@ -150,17 +153,25 @@ function TBuilder.GetHeader(const AHeader: String): String;
150153

151154
function TBuilder.GetVariables: String;
152155
begin
156+
Result:= '';
153157
{$IFDEF UNIX}
154-
Result:= 'ROOT="' + FConfig.RootLinux + '"' + LineEnding;
155158
Result:= Result + 'BIN="' + FConfig.BinLinux + '"' + LineEnding;
156159
Result:= Result + 'ENTRIES="' + FConfig.EntriesLinux + '"' + LineEnding;
160+
Result:= Result + 'RESULTS="' + FConfig.ResultsFolder + '"' + LineEnding;
161+
Result:= Result + 'INPUT="' + FConfig.Input + '"' + LineEnding;
157162
{$ELSE}
158-
Result:= 'ROOT="' + FConfig.RootWindows + '"' + LineEnding;
159163
Result:= Result + 'BIN="' + FConfig.BinWindows + '"' + LineEnding;
160164
Result:= Result + 'ENTRIES="' + FConfig.EntriesWindows + '"' + LineEnding;
165+
Result:= Result + 'DELPHICC="' + FConfig.DelphiCompiler + '"' + LineEnding;
166+
Result:= Result + 'INCLUDE="c:\program files (x86)\embarcadero\studio\23.0\lib\Linux64\release;C:\Users\gcarr\Documents\Embarcadero\Studio\23.0\Imports;c:\program files (x86)\embarcadero\studio\23.0\Imports;C:\Users\Public\Documents\Embarcadero\Studio\23.0\Dcp\Linux64;c:\program files (x86)\embarcadero\studio\23.0\include;c:\program files (x86)\embarcadero\studio\23.0\redist\Linux64;C:\Users\Public\Documents\Embarcadero\Studio\23.0\Bpl\Linux64;C:\Users\gcarr\Documents\Embarcadero\Studio\23.0\CatalogRepository\ChatGPTWizard-2.2.0.9"' + LineEnding;
167+
Result:= Result + 'SDK="C:\Users\gcarr\Documents\Embarcadero\Studio\SDKs\ubuntu23.10.sdk"' + LineEnding;
168+
Result:= Result + 'LIBPATH="C:\Users\gcarr\Documents\Embarcadero\Studio\SDKs\ubuntu23.10.sdk\usr\lib\gcc\x86_64-linux-gnu\13;C:\Users\gcarr\Documents\Embarcadero\Studio\SDKs\ubuntu23.10.sdk\usr\lib\x86_64-linux-gnu;C:\Users\gcarr\Documents\Embarcadero\Studio\SDKs\ubuntu23.10.sdk\lib\x86_64-linux-gnu;C:\Users\gcarr\Documents\Embarcadero\Studio\SDKs\ubuntu23.10.sdk\lib64"' + LineEnding;
169+
Result:= Result + 'BPL="\Users\Public\Documents\Embarcadero\Studio\23.0\Bpl\Linux64"' + LineEnding;
170+
Result:= Result + 'DCP="\Users\Public\Documents\Embarcadero\Studio\23.0\Dcp\Linux64"' + LineEnding;
171+
Result:= Result + 'GENERICS="Generics.Collections=System.Generics.Collections;Generics.Defaults=System.Generics.Defaults"' + LineEnding;
172+
Result:= Result + 'HEADERS="\Users\Public\Documents\Embarcadero\Studio\23.0\hpp\Linux64"' + LineEnding;
173+
Result:= Result + 'DEFINES="RELEASE;LINUX"' + LineEnding;
161174
{$ENDIF}
162-
Result:= Result + 'RESULTS="' + FConfig.ResultsFolder + '"' + LineEnding;
163-
Result:= Result + 'INPUT="' + FConfig.Input + '"' + LineEnding;
164175
Result:= Result + LineEnding;
165176
end;
166177

@@ -188,7 +199,35 @@ function TBuilder.GetFunctionCompile(const AEntry: TEntry): String;
188199
LineEnding;
189200
end;
190201
{$ELSE}
191-
Result:= line + ' # Needs the Delphi command line stuff' + LineEnding;
202+
Result:= Result + Format(
203+
' "${DELPHICC}" '+
204+
'-\$D0 '+
205+
'-\$L- '+
206+
'-\$Y- '+
207+
'--no-config '+
208+
'-B '+
209+
'-Q '+
210+
'"-A${GENERICS}" '+
211+
'"-D${DEFINES}" '+
212+
'"-E${BIN}" '+
213+
'"-I${INCLUDE}" '+
214+
'"-LEC:${BPL}" '+
215+
'"-LNC:${DCP}" '+
216+
'-NS '+
217+
'"-O${INCLUDE}" '+
218+
'"-R${INCLUDE}" '+
219+
'"-U${INCLUDE}" '+
220+
'"--syslibroot:${SDK}" '+
221+
'"--libpath:${LIBPATH}" '+
222+
'"-NHC:${HEADERS}" '+
223+
'"${ENTRIES}/%s/%s" && \' + LineEnding +
224+
' scp ${BIN}/' + AEntry.EntryBinary + ' ' +
225+
'gcarreno@10.42.0.1:/home/gcarreno/Programming/1brc-ObjectPascal/bin'
226+
,
227+
[
228+
AEntry.EntryFolder,
229+
AEntry.DPR
230+
]) + LineEnding;
192231
{$ENDIF}
193232
Result:= Result + ' echo "==========="' + LineEnding;
194233
Result:= Result + ' echo' + LineEnding + '}' + LineEnding + LineEnding;
@@ -201,7 +240,7 @@ function TBuilder.GetFunctionTest(const AEntry: TEntry): String;
201240
Result:= 'function ' + AEntry.EntryBinary + '() {' + LineEnding;
202241
Result:= Result + ' echo "===== '+ UTF8Encode(AEntry.Name) +' ======"' + LineEnding;
203242
tmpStr:= Format('%s/%s %s', [
204-
'${BIN}',//IncludeTrailingPathDelimiter(FConfig.BinLinux),
243+
'${BIN}',
205244
AEntry.EntryBinary,
206245
AEntry.RunParams
207246
]);
@@ -219,20 +258,20 @@ function TBuilder.GetFunctionTest(const AEntry: TEntry): String;
219258
);
220259
tmpStr:= Format(' %s > %s/%s.output', [
221260
tmpStr,
222-
'${RESULTS}', //IncludeTrailingPathDelimiter(FConfig.ResultsFolder),
261+
'${RESULTS}',
223262
AEntry.EntryBinary
224263
]);
225264
Result:= Result + tmpStr + LineEnding;
226265
tmpStr:= Format(' sha256sum %s/%s.output',[
227-
'${RESULTS}', //IncludeTrailingPathDelimiter(FConfig.ResultsFolder),
266+
'${RESULTS}',
228267
AEntry.EntryBinary
229268
]);
230269
Result:= Result + tmpStr + LineEnding;
231270
Result:= Result + Format(' echo "%s Official Output Hash"',[
232271
FConfig.OutputHash
233272
]) + LineEnding;
234273
Result:= Result + Format(' rm %s/%s.output',[
235-
'${RESULTS}', //IncludeTrailingPathDelimiter(FConfig.ResultsFolder),
274+
'${RESULTS}',
236275
AEntry.EntryBinary
237276
]) + LineEnding;
238277
Result:= Result + ' echo "==========="' + LineEnding;
@@ -308,7 +347,6 @@ procedure TBuilder.BuildCompileScriptBash;
308347
{$ELSE}
309348
if FConfig.Entries[index].Compiler <> cCompilerDelphi then continue;
310349
{$ENDIF}
311-
//if FConfig.Entries[index].EntryBinary = cBaselineBinary then continue;
312350
line:= line + GetFunctionCompile(FConfig.Entries[index]);
313351
end;
314352
line:= line + 'if [ "$1" == "" ];then' + LineEnding;
@@ -364,7 +402,6 @@ procedure TBuilder.BuildTestScriptBash;
364402
begin
365403
Write(GenerateProgressBar(index+1, FConfig.Entries.Count, 50), lineBreak);
366404
if not FConfig.Entries[index].Active then continue;
367-
//if FConfig.Entries[index].EntryBinary = cBaselineBinary then continue;
368405
line:= line + GetFunctionTest(FConfig.Entries[index]);
369406
end;
370407
line:= line + 'if [ "$1" == "" ];then' + LineEnding;

0 commit comments

Comments
 (0)