8000 gh-93824: Reenable installation of shell extension on Windows ARM64 (… · python/cpython@8786407 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8786407

Browse files
gh-93824: Reenable installation of shell extension on Windows ARM64 (GH-93825)
(cherry picked from commit 99be1cb) Co-authored-by: Steve Dower <steve.dower@python.org>
1 parent d1fd739 commit 8786407

File tree

4 files changed

+26
-14
lines changed
  • Tools/msi
  • 4 files changed

    +26
    -14
    lines changed
    Lines changed: 2 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -0,0 +1,2 @@
    1+
    Drag and drop of files onto Python files in Windows Explorer has been
    2+
    enabled for Windows ARM64.

    Tools/msi/bundle/packagegroups/launcher.wxs

    Lines changed: 10 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -11,7 +11,11 @@
    1111
    EnableFeatureSelection="yes"
    1212
    Permanent="yes"
    1313
    Visible="yes"
    14-
    InstallCondition="(InstallAllUsers or InstallLauncherAllUsers) and Include_launcher and not DetectedLauncher" />
    14+
    InstallCondition="(InstallAllUsers or InstallLauncherAllUsers) and Include_launcher and not DetectedLauncher">
    15+
    <?if $(var.Platform)~="ARM64" ?>
    16+
    <MsiProperty Name="ARM64_SHELLEXT" Value="1" />
    17+
    <?endif ?>
    18+
    </MsiPackage>
    1519

    1620
    <MsiPackage Id="launcher_JustForMe"
    1721
    SourceFile="!(bindpath.build32)en-us\launcher.msi"
    @@ -21,7 +25,11 @@
    2125
    EnableFeatureSelection="yes"
    2226
    Permanent="yes"
    2327
    Visible="yes"
    24-
    InstallCondition="not (InstallAllUsers or InstallLauncherAllUsers) and Include_launcher and not DetectedLauncher" />
    28+
    InstallCondition="not (InstallAllUsers or InstallLauncherAllUsers) and Include_launcher and not DetectedLauncher">
    29+
    <?if $(var.Platform)~="ARM64" ?>
    30+
    <MsiProperty Name="ARM64_SHELLEXT" Value="1" />
    31+
    <?endif ?>
    32+
    </MsiPackage>
    2533
    </PackageGroup>
    2634
    </Fragment>
    2735
    </Wix>

    Tools/msi/launcher/launcher.wxs

    Lines changed: 9 additions & 4 deletions
    Original file line numberDiff line numberDiff line change
    @@ -3,28 +3,33 @@
    33
    <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
    44
    <Package InstallerVersion="500" Compressed="yes" InstallScope="perUser" />
    55
    <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
    6-
    6+
    77
    <Property Id="Suppress_TARGETDIR_Check" Value="1" />
    88
    <Icon Id="ARPIcon" SourceFile="!(bindpath.src)PC\icons\launcher.ico" />
    99
    <Property Id="ARPPRODUCTICON" Value="ARPIcon" />
    1010
    <Property Id="ARPNOMODIFY" Value="1" />
    1111
    <Property Id="DISABLEADVTSHORTCUTS" Value="1" />
    1212

    13+
    <Property Id="ARM64_SHELLEXT">
    14+
    <ComponentSearch Id="RegistrySearch_ARM64_SHELLEXT_Detected"
    15+
    Guid="{C591963D-7FC6-4FCE-8642-5E01E6B8848F}" />
    16+
    </Property>
    17+
    1318
    <Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
    1419
    <ComponentGroupRef Id="launcher_exe" Primary="yes" />
    1520
    </Feature>
    1621
    <Feature Id="AssociateFiles" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
    1722
    <ComponentGroupRef Id="launcher_exe" />
    1823
    <ComponentGroupRef Id="launcher_reg" />
    1924
    </Feature>
    20-
    25+
    2126
    <Directory Id="TARGETDIR" Name="SourceDir">
    2227
    <Directory Id="LauncherInstallDirectory" />
    2328
    </Directory>
    24-
    29+
    2530
    <CustomAction Id="SetLauncherInstallDirectoryLM" Property="LauncherInstallDirectory" Value="[WindowsFolder]" />
    2631
    <CustomAction Id="SetLauncherInstallDirectoryCU" Property="LauncherInstallDirectory" Value="[LocalAppDataFolder]Programs\Python\Launcher" />
    27-
    32+
    2833
    <InstallExecuteSequence>
    2934
    <Custom Before="SetLauncherInstallDirectoryLM" Action="SetLauncherInstallDirectoryCU">NOT Installed AND NOT ALLUSERS=1</Custom>
    3035
    <Custom Before="CostFinalize" Action="SetLauncherInstallDirectoryLM">NOT Installed AND ALLUSERS=1</Custom>

    Tools/msi/launcher/launcher_files.wxs

    Lines changed: 5 additions & 8 deletions
    Original file line numberDiff line numberDiff line change
    @@ -22,26 +22,23 @@
    2222
    </Component>
    2323

    2424
    <Component Id="pyshellext_amd64.dll" Directory="LauncherInstallDirectory" Guid="{E7411EFD-F1DD-40EB-B0C7-4BA02BF3E75F}" Win64="yes">
    25-
    <Condition>VersionNT64</Condition>
    25+
    <Condition>VersionNT64 AND NOT ARM64_SHELLEXT</Condition>
    2626
    <File Id="pyshellext_amd64.dll" Name="pyshellext.amd64.dll" Source="!(bindpath.Build64)\pyshellext.dll">
    2727
    <Class Id="{BEA218D2-6950-497B-9434-61683EC065FE}" Advertise="no" Context="InprocServer32" ThreadingModel="apartment" />
    2828
    </File>
    2929
    </Component>
    3030
    <Component Id="pyshellext_win32.dll" Directory="LauncherInstallDirectory" Guid="{C5936696-9A5A-45A0-A830-D172C3329282}">
    31-
    <Condition>NOT VersionNT64</Condition>
    31+
    <Condition>NOT VersionNT64 AND NOT ARM64_SHELLEXT</Condition>
    3232
    <File Id="pyshellext_win32.dll" Name="pyshellext.win32.dll" Source="!(bindpath.Build32)\pyshellext.dll">
    3333
    <Class Id="{BEA218D2-6950-497B-9434-61683EC065FE}" Advertise="no" Context="InprocServer32" ThreadingModel="apartment" />
    3434
    </File>
    3535
    </Component>
    36-
    <!--
    37-
    Currently unclear how to detect ARM64 device at this point.
    38-
    In any case, the shell extension doesn't appear to work, so installing a non-functional
    39-
    pyshellext_amd64.dll for a different platform isn't any worse.
    40-
    <Component Id="pyshellext_arm64.dll" Directory="LauncherInstallDirectory" Guid="{C591963D-7FC6-4FCE-8642-5E01E6B8848F}">
    36+
    <Component Id="pyshellext_arm64.dll" Directory="LauncherInstallDirectory" Guid="{C591963D-7FC6-4FCE-8642-5E01E6B8848F}" Win64="yes">
    37+
    <Condition>ARM64_SHELLEXT</Condition>
    4138
    <File Id="pyshellext_arm64.dll" Name="pyshellext.arm64.dll" Source="!(bindpath.BuildARM64)\pyshellext.dll">
    4239
    <Class Id="{BEA218D2-6950-497B-9434-61683EC065FE}" Advertise="no" Context="InprocServer32" ThreadingModel="apartment" />
    4340
    </File>
    44-
    </Component>-->
    41+
    </Component>
    4542
    </ComponentGroup>
    4643
    </Fragment>
    4744
    </Wix>

    0 commit comments

    Comments
     (0)
    0