summaryrefslogtreecommitdiffstats
path: root/Tools/msi
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/msi')
-rw-r--r--Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp2
-rw-r--r--Tools/msi/common.wxs2
-rw-r--r--Tools/msi/doc/doc_en-US.wxl_template2
-rw-r--r--Tools/msi/msi.props13
-rw-r--r--Tools/msi/redist/README.txt15
-rw-r--r--Tools/msi/tcltk/tcltk.wxs65
-rw-r--r--Tools/msi/tcltk/tcltk_en-US.wxl_template4
-rw-r--r--Tools/msi/testrelease.bat22
8 files changed, 94 insertions, 31 deletions
diff --git a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
index 547c9b8..c4b5253 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 2e50c12..7529aab 100644
--- a/Tools/msi/common.wxs
+++ b/Tools/msi/common.wxs
@@ -14,7 +14,7 @@
<?if $(var.UpgradeCode)!=$(var.CoreUpgradeCode) ?>
<Upgrade Id="$(var.CoreUpgradeCode)">
- <UpgradeVersion Property="MISSING_CORE" Minimum="$(var.Version)" Maximum="$(var.Version)" OnlyDetect="yes" />
+ <UpgradeVersion Property="MISSING_CORE" Minimum="$(var.Version)" IncludeMinimum="yes" Maximum="$(var.Version)" IncludeMaximum="yes" OnlyDetect="yes" />
</Upgrade>
<?endif ?>
diff --git a/Tools/msi/doc/doc_en-US.wxl_template b/Tools/msi/doc/doc_en-US.wxl_template
index 09df582..809556e 100644
--- a/Tools/msi/doc/doc_en-US.wxl_template
+++ b/Tools/msi/doc/doc_en-US.wxl_template
@@ -2,6 +2,6 @@
<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
<String Id="ShortDescriptor">doc</String>
<String Id="Descriptor">Documentation</String>
- <String Id="ShortcutName">Python {{ShortVersion}} {{Bitness}} Manuals</String>
+ <String Id="ShortcutName">Python {{ShortVersion}} Manuals ({{Bitness}})</String>
<String Id="ShortcutDescription">View the !(loc.ProductName) documentation.</String>
</WixLocalization>
diff --git a/Tools/msi/msi.props b/Tools/msi/msi.props
index 9fa80f3..6ca0332 100644
--- a/Tools/msi/msi.props
+++ b/Tools/msi/msi.props
@@ -49,9 +49,9 @@
<OutputPath Condition="!HasTrailingSlash($(OutputPath))">$(OutputPath)\</OutputPath>
<OutDir>$(OutputPath)</OutDir>
<ReuseCabinetCache>true</ReuseCabinetCache>
- <CRTRedist Condition="">$([System.IO.Path]::GetFullPath(`$(VS140COMNTOOLS)\..\..\VC\redist\$(Platform)\Microsoft.VC140.CRT`))</CRTRedist>
- <CRTRedist Condition="'$(CRTRedist)' != '' and !Exists($(CRTRedist))">$(MSBuildThisFileDirectory)\redist\$(Platform)</CRTRedist>
- <CRTRedist Condition="'$(CRTRedist)' != '' and !Exists($(CRTRedist))"></CRTRedist>
+ <CRTRedist Condition="'$(CRTRedist)' == ''">$(ExternalsDir)\redist</CRTRedist>
+ <CRTRedist Condition="!Exists($(CRTRedist))"></CRTRedist>
+ <DocFilename>python$(MajorVersionNumber)$(MinorVersionNumber)$(MicroVersionNumber)$(ReleaseLevelName).chm</DocFilename>
<RevisionNumber>$(ReleaseLevelNumber)</RevisionNumber>
<RevisionNumber Condition="!$(BuildForRelease)">$([System.Math]::Floor($([System.DateTime]::Now.Subtract($([System.DateTime]::new(2001, 1, 1))).TotalDays)))</RevisionNumber>
@@ -69,6 +69,7 @@
MinorVersionNumber=$(MinorVersionNumber);
UpgradeMinimumVersion=$(MajorVersionNumber).$(MinorVersionNumber).0.0;
NextMajorVersionNumber=$(MajorVersionNumber).$([msbuild]::Add($(MinorVersionNumber), 1)).0.0;
+ Bitness=$(Bitness);
PyDebugExt=$(PyDebugExt);
</DefineConstants>
<DefineConstants Condition="'$(CRTRedist)' != ''">
@@ -109,11 +110,11 @@
<BindName>tcltk</BindName>
</LinkerBindInputPaths>
<LinkerBindInputPaths Include="$(CRTRedist)" Condition="'$(CRTRedist)' != ''">
- <BindName>crt</BindName>
- </LinkerBindInputPaths>
- <LinkerBindInputPaths Include="$(MSBuildThisFileDirectory)\redist">
<BindName>redist</BindName>
</LinkerBindInputPaths>
+ <LinkerBindInputPaths Include="$(CRTRedist)\$(Platform)" Condition="'$(CRTRedist)' != ''">
+ <BindName>crt</BindName>
+ </LinkerBindInputPaths>
</ItemGroup>
<Target Name="_ValidateMsiProps" BeforeTargets="PrepareForBuild">
diff --git a/Tools/msi/redist/README.txt b/Tools/msi/redist/README.txt
deleted file mode 100644
index 48d26e1..0000000
--- 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 819fccb..4a0d80f 100644
--- a/Tools/msi/tcltk/tcltk.wxs
+++ b/Tools/msi/tcltk/tcltk.wxs
@@ -8,18 +8,24 @@
<PropertyRef Id="REGISTRYKEY" />
<Property Id="PYTHON_EXE" Secure="yes">
- <ComponentSearch Id="PythonExe" Guid="$(var.PythonwExeComponentGuid)">
+ <ComponentSearch Id="PythonExe" Guid="$(var.PythonExeComponentGuid)">
+ <FileSearch Name="python.exe" />
+ </ComponentSearch>
+ </Property>
+
+ <Property Id="PYTHONW_EXE" Secure="yes">
+ <ComponentSearch Id="PythonwExe" Guid="$(var.PythonwExeComponentGuid)">
<FileSearch Name="pythonw.exe" />
</ComponentSearch>
</Property>
- <Condition Message="!(loc.NoPython)">PYTHON_EXE</Condition>
+ <Condition Message="!(loc.NoPython)">PYTHON_EXE and PYTHONW_EXE</Condition>
<Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
<ComponentGroupRef Id="tkinter_extension" />
<ComponentGroupRef Id="tcltk_dlls" />
<ComponentGroupRef Id="tcltk_lib" />
- <ComponentGroupRef Id="tkinter_lib" />
+ <ComponentGroupRef Id="tkinter_lib" Primary="yes" />
<Component Id="idle_shortcut" Directory="MenuDir">
<RegistryValue KeyPath="yes" Root="HKMU" Key="[REGISTRYKEY]\Idle" Type="string" Value="[#Lib_idlelib_idle.pyw]" />
@@ -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">
<Icon Id="idle.exe" SourceFile="!(bindpath.src)Lib\idlelib\Icons\idle.ico" />
</Shortcut>
+ <Shortcut Id="pydoc.py"
+ Target="[PYTHON_EXE]"
+ Arguments='-m pydoc -b'
+ Name="!(loc.PyDocShortcutName)"
+ Description="!(loc.PyDocShortcutDescription)"
+ Icon="idle.exe" />
+ </Component>
+ </Feature>
+ <Feature Id="AssociateFiles" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <ComponentGroupRef Id="tkinter_lib" />
+
+ <!-- We fix the guid of the Subcommands key so that it is correctly reference counted -->
+ <Component Id="assoc_subcommands" Directory="InstallDirectory" Guid="{57D47B4C-96E6-40A0-A958-57083D74423F}">
+ <Condition>VersionNT > 600</Condition>
+ <RegistryValue Root="HKCR" Key="$(var.TestPrefix)Python.File\Shell\editwithidle" Name="MUIVerb" Value="!(loc.EditMenu)" Type="string" KeyPath="yes" />
+ <RegistryValue Root="HKCR" Key="$(var.TestPrefix)Python.File\Shell\editwithidle" Name="Subcommands" Value="" Type="string" KeyPath="no" />
+ </Component>
+ <Component Id="assoc_subcommands_nocon" Directory="InstallDirectory" Guid="{07061D85-9151-4FC4-BB78-13628020D026}">
+ <Condition>VersionNT > 600</Condition>
+ <RegistryValue Root="HKCR" Key="$(var.TestPrefix)Python.NoConFile\Shell\editwithidle" Name="MUIVerb" Value="!(loc.EditMenu)" Type="string" KeyPath="yes" />
+ <RegistryValue Root="HKCR" Key="$(var.TestPrefix)Python.NoConFile\Shell\editwithidle" Name="Subcommands" Value="" Type="string" KeyPath="no" />
+ </Component>
+
+ <Component Id="assoc_editwithidle" Directory="InstallDirectory">
+ <Condition>VersionNT > 600</Condition>
+ <RegistryKey Root="HKCR" Key="$(var.TestPrefix)Python.File\Shell\editwithidle\shell\edit$(var.MajorVersionNumber)$(var.MinorVersionNumber)$(var.Suffix32)">
+ <RegistryValue Name="MUIVerb" Value="!(loc.EditSubMenu)" Type="string" KeyPath="yes" />
+ <RegistryValue Key="command" Value='"[PYTHONW_EXE]" -m idlelib "%L" %*' Type="string" />
+ </RegistryKey>
+ </Component>
+ <Component Id="assoc_editwithidle_nocon" Directory="InstallDirectory">
+ <Condition>VersionNT > 600</Condition>
+ <RegistryKey Root="HKCR" Key="$(var.TestPrefix)Python.NoConFile\Shell\editwithidle\shell\edit$(var.MajorVersionNumber)$(var.MinorVersionNumber)$(var.Suffix32)">
+ <RegistryValue Name="MUIVerb" Value="!(loc.EditSubMenu)" Type="string" KeyPath="yes" />
+ <RegistryValue Key="command" Value='"[PYTHONW_EXE]" -m idlelib "%L" %*' Type="string" />
+ </RegistryKey>
+ </Component>
+
+ <Component Id="assoc_editwithidle_vista" Directory="InstallDirectory">
+ <Condition>VersionNT = 600</Condition>
+ <RegistryKey Root="HKCR" Key="$(var.TestPrefix)Python.File\Shell\editwithidle$(var.MajorVersionNumber)$(var.MinorVersionNumber)$(var.Suffix32)">
+ <RegistryValue Value="!(loc.EditSubMenu)" Type="string" KeyPath="yes" />
+ <RegistryValue Key="command" Value='"[PYTHONW_EXE]" -m idlelib "%L" %*' Type="string" />
+ </RegistryKey>
+ </Component>
+ <Component Id="assoc_editwithidle_nocon_vista" Directory="InstallDirectory">
+ <Condition>VersionNT = 600</Condition>
+ <RegistryKey Root="HKCR" Key="$(var.TestPrefix)Python.NoConFile\Shell\editwithidle$(var.MajorVersionNumber)$(var.MinorVersionNumber)$(var.Suffix32)">
+ <RegistryValue Value="!(loc.EditSubMenu)" Type="string" KeyPath="yes" />
+ <RegistryValue Key="command" Value='"[PYTHONW_EXE]" -m idlelib "%L" %*' Type="string" />
+ </RegistryKey>
</Component>
</Feature>
</Product>
diff --git a/Tools/msi/tcltk/tcltk_en-US.wxl_template b/Tools/msi/tcltk/tcltk_en-US.wxl_template
index d0f8c10..f40fd62 100644
--- a/Tools/msi/tcltk/tcltk_en-US.wxl_template
+++ b/Tools/msi/tcltk/tcltk_en-US.wxl_template
@@ -5,4 +5,8 @@
<String Id="NoPython">No !(loc.ProductName) installation was detected.</String>
<String Id="ShortcutName">IDLE (Python {{ShortVersion}} {{Bitness}})</String>
<String Id="ShortcutDescription">Launches IDLE, the interactive environment for !(loc.ProductName).</String>
+ <String Id="PyDocShortcutName">Python {{ShortVersion}} Module Docs ({{Bitness}})</String>
+ <String Id="PyDocShortcutDescription">Start the !(loc.ProductName) documentation server.</String>
+ <String Id="EditMenu">&amp;Edit with IDLE</String>
+ <String Id="EditSubMenu">Edit with IDLE {{ShortVersion}} ({{Bitness}})</String>
</WixLocalization>
diff --git a/Tools/msi/testrelease.bat b/Tools/msi/testrelease.bat
index 5c9e015..aee5e2f 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"