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