@echo off
echo Building .NET V2GDecoder Project...

rem .NET Core 빌드
echo Building Debug configuration...
dotnet build V2GDecoderNet.csproj -c Debug
if %ERRORLEVEL% neq 0 (
    echo ERROR: Debug 빌드 실패
    pause
    exit /b 1
)

echo Building Release configuration...  
dotnet build V2GDecoderNet.csproj -c Release
if %ERRORLEVEL% neq 0 (
    echo ERROR: Release 빌드 실패
    pause
    exit /b 1
)

echo.
echo ✅ .NET 빌드가 성공적으로 완료되었습니다
echo.
echo 생성된 파일들:
if exist "bin\Debug\net8.0\V2GDecoderNet.exe" (
    echo   📦 Debug: bin\Debug\net8.0\V2GDecoderNet.exe
)
if exist "bin\Release\net8.0\V2GDecoderNet.exe" (
    echo   📦 Release: bin\Release\net8.0\V2GDecoderNet.exe
)

echo.
echo 사용법:
echo   dotnet run V2GDecoderNet.csproj ..\Sample\test5.exi
echo   bin\Release\net8.0\V2GDecoderNet.exe ..\Sample\test5.exi

pause