summaryrefslogtreecommitdiffstats
path: root/Tools/msi/tcltk/tcltk.wxs
blob: 4a0d80f9ebe439d335d26cf532fa0b2cd667c9fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
        <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
        <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
        
        <PropertyRef Id="UpgradeTable" />
        <PropertyRef Id="REGISTRYKEY" />
        
        <Property Id="PYTHON_EXE" Secure="yes">
            <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 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" Primary="yes" />
            
            <Component Id="idle_shortcut" Directory="MenuDir">
                <RegistryValue KeyPath="yes" Root="HKMU" Key="[REGISTRYKEY]\Idle" Type="string" Value="[#Lib_idlelib_idle.pyw]" />
                <RemoveFolder Id="Remove_MenuDir" On="uninstall" />

                <Shortcut Id="IDLE"
                          Directory="MenuDir"
                          Name="!(loc.ShortcutName)"
                          Description="!(loc.ShortcutDescription)"
                          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>
</Wix>