1<?xml version="1.0" encoding="UTF-8"?>
2<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
3    <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
4        <Package InstallerVersion="500" Compressed="yes" InstallScope="perUser" />
5        <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
6
7        <PropertyRef Id="DetectTargetDir" />
8        <PropertyRef Id="UpgradeTable" />
9        <PropertyRef Id="REGISTRYKEY" />
10
11        <Property Id="PYTHON_EXE" Secure="yes">
12            <ComponentSearch Id="PythonExe" Guid="$(var.PythonExeComponentGuid)">
13                <FileSearch Name="python.exe" />
14            </ComponentSearch>
15        </Property>
16
17        <Property Id="PYTHONW_EXE" Secure="yes">
18            <ComponentSearch Id="PythonwExe" Guid="$(var.PythonwExeComponentGuid)">
19                <FileSearch Name="pythonw.exe" />
20            </ComponentSearch>
21        </Property>
22
23        <Condition Message="!(loc.NoPython)">PYTHON_EXE and PYTHONW_EXE</Condition>
24
25        <Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
26            <ComponentGroupRef Id="tkinter_extension" />
27            <ComponentGroupRef Id="tcltk_dlls" />
28            <ComponentGroupRef Id="tcltk_lib" />
29            <ComponentGroupRef Id="tkinter_lib" Primary="yes" />
30
31            <Component Id="idle_reg" Directory="InstallDirectory">
32                <RegistryValue KeyPath="yes" Root="HKMU" Key="[REGISTRYKEY]\Idle" Type="string" Value="[#Lib_idlelib_idle.pyw]" />
33            </Component>
34            <ComponentRef Id="OptionalFeature" />
35        </Feature>
36        <Feature Id="AssociateFiles" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
37            <ComponentGroupRef Id="tkinter_lib" />
38            <ComponentGroupRef Id="idle_reg" />
39        </Feature>
40        <Feature Id="Shortcuts" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
41            <ComponentGroupRef Id="tkinter_lib" />
42
43            <Component Id="idle_shortcut" Directory="MenuDir">
44                <RegistryValue Root="HKMU" Key="[REGISTRYKEY]\IdleShortcuts" Type="integer" Value="1" KeyPath="yes" />
45                <RemoveFolder Id="Remove_MenuDir" On="uninstall" />
46
47                <Shortcut Id="IDLE"
48                          Directory="MenuDir"
49                          Name="!(loc.ShortcutName)"
50                          Description="!(loc.ShortcutDescription)"
51                          Target="[PYTHONW_EXE]"
52                          Arguments='"[#Lib_idlelib_idle.pyw]"'
53                          Icon="idle.exe"
54                          WorkingDirectory="InstallDirectory">
55                    <Icon Id="idle.exe" SourceFile="!(bindpath.src)Lib\idlelib\Icons\idle.ico" />
56                </Shortcut>
57                <Shortcut Id="pydoc.py"
58                          Target="[PYTHON_EXE]"
59                          Arguments='-m pydoc -b'
60                          Name="!(loc.PyDocShortcutName)"
61                          Description="!(loc.PyDocShortcutDescription)"
62                          Icon="idle.exe"
63                          WorkingDirectory="InstallDirectory" />
64            </Component>
65        </Feature>
66    </Product>
67</Wix>
68