From d9ce0fc0782d72795e8295cc29c0edafd7a6fe34 Mon Sep 17 00:00:00 2001 From: Geoff McLane Date: Wed, 30 Mar 2016 15:01:40 +0200 Subject: [PATCH] Some improvements in build-me.bat --- build/win64/build-me.bat | 53 +++++++++++++++++++++++++++++----------- 1 file changed, 39 insertions(+), 14 deletions(-) diff --git a/build/win64/build-me.bat b/build/win64/build-me.bat index 77e749a..9950525 100644 --- a/build/win64/build-me.bat +++ b/build/win64/build-me.bat @@ -1,14 +1,16 @@ @setlocal +@REM 20160324 - Change to relative, and use choice @set TMPPRJ=tidy @echo Build %TMPPRJ% project, in 64-bits @set TMPLOG=bldlog-1.txt @set BLDDIR=%CD% -@set TMPROOT=F:\Projects +@set TMPROOT=..\..\.. @set SET_BAT=%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat @if NOT EXIST "%SET_BAT%" goto NOBAT -@if NOT EXIST %TMPROOT%\nul goto NOROOT -@set TMPSRC=%TMPROOT%\tidy-html5 +@REM if NOT EXIST %TMPROOT%\nul goto NOROOT +@set TMPSRC=..\.. @if NOT EXIST %TMPSRC%\CMakeLists.txt goto NOCM +@set DOPAUSE=1 @if /I "%PROCESSOR_ARCHITECTURE%" EQU "AMD64" ( @set TMPINST=%TMPROOT%\software.x64 @@ -32,7 +34,7 @@ @REM call setupqt64 @cd %BLDDIR% -:DNARCH +@REM :DNARCH @REM ############################################ @REM NOTE: SPECIAL INSTALL LOCATION @@ -47,7 +49,11 @@ :RPT @if "%~1x" == "x" goto GOTCMD -@set TMPOPTS=%TMPOPTS% %1 +@if "%~1x" == "NOPAUSEx" ( + @set DOPAUSE=0 +) else ( + @set TMPOPTS=%TMPOPTS% %1 +) @shift @goto RPT :GOTCMD @@ -74,11 +80,20 @@ :DNREL @echo Appears a successful build -@echo. -@REM echo No INSTALL configured at this time -@REM goto END - @echo Note install location %TMPINST% +@echo. + +@REM ############################################## +@REM Check if should continue with install +@REM ############################################## +@if "%DOPAUSE%x" == "0x" goto DOINST +@choice /? >nul 2>&1 +@if ERRORLEVEL 1 goto NOCHOICE +@choice /D N /T 10 /M "Pausing for 10 seconds. Def=N" +@if ERRORLEVEL 2 goto GOTNO +@goto DOINST +:NOCHOICE +@echo Appears OS does not have the 'choice' command! @ask *** CONTINUE with install? *** Only y continues @if ERRORLEVEL 2 goto NOASK @if ERRORLEVEL 1 goto DOINST @@ -86,11 +101,15 @@ @echo. @goto END :NOASK -@echo ask not found in path... -@echo *** CONTINUE with install? *** Only y continues +@echo 'ask' utility not found in path... +@echo. +@echo *** CONTINUE with install? *** Only Ctrl+c aborts... +@echo. @pause :DOINST +@echo Proceeding with INSTALL... +@echo. @REM cmake -P cmake_install.cmake @echo Doing: 'cmake --build . --config debug --target INSTALL' @echo Doing: 'cmake --build . --config debug --target INSTALL' >> %TMPLOG% @@ -106,13 +125,19 @@ @goto END +:GOTNO +@echo. +@echo No install at this time, but there may be an updexe.bat to copy the EXE to c:\MDOS... +@echo. +@goto END + :NOBAT @echo Can NOT locate MSVC setup batch "%SET_BAT%"! *** FIX ME *** @goto ISERR -:NOROOT -@echo Can NOT locate %TMPROOT%! *** FIX ME *** -@goto ISERR +@REM :NOROOT +@REM @echo Can NOT locate %TMPROOT%! *** FIX ME *** +@REM @goto ISERR :NOCM @echo Can NOT locate %TMPSRC%\CMakeLists.txt! *** FIX ME ***