@echo off set "platform=xilinx" set "tools_dir=%~dp0scripts\platform\%platform%" :menu echo Please select the project needed to be built: echo 1. NODE Project (SDK 2019.1) echo 2. GE Project (Vitis 2024.1) set /p choice="Choose a project (1 or 2): " if "%choice%"=="1" ( echo Building NODE Project ^(SDK 2019.1^) set "platform_ver=2019.1" set "work_dir=%~dp0build\node" set "config=%~dp0config\node.json" goto end ) else if "%choice%"=="2" ( echo Building GE Project ^(Vitis 2024.1^) set "platform_ver=2024.1" set "work_dir=%~dp0build\ge" set "config=%~dp0config\ge.json" goto end ) else ( echo Invalid choice. Please enter 1 or 2. goto menu ) :end echo Start Building echo Platform version: %platform_ver% echo Build directory: %work_dir% echo Configuration file: %config% REM Change working dir to the dir where this script is located cd /d "%~dp0" REM Set up environment call "%tools_dir%\setenv.bat" "%platform_ver%" if "%ERRORLEVEL%" neq "0" ( echo Error: Failed to initialize environment. pause >nul exit /b 1 ) REM Build project call "%tools_dir%\build.bat" "%config%" "%work_dir%" if "%ERRORLEVEL%" neq "0" ( echo Error: Failed to build project. pause >nul exit /b 1 ) REM Launch SDK call "%tools_dir%\launch.bat" "%platform_ver%" "%work_dir%" if "%ERRORLEVEL%" neq "0" ( echo Error: Failed to launch SDK. pause >nul exit /b 1 ) exit /b 0