X-Git-Url: https://git.jtryba.com/browse/friidump.git/blobdiff_plain/d44030dfa440b1967ec7dcd3ccfe46fb69934486..65dc0f212cc166a0192080f0ffb9467459a5e201:/build_msvc32.cmd?ds=sidebyside diff --git a/build_msvc32.cmd b/build_msvc32.cmd index b91bb7c..0d69211 100644 --- a/build_msvc32.cmd +++ b/build_msvc32.cmd @@ -22,8 +22,28 @@ if not exist "build-msvc32" mkdir "build-msvc32" call "%~dp0.vscode\msvc32.cmd" cl @"%~dp0msvc32_friidump.rsp" if errorlevel 1 exit /b %ERRORLEVEL% -"%~dp0friidump.exe" --help -if errorlevel 1 exit /b %ERRORLEVEL% +set "HELP_LOG=%TEMP%\friidump-help-%RANDOM%-%RANDOM%.txt" +"%~dp0friidump.exe" --help > "%HELP_LOG%" 2>&1 +type "%HELP_LOG%" + +findstr /c:"FriiDump " "%HELP_LOG%" >nul +if errorlevel 1 ( + echo [ERROR] FriiDump help/version smoke test failed. + del /q "%HELP_LOG%" >nul 2>nul + if exist "friidump.log" del /q "friidump.log" + exit /b 1 +) + +findstr /c:"Available command line options:" "%HELP_LOG%" >nul +if errorlevel 1 ( + echo [ERROR] FriiDump command-line help smoke test failed. + del /q "%HELP_LOG%" >nul 2>nul + if exist "friidump.log" del /q "friidump.log" + exit /b 1 +) + +del /q "%HELP_LOG%" >nul 2>nul +if exist "friidump.log" del /q "friidump.log" powershell -NoProfile -ExecutionPolicy Bypass -Command "Compress-Archive -Force -Path friidump.exe,docs,README,AUTHORS,COPYING,config.h,msvc32_friidump.rsp,build_msvc32.cmd,.vscode -DestinationPath friidump_msvc32_build_results.zip" exit /b %ERRORLEVEL% @@ -32,4 +52,5 @@ exit /b %ERRORLEVEL% if exist "friidump.exe" del /q "friidump.exe" if exist "build-msvc32" rmdir /s /q "build-msvc32" if exist "friidump_msvc32_build_results.zip" del /q "friidump_msvc32_build_results.zip" +if exist "friidump.log" del /q "friidump.log" exit /b 0