diff options
Diffstat (limited to 'contrib/coverity.bat')
-rwxr-xr-x | contrib/coverity.bat | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/contrib/coverity.bat b/contrib/coverity.bat index d65f2094c..9d274189b 100755 --- a/contrib/coverity.bat +++ b/contrib/coverity.bat @@ -1,5 +1,5 @@ @ECHO OFF -REM (C) 2013-2014 see Authors.txt +REM (C) 2013-2015 see Authors.txt REM REM This file is part of MPC-HC. REM @@ -21,10 +21,12 @@ SETLOCAL PUSHD %~dp0 -IF NOT DEFINED COVDIR SET "COVDIR=H:\progs\thirdparty\cov-analysis-win64-7.5.0" -IF DEFINED COVDIR IF NOT EXIST "%COVDIR%" ( +IF EXIST "..\build.user.bat" CALL "..\build.user.bat" + +IF NOT DEFINED COV_PATH SET "COV_PATH=H:\progs\thirdparty\cov-analysis-win64" +IF DEFINED COV_PATH IF NOT EXIST "%COV_PATH%" ( ECHO. - ECHO ERROR: Coverity not found in "%COVDIR%" + ECHO ERROR: Coverity not found in "%COV_PATH%" GOTO End ) @@ -48,16 +50,16 @@ CALL "..\build.bat" clean Lite Both Main Release silent CALL "..\build.bat" clean Filters Both Release silent CALL "..\build.bat" clean IconLib Both Release silent CALL "..\build.bat" clean Api Both Release silent -"%COVDIR%\bin\cov-build.exe" --dir cov-int "..\build.bat" Build Lite Both Main Release silent -"%COVDIR%\bin\cov-build.exe" --dir cov-int "..\build.bat" Build Filters Both Release silent -"%COVDIR%\bin\cov-build.exe" --dir cov-int "..\build.bat" Build IconLib Both Release silent -"%COVDIR%\bin\cov-build.exe" --dir cov-int "..\build.bat" Build Api Both Release silent +"%COV_PATH%\bin\cov-build.exe" --dir cov-int "..\build.bat" Build Lite Both Main Release silent +"%COV_PATH%\bin\cov-build.exe" --dir cov-int "..\build.bat" Build Filters Both Release silent +"%COV_PATH%\bin\cov-build.exe" --dir cov-int "..\build.bat" Build IconLib Both Release silent +"%COV_PATH%\bin\cov-build.exe" --dir cov-int "..\build.bat" Build Api Both Release silent :tar tar --version 1>&2 2>NUL || (ECHO. & ECHO ERROR: tar not found & GOTO SevenZip) tar caf "MPC-HC.lzma" "cov-int" -GOTO End +GOTO Upload :SevenZip @@ -69,10 +71,17 @@ IF EXIST "%SEVENZIP%" ( "%SEVENZIP%" a -ttar "MPC-HC.tar" "cov-int" "%SEVENZIP%" a -tgzip "MPC-HC.tgz" "MPC-HC.tar" IF EXIST "MPC-HC.tar" DEL "MPC-HC.tar" - GOTO End + GOTO Upload ) +:Upload +CALL "..\build.bat" GetVersion +CALL :SubDetectCurl +%CURL% --form project=MPC-HC --form token=%COV_TOKEN% --form email=%COV_EMAIL% --form file=@MPC-HC.lzma --form version=%MPCHC_HASH% http://scan5.coverity.com/cgi-bin/upload.py +GOTO End + + :SubDetectSevenzipPath FOR %%G IN (7z.exe) DO (SET "SEVENZIP_PATH=%%~$PATH:G") IF EXIST "%SEVENZIP_PATH%" (SET "SEVENZIP=%SEVENZIP_PATH%" & EXIT /B) @@ -86,6 +95,14 @@ FOR /F "tokens=2*" %%A IN ( EXIT /B +:SubDetectCurl +IF EXIST curl.exe (SET "CURL=curl.exe" & EXIT /B) +IF EXIST "%CURL_PATH%\curl.exe" (SET "CURL=%CURL_PATH%\curl.exe" & EXIT /B) +FOR %%G IN (curl.exe) DO (SET "CURL_PATH=%%~$PATH:G") +IF EXIST "%CURL_PATH%" (SET "CURL=%CURL_PATH%" & EXIT /B) +EXIT /B + + :End POPD ECHO. & ECHO Press any key to close this window... |