@echo off echo Building V2GDecoder VC++ Project... REM Check if Visual Studio 2022 is installed if not exist "C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\MSBuild.exe" ( echo Visual Studio 2022 Professional not found! echo Please install Visual Studio 2022 Professional or update the MSBuild path. pause exit /b 1 ) REM Set MSBuild path set MSBUILD="C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\MSBuild.exe" REM Clean previous builds echo Cleaning previous builds... %MSBUILD% V2GDecoderC.sln -target:Clean -property:Configuration=Debug -property:Platform=x64 -verbosity:minimal REM Build Debug x64 configuration echo Building Debug x64 configuration... %MSBUILD% V2GDecoderC.sln -property:Configuration=Debug -property:Platform=x64 -verbosity:normal if %ERRORLEVEL% EQU 0 ( echo Build successful! echo Output directory: bin\x64\Debug\ dir bin\x64\Debug\*.exe /b ) else ( echo Build failed with error code %ERRORLEVEL% echo Please check the source file paths and project configuration. ) REM Test the built executable if successful if %ERRORLEVEL% EQU 0 ( echo. echo Testing the built V2GDecoder.exe... if exist bin\x64\Debug\V2GDecoder.exe ( echo Running test with test4.exi... bin\x64\Debug\V2GDecoder.exe ..\..\test4.exi echo. echo Running test with test5.exi... bin\x64\Debug\V2GDecoder.exe ..\..\test5.exi ) else ( echo V2GDecoder.exe not found in output directory ) ) pause