VisualStudioProjects: Added better detection and reporting of windows-build dependency issues.
This commit is contained in:
parent
501c5ac69d
commit
004fe0de62
1 changed files with 38 additions and 15 deletions
|
@ -61,7 +61,17 @@ popd
|
|||
|
||||
:_check_build
|
||||
if "%_X_BUILD%" == "" goto _done_build
|
||||
if exist ../../windows-build-windows-build move ../../windows-build-windows-build ../../windows-build >NUL
|
||||
if not exist ../../windows-build-windows-build goto _check_files
|
||||
rem This is a newly extracted windows-build.zip file with the
|
||||
rem top level directory named as it existed in the zip file.
|
||||
rem We rename that top level directory. If a previous one already
|
||||
rem exists, that will be an older version, so we try to remove
|
||||
rem that one first.
|
||||
if exist ../../windows-build rmdir /s /q ../../windows-build
|
||||
ren /Y ../../windows-build-windows-build windows-build
|
||||
if errorlevel 1 goto _notice3
|
||||
if exist ../../windows-build-windows-build goto _notice3
|
||||
:_check_files
|
||||
if not exist ../../windows-build/winpcap/Wpdpack/Include/pcap.h goto _notice1
|
||||
if not exist ../../windows-build/pthreads/pthread.h goto _notice1
|
||||
if "%_X_LIBSDL%" == "" goto _done_build
|
||||
|
@ -69,24 +79,38 @@ if not exist ../../windows-build/libSDL/SDL2-2.0.0/include/SDL.h goto _notice2
|
|||
if not exist "../../windows-build/libSDL/Microsoft DirectX SDK (June 2010)/Lib/x86/dxguid.lib" goto _notice2
|
||||
goto _done_build
|
||||
:_notice1
|
||||
echo ****************************************************
|
||||
echo ****************************************************
|
||||
echo ** The required build support is not available. **
|
||||
echo ****************************************************
|
||||
echo ****************************************************
|
||||
echo *****************************************************
|
||||
echo *****************************************************
|
||||
echo ** The required build support is not available. **
|
||||
echo *****************************************************
|
||||
echo *****************************************************
|
||||
set _exit_reason=The required build support is not available.
|
||||
goto _ProjectInfo
|
||||
:_notice2
|
||||
echo ****************************************************
|
||||
echo ****************************************************
|
||||
echo ** The required build support is out of date. **
|
||||
echo ****************************************************
|
||||
echo ****************************************************
|
||||
echo *****************************************************
|
||||
echo *****************************************************
|
||||
echo ** The required build support is out of date. **
|
||||
echo *****************************************************
|
||||
echo *****************************************************
|
||||
set _exit_reason=The required build support is out of date.
|
||||
goto _ProjectInfo
|
||||
:_notice3
|
||||
echo *****************************************************
|
||||
echo *****************************************************
|
||||
echo ** Can't rename ../../windows-build-windows-build **
|
||||
echo ** to ../../windows-build **
|
||||
echo *****************************************************
|
||||
echo *****************************************************
|
||||
set _exit_reason=Can't rename ../../windows-build-windows-build to ../../windows-build
|
||||
goto _ProjectInfo
|
||||
:_ProjectInfo
|
||||
type 0ReadMe_Projects.txt
|
||||
echo error: %_exit_reason%
|
||||
echo error: Review the Output Tab for more details.
|
||||
exit 1
|
||||
:_done_build
|
||||
|
||||
:_GitHooks
|
||||
if not exist ..\.git goto _done_hooks
|
||||
if exist ..\.git\hooks\post-commit goto _done_hooks
|
||||
echo *****************************************************
|
||||
|
@ -94,7 +118,7 @@ echo *****************************************************
|
|||
echo ** Installing git hooks in newly cloned repository **
|
||||
echo *****************************************************
|
||||
echo *****************************************************
|
||||
copy git-hooks\post* ..\.git\hooks\
|
||||
copy /y git-hooks\post* ..\.git\hooks\
|
||||
call :WhereInPath git.exe > NUL 2>&1
|
||||
if %ERRORLEVEL% neq 0 goto _done_hooks
|
||||
pushd ..
|
||||
|
@ -105,9 +129,8 @@ popd
|
|||
:_SetId
|
||||
rem
|
||||
rem A race condition exists while creating the .git-commit-id.h file.
|
||||
rem This race can happen during a parallel build, especially at the
|
||||
rem beginning of a build where 2 projects can start execution a
|
||||
rem almost the same time.
|
||||
rem This race can happen at the beginning of a parallel build where
|
||||
rem several projects can start execution at almost the same time.
|
||||
rem
|
||||
SET GIT_COMMIT_ID=
|
||||
if not exist ..\.git-commit-id goto _NoId
|
||||
|
|
Loading…
Add table
Reference in a new issue