Skip to content

Commit eed1a02

Browse files
committed
refactor: Changing output on Windows automation
1 parent 4405b10 commit eed1a02

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

utilities/script_builder/Common/scriptbuilder.common.pas

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,10 @@ function TBuilder.GetVariablesBash: String;
171171
end;
172172

173173
function TBuilder.GetFunctionCompileBash(const AEntry: TEntry): String;
174+
{$IFDEF UNIX}
174175
var
175176
lazbuild: String;
177+
{$ENDIF}
176178
begin
177179
Result:= 'function ' + AEntry.EntryBinary + '() {' + LineEnding;
178180
Result:= Result + ' echo "===== '+ UTF8Encode(AEntry.Name) +' ======"' + LineEnding;
@@ -240,6 +242,14 @@ function TBuilder.GetFunctionCompileWindows(const AEntry: TEntry): String;
240242
Result:= ':' + AEntry.EntryBinary + LineEnding;
241243
Result:= Result + 'echo ===== '+ UTF8Encode(AEntry.Name) +' ======' + LineEnding;
242244
Result:= Result +
245+
'del ' +
246+
ExpandFileName(
247+
ConcatPaths([
248+
FConfig.BinWindows,
249+
AEntry.EntryBinary
250+
])
251+
) + LineEnding;
252+
Result:= Result +
243253
'msbuild /t:Build /p:Config=Release /p:platform=Linux64 ' +
244254
ExpandFileName(
245255
ConcatPaths([
@@ -248,7 +258,13 @@ function TBuilder.GetFunctionCompileWindows(const AEntry: TEntry): String;
248258
AEntry.DPROJ
249259
])
250260
) + LineEnding;
251-
Result:= Result + 'if ERRORLEVEL 0 (' + LineEnding;
261+
Result:= Result + 'if EXIST ' +
262+
ExpandFileName(
263+
ConcatPaths([
264+
FConfig.BinWindows,
265+
AEntry.EntryBinary
266+
])
267+
)+ ' (' + LineEnding;
252268
Result:= Result + ' echo -- Transfering --' + LineEnding;
253269
Result:= Result + ' scp ' +
254270
ExpandFileName(ConcatPaths([

0 commit comments

Comments
 (0)