]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-93824: Reenable installation of shell extension on Windows ARM64 (GH-93825)
authorSteve Dower <steve.dower@python.org>
Wed, 15 Jun 2022 16:07:55 +0000 (17:07 +0100)
committerGitHub <noreply@github.com>
Wed, 15 Jun 2022 16:07:55 +0000 (17:07 +0100)
Misc/NEWS.d/next/Windows/2022-06-15-01-03-52.gh-issue-93824.mR4mxu.rst [new file with mode: 0644]
Tools/msi/bundle/packagegroups/launcher.wxs
Tools/msi/launcher/launcher.wxs
Tools/msi/launcher/launcher_files.wxs

diff --git a/Misc/NEWS.d/next/Windows/2022-06-15-01-03-52.gh-issue-93824.mR4mxu.rst b/Misc/NEWS.d/next/Windows/2022-06-15-01-03-52.gh-issue-93824.mR4mxu.rst
new file mode 100644 (file)
index 0000000..cabe983
--- /dev/null
@@ -0,0 +1,2 @@
+Drag and drop of files onto Python files in Windows Explorer has been
+enabled for Windows ARM64.
index 7dae8ca7a68c1857ffaee41e90cce8d32700cb7d..a6922758f31f14fdf22ea1626336d79e44c670fa 100644 (file)
                         EnableFeatureSelection="yes"
                         Permanent="yes"
                         Visible="yes"
-                        InstallCondition="(InstallAllUsers or InstallLauncherAllUsers) and Include_launcher and not DetectedLauncher" />
+                        InstallCondition="(InstallAllUsers or InstallLauncherAllUsers) and Include_launcher and not DetectedLauncher">
+                <?if $(var.Platform)~="ARM64" ?>
+                <MsiProperty Name="ARM64_SHELLEXT" Value="1" />
+                <?endif ?>
+            </MsiPackage>
 
             <MsiPackage Id="launcher_JustForMe"
                         SourceFile="!(bindpath.build32)en-us\launcher.msi"
                         EnableFeatureSelection="yes"
                         Permanent="yes"
                         Visible="yes"
-                        InstallCondition="not (InstallAllUsers or InstallLauncherAllUsers) and Include_launcher and not DetectedLauncher" />
+                        InstallCondition="not (InstallAllUsers or InstallLauncherAllUsers) and Include_launcher and not DetectedLauncher">
+                <?if $(var.Platform)~="ARM64" ?>
+                <MsiProperty Name="ARM64_SHELLEXT" Value="1" />
+                <?endif ?>
+            </MsiPackage>
         </PackageGroup>
     </Fragment>
 </Wix>
\ No newline at end of file
index d001fe53ea3811bdd8a20e9687ac4ac74166b824..b83058c63bf6d932aa513926d08c1ed128f01cca 100644 (file)
@@ -3,13 +3,18 @@
     <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
         <Package InstallerVersion="500" Compressed="yes" InstallScope="perUser" />
         <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
-        
+
         <Property Id="Suppress_TARGETDIR_Check" Value="1" />
         <Icon Id="ARPIcon" SourceFile="!(bindpath.src)PC\icons\launcher.ico" />
         <Property Id="ARPPRODUCTICON" Value="ARPIcon" />
         <Property Id="ARPNOMODIFY" Value="1" />
         <Property Id="DISABLEADVTSHORTCUTS" Value="1" />
 
+        <Property Id="ARM64_SHELLEXT">
+            <ComponentSearch Id="RegistrySearch_ARM64_SHELLEXT_Detected"
+                             Guid="{C591963D-7FC6-4FCE-8642-5E01E6B8848F}" />
+        </Property>
+
         <Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
             <ComponentGroupRef Id="launcher_exe" Primary="yes" />
         </Feature>
             <ComponentGroupRef Id="launcher_exe" />
             <ComponentGroupRef Id="launcher_reg" />
         </Feature>
-        
+
         <Directory Id="TARGETDIR" Name="SourceDir">
             <Directory Id="LauncherInstallDirectory" />
         </Directory>
-        
+
         <CustomAction Id="SetLauncherInstallDirectoryLM" Property="LauncherInstallDirectory" Value="[WindowsFolder]" />
         <CustomAction Id="SetLauncherInstallDirectoryCU" Property="LauncherInstallDirectory" Value="[LocalAppDataFolder]Programs\Python\Launcher" />
-        
+
         <InstallExecuteSequence>
             <Custom Before="SetLauncherInstallDirectoryLM" Action="SetLauncherInstallDirectoryCU">NOT Installed AND NOT ALLUSERS=1</Custom>
             <Custom Before="CostFinalize" Action="SetLauncherInstallDirectoryLM">NOT Installed AND ALLUSERS=1</Custom>
index 2c6c808137a6ff99748c7afbc30cde8f1dd7363b..d9a230e2d35ace26e7c514243bacb6c6a6f17934 100644 (file)
             </Component>
 
             <Component Id="pyshellext_amd64.dll" Directory="LauncherInstallDirectory" Guid="{E7411EFD-F1DD-40EB-B0C7-4BA02BF3E75F}" Win64="yes">
-                <Condition>VersionNT64</Condition>
+                <Condition>VersionNT64 AND NOT ARM64_SHELLEXT</Condition>
                 <File Id="pyshellext_amd64.dll" Name="pyshellext.amd64.dll" Source="!(bindpath.Build64)\pyshellext.dll">
                     <Class Id="{BEA218D2-6950-497B-9434-61683EC065FE}" Advertise="no" Context="InprocServer32" ThreadingModel="apartment" />
                 </File>
             </Component>
             <Component Id="pyshellext_win32.dll" Directory="LauncherInstallDirectory" Guid="{C5936696-9A5A-45A0-A830-D172C3329282}">
-                <Condition>NOT VersionNT64</Condition>
+                <Condition>NOT VersionNT64 AND NOT ARM64_SHELLEXT</Condition>
                 <File Id="pyshellext_win32.dll" Name="pyshellext.win32.dll" Source="!(bindpath.Build32)\pyshellext.dll">
                     <Class Id="{BEA218D2-6950-497B-9434-61683EC065FE}" Advertise="no" Context="InprocServer32" ThreadingModel="apartment" />
                 </File>
             </Component>
-            <!--
-            Currently unclear how to detect ARM64 device at this point.
-            In any case, the shell extension doesn't appear to work, so installing a non-functional
-            pyshellext_amd64.dll for a different platform isn't any worse.
-            <Component Id="pyshellext_arm64.dll" Directory="LauncherInstallDirectory" Guid="{C591963D-7FC6-4FCE-8642-5E01E6B8848F}">
+            <Component Id="pyshellext_arm64.dll" Directory="LauncherInstallDirectory" Guid="{C591963D-7FC6-4FCE-8642-5E01E6B8848F}" Win64="yes">
+                <Condition>ARM64_SHELLEXT</Condition>
                 <File Id="pyshellext_arm64.dll" Name="pyshellext.arm64.dll" Source="!(bindpath.BuildARM64)\pyshellext.dll">
                     <Class Id="{BEA218D2-6950-497B-9434-61683EC065FE}" Advertise="no" Context="InprocServer32" ThreadingModel="apartment" />
                 </File>
-            </Component>-->
+            </Component>
         </ComponentGroup>
     </Fragment>
 </Wix>