Skip to content

Commit

Permalink
[build] Basic fixes and extentions to build scripting
Browse files Browse the repository at this point in the history
Addendum to fdf1f44 and 6425be6.

1. Refactor following review: FOR loops

Signed-off-by: benyamin-codez <[email protected]>
  • Loading branch information
benyamin-codez committed Jan 16, 2025
1 parent 6425be6 commit 7fe7d21
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions build/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ set BUILD_FLAVOR=Release
set BUILD_COMMAND=/Build
set BUILD_SPEC=
set BUILD_ARCH=
set BUILD_INFO=
set BUILD_FAILED=

rem Analysis Build specific variables
Expand Down Expand Up @@ -139,11 +140,14 @@ goto :eof
rem Invoke Visual Studio and CodeQL as needed...
:build_arch
setlocal
set BUILD_INFO=%1
set BUILD_ARCH=%2
set TAG=
for /f "tokens=1 delims=_" %%T in ("%1") do @set TARGET_PROJ_CONFIG=%%T
for /f "tokens=2 delims=_" %%T in ("%1") do @set TARGET_PLATFORM=%%T
for /f "tokens=3 delims=_" %%T in ("%1") do @set TAG=%%T
for /f "tokens=1,2,3 delims=_" %%i in ("%BUILD_INFO%") do @(
set TARGET_PROJ_CONFIG=%%i
set TARGET_PLATFORM=%%j
set TAG=%%k
)

if /I "!TAG!"=="SDV" (
rem There is no 32-bit SDV build
Expand Down Expand Up @@ -331,10 +335,15 @@ IF ERRORLEVEL 1 (
goto :eof

:split_target_tag
set BUILD_INFO=%1
set TARGET=
set TAG=
for /f "tokens=1 delims=_" %%T in (%1) do @set TARGET=%%T
for /f "tokens=2 delims=_" %%T in (%1) do @set TAG=_%%T
for /f "tokens=1,2 delims=_" %%i in (%BUILD_INFO%) do @(
set TARGET=%%i
if not "%%j"=="" (
set TAG=_%%j
)
)
goto :eof

:fail
Expand Down

0 comments on commit 7fe7d21

Please sign in to comment.