Adds pydoc shortcut, Edit with IDLE menu, moves redist folder into externals and fixes test script.
This commit is contained in:
parent
fef9c1b368
commit
102f72cf1a
|
@ -742,6 +742,8 @@ public: // IBootstrapperApplication
|
|||
} else {
|
||||
*pRequestedState = BOOTSTRAPPER_FEATURE_STATE_ABSENT;
|
||||
}
|
||||
} else {
|
||||
*pRequestedState = BOOTSTRAPPER_FEATURE_STATE_LOCAL;
|
||||
}
|
||||
return CheckCanceled() ? IDCANCEL : IDNOACTION;
|
||||
}
|
||||
|
|
|
@ -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 ?>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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
|
|
@ -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>
|
||||
|
|
|
@ -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">&Edit with IDLE</String>
|
||||
<String Id="EditSubMenu">Edit with IDLE {{ShortVersion}} ({{Bitness}})</String>
|
||||
</WixLocalization>
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue