summaryrefslogtreecommitdiffstats
path: root/Doc/make.bat
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2015-02-06 06:08:48 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2015-02-06 06:08:48 (GMT)
commitbb24087a2cbfb186b540cc71a74ec8c39c1ebe3a (patch)
tree3b586e72b5744c4076a222e8f803a00d17b5f20f /Doc/make.bat
parent7425f36ee74ccf5bfc2894aca6e6b86815894f98 (diff)
downloadcpython-bb24087a2cbfb186b540cc71a74ec8c39c1ebe3a.zip
cpython-bb24087a2cbfb186b540cc71a74ec8c39c1ebe3a.tar.gz
cpython-bb24087a2cbfb186b540cc71a74ec8c39c1ebe3a.tar.bz2
Issue #23260: Update Windows installer
Diffstat (limited to 'Doc/make.bat')
-rw-r--r--Doc/make.bat15
1 files changed, 10 insertions, 5 deletions
diff --git a/Doc/make.bat b/Doc/make.bat
index c8f6082..fd54cb8 100644
--- a/Doc/make.bat
+++ b/Doc/make.bat
@@ -8,11 +8,15 @@ set this=%~n0
if "%SPHINXBUILD%" EQU "" set SPHINXBUILD=sphinx-build
if "%PYTHON%" EQU "" set PYTHON=py
-if DEFINED ProgramFiles(x86) set _PRGMFLS=%ProgramFiles(x86)%
-if NOT DEFINED ProgramFiles(x86) set _PRGMFLS=%ProgramFiles%
-if "%HTMLHELP%" EQU "" set HTMLHELP=%_PRGMFLS%\HTML Help Workshop\hhc.exe
+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 "%DISTVERSION%" EQU "" for /f "usebackq" %%v in (`%PYTHON% tools/patchlevel.py`) do set DISTVERSION=%%v
+if "%DISTVERSION%" EQU "" for /f "usebackq" %%v in (`%PYTHON% tools/extensions/patchlevel.py`) do set DISTVERSION=%%v
if "%BUILDDIR%" EQU "" set BUILDDIR=build
@@ -36,7 +40,8 @@ if errorlevel 9009 (
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
- goto end
+ popd
+ exit /B 1
)
rem Targets that do require sphinx-build and have their own label