- Create complete VS2022 solution with 3 projects: * V2GDecoder: Main EXI decoder with debugging support * HexToBinary: Hex string to binary utility * HexDumpToBinary: Hex dump to binary utility - Copy all source files locally for Windows compilation: * Added Windows compatibility for unistd.h, fstat, S_ISREG * Fixed VLA issues in EncoderChannel.c with macro definitions * Include all required modules: codec, iso1, iso2, din, appHandshake - Build configuration: * Support Debug/Release x86/x64 configurations * Proper include directories and preprocessor definitions * Windows-specific compiler flags (_WIN32, __STDC_NO_VLA__) - Verification: * Both test4.exi and test5.exi decode/encode perfectly * 100% binary compatibility: original ↔ XML ↔ reencoded * Ready for step-by-step debugging in Visual Studio 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
47 lines
1.5 KiB
Batchfile
47 lines
1.5 KiB
Batchfile
@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 |