Some improvements in build-me.bat
This commit is contained in:
parent
c19d221ddc
commit
d9ce0fc078
|
@ -1,14 +1,16 @@
|
||||||
@setlocal
|
@setlocal
|
||||||
|
@REM 20160324 - Change to relative, and use choice
|
||||||
@set TMPPRJ=tidy
|
@set TMPPRJ=tidy
|
||||||
@echo Build %TMPPRJ% project, in 64-bits
|
@echo Build %TMPPRJ% project, in 64-bits
|
||||||
@set TMPLOG=bldlog-1.txt
|
@set TMPLOG=bldlog-1.txt
|
||||||
@set BLDDIR=%CD%
|
@set BLDDIR=%CD%
|
||||||
@set TMPROOT=F:\Projects
|
@set TMPROOT=..\..\..
|
||||||
@set SET_BAT=%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat
|
@set SET_BAT=%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat
|
||||||
@if NOT EXIST "%SET_BAT%" goto NOBAT
|
@if NOT EXIST "%SET_BAT%" goto NOBAT
|
||||||
@if NOT EXIST %TMPROOT%\nul goto NOROOT
|
@REM if NOT EXIST %TMPROOT%\nul goto NOROOT
|
||||||
@set TMPSRC=%TMPROOT%\tidy-html5
|
@set TMPSRC=..\..
|
||||||
@if NOT EXIST %TMPSRC%\CMakeLists.txt goto NOCM
|
@if NOT EXIST %TMPSRC%\CMakeLists.txt goto NOCM
|
||||||
|
@set DOPAUSE=1
|
||||||
|
|
||||||
@if /I "%PROCESSOR_ARCHITECTURE%" EQU "AMD64" (
|
@if /I "%PROCESSOR_ARCHITECTURE%" EQU "AMD64" (
|
||||||
@set TMPINST=%TMPROOT%\software.x64
|
@set TMPINST=%TMPROOT%\software.x64
|
||||||
|
@ -32,7 +34,7 @@
|
||||||
@REM call setupqt64
|
@REM call setupqt64
|
||||||
@cd %BLDDIR%
|
@cd %BLDDIR%
|
||||||
|
|
||||||
:DNARCH
|
@REM :DNARCH
|
||||||
|
|
||||||
@REM ############################################
|
@REM ############################################
|
||||||
@REM NOTE: SPECIAL INSTALL LOCATION
|
@REM NOTE: SPECIAL INSTALL LOCATION
|
||||||
|
@ -47,7 +49,11 @@
|
||||||
|
|
||||||
:RPT
|
:RPT
|
||||||
@if "%~1x" == "x" goto GOTCMD
|
@if "%~1x" == "x" goto GOTCMD
|
||||||
|
@if "%~1x" == "NOPAUSEx" (
|
||||||
|
@set DOPAUSE=0
|
||||||
|
) else (
|
||||||
@set TMPOPTS=%TMPOPTS% %1
|
@set TMPOPTS=%TMPOPTS% %1
|
||||||
|
)
|
||||||
@shift
|
@shift
|
||||||
@goto RPT
|
@goto RPT
|
||||||
:GOTCMD
|
:GOTCMD
|
||||||
|
@ -74,11 +80,20 @@
|
||||||
:DNREL
|
:DNREL
|
||||||
|
|
||||||
@echo Appears a successful build
|
@echo Appears a successful build
|
||||||
@echo.
|
|
||||||
@REM echo No INSTALL configured at this time
|
|
||||||
@REM goto END
|
|
||||||
|
|
||||||
@echo Note install location %TMPINST%
|
@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
|
@ask *** CONTINUE with install? *** Only y continues
|
||||||
@if ERRORLEVEL 2 goto NOASK
|
@if ERRORLEVEL 2 goto NOASK
|
||||||
@if ERRORLEVEL 1 goto DOINST
|
@if ERRORLEVEL 1 goto DOINST
|
||||||
|
@ -86,11 +101,15 @@
|
||||||
@echo.
|
@echo.
|
||||||
@goto END
|
@goto END
|
||||||
:NOASK
|
:NOASK
|
||||||
@echo ask not found in path...
|
@echo 'ask' utility not found in path...
|
||||||
@echo *** CONTINUE with install? *** Only y continues
|
@echo.
|
||||||
|
@echo *** CONTINUE with install? *** Only Ctrl+c aborts...
|
||||||
|
@echo.
|
||||||
@pause
|
@pause
|
||||||
|
|
||||||
:DOINST
|
:DOINST
|
||||||
|
@echo Proceeding with INSTALL...
|
||||||
|
@echo.
|
||||||
@REM cmake -P cmake_install.cmake
|
@REM cmake -P cmake_install.cmake
|
||||||
@echo Doing: 'cmake --build . --config debug --target INSTALL'
|
@echo Doing: 'cmake --build . --config debug --target INSTALL'
|
||||||
@echo Doing: 'cmake --build . --config debug --target INSTALL' >> %TMPLOG%
|
@echo Doing: 'cmake --build . --config debug --target INSTALL' >> %TMPLOG%
|
||||||
|
@ -106,13 +125,19 @@
|
||||||
|
|
||||||
@goto END
|
@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
|
:NOBAT
|
||||||
@echo Can NOT locate MSVC setup batch "%SET_BAT%"! *** FIX ME ***
|
@echo Can NOT locate MSVC setup batch "%SET_BAT%"! *** FIX ME ***
|
||||||
@goto ISERR
|
@goto ISERR
|
||||||
|
|
||||||
:NOROOT
|
@REM :NOROOT
|
||||||
@echo Can NOT locate %TMPROOT%! *** FIX ME ***
|
@REM @echo Can NOT locate %TMPROOT%! *** FIX ME ***
|
||||||
@goto ISERR
|
@REM @goto ISERR
|
||||||
|
|
||||||
:NOCM
|
:NOCM
|
||||||
@echo Can NOT locate %TMPSRC%\CMakeLists.txt! *** FIX ME ***
|
@echo Can NOT locate %TMPSRC%\CMakeLists.txt! *** FIX ME ***
|
||||||
|
|
Loading…
Reference in a new issue