@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=%~dp0node_cfg.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=%~dp0ge_cfg.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% pause REM Set up enviroment call "%tools_dir%\setenv.bat" "%pltform_ver%" if "%ERRORLEVEL%" neq "0" ( echo Error: Failed to installize enviroment. 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 Lauch SDK call "%tools_dir%\launch.bat" "%pltform_ver%" "%work_dir%" if "%ERRORLEVEL%" neq "0" ( echo Error: Failed to launch SDK. pause >nul exit /b 1 ) exit /b 0