Skip to content

Commit deb48f6

Browse files
committed
feature: Execution permission for Delphi programs
1 parent 0b48533 commit deb48f6

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

utilities/script_builder/Common/scriptbuilder.common.pas

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,8 @@ implementation
7777
cReplaceEntryThreads = '[[threads]]';
7878

7979
cBaselineBinary = 'baseline';
80-
{$IFDEF UNIX}
8180
cCompilerFPC = 'fpc';
82-
{$ELSE}
8381
cCompilerDelphi = 'delphi';
84-
{$ENDIF}
8582
cSSD = 'SSD';
8683

8784
resourcestring
@@ -239,6 +236,10 @@ function TBuilder.GetFunctionTest(const AEntry: TEntry): String;
239236
begin
240237
Result:= 'function ' + AEntry.EntryBinary + '() {' + LineEnding;
241238
Result:= Result + ' echo "===== '+ UTF8Encode(AEntry.Name) +' ======"' + LineEnding;
239+
if AEntry.Compiler = cCompilerDelphi then
240+
begin
241+
Result:= Result + ' chmod +x ${BIN}/' + AEntry.EntryBinary + LineEnding;
242+
end;
242243
tmpStr:= Format('%s/%s %s', [
243244
'${BIN}',
244245
AEntry.EntryBinary,
@@ -284,6 +285,10 @@ function TBuilder.GetFunctionRun(const AEntry: TEntry): String;
284285
begin
285286
Result:= 'function ' + AEntry.EntryBinary + '() {' + LineEnding;
286287
Result:= Result + ' echo "===== '+ UTF8Encode(AEntry.Name) +' ======"' + LineEnding;
288+
if AEntry.Compiler = cCompilerDelphi then
289+
begin
290+
Result:= Result + ' chmod -v +x ${BIN}/' + AEntry.EntryBinary + LineEnding;
291+
end;
287292
// Run for SSD
288293
tmpStr:= StringsReplace(
289294
FConfig.Hyperfine,

0 commit comments

Comments
 (0)