Skip to content

Commit 3435441

Browse files
committed
refactor: Better path concatenation
1 parent 9f972dd commit 3435441

File tree

2 files changed

+27
-8
lines changed

2 files changed

+27
-8
lines changed

entries/entries.json.example

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,17 @@
99
"lazbuild": "{...}FreePascal_3.0/lazarus/lazbuild",
1010
"output-hash": "0000000000000000000000000000000000000000000000000000000000000000",
1111
"entries": [
12+
{
13+
"name": "Official Baseline",
14+
"notes": "Beeing the last of all",
15+
"compiler": "fpc",
16+
"entry-folder": "../baseline/Lazarus/src",
17+
"entry-binary": "baseline",
18+
"lpi": "baseline.lpi",
19+
"has-release": true,
20+
"threads": 1,
21+
"run-params": "-i [[input]]"
22+
},
1223
{
1324
"name": "Gustavo Carreno",
1425
"notes": "Using 30 threads",

utilities/script_builder/Common/scriptbuilder.common.pas

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ implementation
6161
cTestBash = 'test_all.sh';
6262
cRunBash = 'run_all.sh';
6363

64-
cLazbuild = '%s -B "%s%s%s"';
65-
cLazbuildRelease = '%s -B --bm="Release" "%s%s%s"';
64+
cLazbuild = '%s -B "%s"';
65+
cLazbuildRelease = '%s -B --bm="Release" "%s"';
6666

6767
cReplaceName = '[[name]]';
6868
cReplaceJSONResults = '[[results-json]]';
@@ -151,9 +151,13 @@ procedure TBuilder.BuildCompileScriptBash;
151151
line:= line +
152152
Format(cLazbuildRelease, [
153153
FConfig.Lazbuild,
154-
IncludeTrailingPathDelimiter(FConfig.EntriesFolder),
155-
IncludeTrailingPathDelimiter(FConfig.Entries[index].EntryFolder),
156-
FConfig.Entries[index].LPI
154+
ExpandFileName(
155+
ConcatPaths([
156+
IncludeTrailingPathDelimiter(FConfig.EntriesFolder),
157+
IncludeTrailingPathDelimiter(FConfig.Entries[index].EntryFolder),
158+
FConfig.Entries[index].LPI
159+
])
160+
)
157161
] ) +
158162
LineEnding;
159163
end
@@ -162,9 +166,13 @@ procedure TBuilder.BuildCompileScriptBash;
162166
line:= line +
163167
Format(cLazbuild, [
164168
FConfig.Lazbuild,
165-
IncludeTrailingPathDelimiter(FConfig.EntriesFolder),
166-
IncludeTrailingPathDelimiter(FConfig.Entries[index].EntryFolder),
167-
FConfig.Entries[index].LPI
169+
ExpandFileName(
170+
ConcatPaths([
171+
IncludeTrailingPathDelimiter(FConfig.EntriesFolder),
172+
IncludeTrailingPathDelimiter(FConfig.Entries[index].EntryFolder),
173+
FConfig.Entries[index].LPI
174+
])
175+
)
168176
] ) +
169177
LineEnding;
170178
end;

0 commit comments

Comments
 (0)