From 102f72cf1a414f507951cf4988d51cffb8f4e2b4 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Tue, 24 Mar 2015 21:25:16 -0700 Subject: [PATCH] Adds pydoc shortcut, Edit with IDLE menu, moves redist folder into externals and fixes test script. --- .../PythonBootstrapperApplication.cpp | 2 + Tools/msi/common.wxs | 2 +- Tools/msi/doc/doc_en-US.wxl_template | 2 +- Tools/msi/msi.props | 13 ++-- Tools/msi/redist/README.txt | 15 ----- Tools/msi/tcltk/tcltk.wxs | 65 +++++++++++++++++-- Tools/msi/tcltk/tcltk_en-US.wxl_template | 4 ++ Tools/msi/testrelease.bat | 22 +++++-- 8 files changed, 94 insertions(+), 31 deletions(-) delete mode 100644 Tools/msi/redist/README.txt diff --git a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp index 547c9b8822a..c4b5253cc56 100644 --- a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp +++ b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp @@ -742,6 +742,8 @@ public: // IBootstrapperApplication } else { *pRequestedState = BOOTSTRAPPER_FEATURE_STATE_ABSENT; } + } else { + *pRequestedState = BOOTSTRAPPER_FEATURE_STATE_LOCAL; } return CheckCanceled() ? IDCANCEL : IDNOACTION; } diff --git a/Tools/msi/common.wxs b/Tools/msi/common.wxs index 2e50c120234..7529aab0c6c 100644 --- a/Tools/msi/common.wxs +++ b/Tools/msi/common.wxs @@ -14,7 +14,7 @@ - + diff --git a/Tools/msi/doc/doc_en-US.wxl_template b/Tools/msi/doc/doc_en-US.wxl_template index 09df5829ef5..809556e29fb 100644 --- a/Tools/msi/doc/doc_en-US.wxl_template +++ b/Tools/msi/doc/doc_en-US.wxl_template @@ -2,6 +2,6 @@ doc Documentation - Python {{ShortVersion}} {{Bitness}} Manuals + Python {{ShortVersion}} Manuals ({{Bitness}}) View the !(loc.ProductName) documentation. diff --git a/Tools/msi/msi.props b/Tools/msi/msi.props index 9fa80f3684e..6ca0332690c 100644 --- a/Tools/msi/msi.props +++ b/Tools/msi/msi.props @@ -49,9 +49,9 @@ $(OutputPath)\ $(OutputPath) true - $([System.IO.Path]::GetFullPath(`$(VS140COMNTOOLS)\..\..\VC\redist\$(Platform)\Microsoft.VC140.CRT`)) - $(MSBuildThisFileDirectory)\redist\$(Platform) - + $(ExternalsDir)\redist + + python$(MajorVersionNumber)$(MinorVersionNumber)$(MicroVersionNumber)$(ReleaseLevelName).chm $(ReleaseLevelNumber) $([System.Math]::Floor($([System.DateTime]::Now.Subtract($([System.DateTime]::new(2001, 1, 1))).TotalDays))) @@ -69,6 +69,7 @@ MinorVersionNumber=$(MinorVersionNumber); UpgradeMinimumVersion=$(MajorVersionNumber).$(MinorVersionNumber).0.0; NextMajorVersionNumber=$(MajorVersionNumber).$([msbuild]::Add($(MinorVersionNumber), 1)).0.0; + Bitness=$(Bitness); PyDebugExt=$(PyDebugExt); @@ -109,11 +110,11 @@ tcltk - crt - - redist + + crt + diff --git a/Tools/msi/redist/README.txt b/Tools/msi/redist/README.txt deleted file mode 100644 index 48d26e1df0f..00000000000 --- a/Tools/msi/redist/README.txt +++ /dev/null @@ -1,15 +0,0 @@ -This folder is intentianally left empty in the repository. - -The following dependencies may be copied here if they cannot be detected -automatically by the build scripts: - -redist\Windows6.0-KB2999226-x64.msu -redist\Windows6.0-KB2999226-x86.msu -redist\Windows6.1-KB2999226-x64.msu -redist\Windows6.1-KB2999226-x86.msu -redist\Windows8.1-KB2999226-x64.msu -redist\Windows8.1-KB2999226-x86.msu -redist\Windows8-RT-KB2999226-x64.msu -redist\Windows8-RT-KB2999226-x86.msu -redist\x64\vcruntime140.dll -redist\x86\vcruntime140.dll diff --git a/Tools/msi/tcltk/tcltk.wxs b/Tools/msi/tcltk/tcltk.wxs index 819fccb9c32..4a0d80f9ebe 100644 --- a/Tools/msi/tcltk/tcltk.wxs +++ b/Tools/msi/tcltk/tcltk.wxs @@ -8,18 +8,24 @@ - + + + + + + + - PYTHON_EXE + PYTHON_EXE and PYTHONW_EXE - + @@ -29,11 +35,62 @@ Directory="MenuDir" Name="!(loc.ShortcutName)" Description="!(loc.ShortcutDescription)" - Target="[PYTHON_EXE]" + Target="[PYTHONW_EXE]" Arguments='"[#Lib_idlelib_idle.pyw]"' Icon="idle.exe"> + + + + + + + + + VersionNT > 600 + + + + + VersionNT > 600 + + + + + + VersionNT > 600 + + + + + + + VersionNT > 600 + + + + + + + + VersionNT = 600 + + + + + + + VersionNT = 600 + + + + diff --git a/Tools/msi/tcltk/tcltk_en-US.wxl_template b/Tools/msi/tcltk/tcltk_en-US.wxl_template index d0f8c104972..f40fd6239de 100644 --- a/Tools/msi/tcltk/tcltk_en-US.wxl_template +++ b/Tools/msi/tcltk/tcltk_en-US.wxl_template @@ -5,4 +5,8 @@ No !(loc.ProductName) installation was detected. IDLE (Python {{ShortVersion}} {{Bitness}}) Launches IDLE, the interactive environment for !(loc.ProductName). + Python {{ShortVersion}} Module Docs ({{Bitness}}) + Start the !(loc.ProductName) documentation server. + &Edit with IDLE + Edit with IDLE {{ShortVersion}} ({{Bitness}}) diff --git a/Tools/msi/testrelease.bat b/Tools/msi/testrelease.bat index 5c9e01581a9..aee5e2f36ed 100644 --- a/Tools/msi/testrelease.bat +++ b/Tools/msi/testrelease.bat @@ -59,9 +59,26 @@ exit /B 0 @echo Printing version "%~2\Python\python.exe" -c "import sys; print(sys.version)" > "%~2\version.txt" 2>&1 ) + +@if not errorlevel 1 ( + @echo Capturing Start Menu + @dir /s/b "%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs" | findstr /ic:"python" > "%~2\startmenu.txt" 2>&1 + @dir /s/b "%APPDATA%\Microsoft\Windows\Start Menu\Programs" | findstr /ic:"python" >> "%~2\startmenu.txt" 2>&1 + + @echo Capturing registry + @for /F "usebackq" %%f in (`reg query HKCR /s /f python /k`) do @( + echo %%f >> "%~2\hkcr.txt" + reg query "%%f" /s >> "%~2\hkcr.txt" 2>&1 + ) + @reg query HKCU\Software\Python /s > "%~2\hkcu.txt" 2>&1 + @reg query HKLM\Software\Python /reg:32 /s > "%~2\hklm.txt" 2>&1 + @reg query HKLM\Software\Python /reg:64 /s >> "%~2\hklm.txt" 2>&1 + cmd /k exit 0 +) + @if not errorlevel 1 ( @echo Installing package - "%~2\Python\python.exe" -m pip install azure > "%~2\pip.txt" 2>&1 + "%~2\Python\python.exe" -m pip install "azure<0.10" > "%~2\pip.txt" 2>&1 @if not errorlevel 1 ( "%~2\Python\python.exe" -m pip uninstall -y azure python-dateutil six >> "%~2\pip.txt" 2>&1 ) @@ -75,9 +92,6 @@ exit /B 0 @set EXITCODE=%ERRORLEVEL% -@for /d %%f in ("%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs\Python*") do @dir "%%~ff\*.lnk" /s/b > "%~2\startmenu.txt" 2>&1 -@for /d %%f in ("%APPDATA%\Microsoft\Windows\Start Menu\Programs\Python*") do @dir "%%~ff\*.lnk" /s/b >> "%~2\startmenu.txt" 2>&1 - @echo Result was %EXITCODE% @echo Removing %1 "%~1" /passive /uninstall /log "%~2\uninstall\log.txt"