summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2015-02-08 06:20:48 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2015-02-08 06:20:48 (GMT)
commit312cef086b277c6f79cde5b345f0ce1ada81095e (patch)
tree96d83f36c19c961e691092841b79b73bd6ae5b13 /Doc
parent914db0f11cae7874b1e58f170ef033f157cf45e5 (diff)
downloadcpython-312cef086b277c6f79cde5b345f0ce1ada81095e.zip
cpython-312cef086b277c6f79cde5b345f0ce1ada81095e.tar.gz
cpython-312cef086b277c6f79cde5b345f0ce1ada81095e.tar.bz2
Improve Windows release scripts
Diffstat (limited to 'Doc')
-rw-r--r--Doc/make.bat18
1 files changed, 11 insertions, 7 deletions
diff --git a/Doc/make.bat b/Doc/make.bat
index fd54cb8..6aae34a 100644
--- a/Doc/make.bat
+++ b/Doc/make.bat
@@ -8,13 +8,17 @@ set this=%~n0
if "%SPHINXBUILD%" EQU "" set SPHINXBUILD=sphinx-build
if "%PYTHON%" EQU "" set PYTHON=py
-if "%HTMLHELP%" EQU "" (
- where hhc 2>nul >"%TEMP%\hhc.loc"
- if errorlevel 1 dir "..\externals\hhc.exe" /s/b > "%TEMP%\hhc.loc"
- if errorlevel 1 echo Cannot find HHC on PATH or in externals & exit /B 1
- set /P HTMLHELP= < "%TEMP%\hhc.loc"
- del "%TEMP%\hhc.loc"
-)
+if "%1" NEQ "htmlhelp" goto :skiphhcsearch
+if exist "%HTMLHELP%" goto :skiphhcsearch
+
+rem Search for HHC in likely places
+set HTMLHELP=
+where hhc /q && set HTMLHELP=hhc && goto :skiphhcsearch
+where /R ..\externals hhc > "%TEMP%\hhc.loc" 2> nul && set /P HTMLHELP= < "%TEMP%\hhc.loc" & del "%TEMP%\hhc.loc"
+if not exist "%HTMLHELP%" where /R "%ProgramFiles(x86)%" hhc > "%TEMP%\hhc.loc" 2> nul && set /P HTMLHELP= < "%TEMP%\hhc.loc" & del "%TEMP%\hhc.loc"
+if not exist "%HTMLHELP%" where /R "%ProgramFiles%" hhc > "%TEMP%\hhc.loc" 2> nul && set /P HTMLHELP= < "%TEMP%\hhc.loc" & del "%TEMP%\hhc.loc"
+if not exist "%HTMLHELP%" echo Cannot find HHC on PATH or in externals & exit /B 1
+:skiphhcsearch
if "%DISTVERSION%" EQU "" for /f "usebackq" %%v in (`%PYTHON% tools/extensions/patchlevel.py`) do set DISTVERSION=%%v