Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
175 lines (152 sloc) 10.3 KB
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<?define Platform = "XXX"?>
<?define PythonVersion = "XXX"?>
<?define ProductVersion = "XXX"?>
<?define BinarySources = "XXX"?>
<?define Manufacturer = "http://www.pygtk.org/"?>
<?define ManufacturerContact = "http://www.pygtk.org/feedback.html"?>
<?define OriginalProductVersion = "2.0.0"?>
<?if $(var.Platform) = "x86"?>
<?define ProductName = "Python $(var.PythonVersion) PyGTK $(var.ProductVersion)"?>
<?define Win64 = "no"?>
<?if $(var.PythonVersion) = "2.6"?>
<?define UpgradeCode = "{67D26C03-D5BD-4549-9FEA-76F9B8171584}"?>
<?elseif $(var.PythonVersion) = "2.7"?>
<?define UpgradeCode = "{7E8DD188-EB7F-46FC-8E39-64A92D227927}"?>
<?else?>
<?error Unknown Python version specified: $(var.PythonVersion)?>
<?endif?>
<?elseif $(var.Platform) = "x64"?>
<?define ProductName = "Python $(var.PythonVersion) PyGTK $(var.ProductVersion) (64 bit)"?>
<?define Win64 = "yes"?>
<?if $(var.PythonVersion) = "2.6"?>
<?define UpgradeCode = "{65A7410A-6B75-4A97-9C3A-3450BB65615E}"?>
<?elseif $(var.PythonVersion) = "2.7"?>
<?define UpgradeCode = "{2CC0DCE7-E4BD-48E2-823E-CBFF1D92E560}"?>
<?else?>
<?error Unknown Python version specified: $(var.PythonVersion)?>
<?endif?>
<?else?>
<?error Unknown Platform specified: $(var.Platform)?>
<?endif?>
<Product Id="*"
Language="1033"
Manufacturer="$(var.Manufacturer)"
Name="$(var.ProductName)"
UpgradeCode="$(var.UpgradeCode)"
Version="$(var.ProductVersion)">
<Package Id="*"
AdminImage="no"
Comments="$(var.ProductName) Windows Installer Database"
Compressed="yes"
Description="$(var.ProductName)"
InstallerVersion="200"
Keywords="Installer,MSI,Database"
Languages="1033"
Manufacturer="$(var.Manufacturer)"
Platform="$(var.Platform)"
ReadOnly="yes" />
<Condition Message="$(var.ProductName) is only supported on Windows 2000 and above.">
<![CDATA[NOT VersionNT < 500]]>
</Condition>
<Upgrade Id="$(var.UpgradeCode)">
<UpgradeVersion Minimum="$(var.ProductVersion)"
IncludeMinimum="no"
OnlyDetect="yes"
Language="1033"
Property="DOWNGRADEFOUND" />
<UpgradeVersion Minimum="$(var.OriginalProductVersion)"
IncludeMinimum="yes"
Maximum="$(var.ProductVersion)"
IncludeMaximum="no"
Language="1033"
Property="UPGRADEFOUND" />
</Upgrade>
<Media Id="1"
Cabinet="distfiles"
CompressionLevel="high"
EmbedCab="yes" />
<?include WixUI_PyGTK.wxs?>
<UIRef Id="WixUI_PyGTK" />
<WixVariable Id="WixUIBannerBmp" Value="$(var.BinarySources)/PyGtkBanner.jpg" />
<WixVariable Id="WixUIDialogBmp" Value="$(var.BinarySources)/PyGtkDialog.jpg" />
<WixVariable Id="WixUIExclamationIco" Value="$(var.BinarySources)/PyGtkExclamationIco.ico" />
<WixVariable Id="WixUIInfoIco" Value="$(var.BinarySources)/PyGtkInfoIco.ico" />
<WixVariable Id="WixUINewIco" Value="$(var.BinarySources)/PyGtkNewIco.ico" />
<WixVariable Id="WixUIUpIco" Value="$(var.BinarySources)/PyGtkUpIco.ico" />
<Icon Id="PyGtkIcon" SourceFile="$(var.BinarySources)/PyGtkIcon.ico" />
<Property Id="ARPPRODUCTICON" Value="PyGtkIcon" />
<Property Id="PYTHON.MACHINE">
<RegistrySearch Id="PYTHON.MACHINE" Root="HKLM" Key="SOFTWARE\Python\PythonCore\$(var.PythonVersion)\InstallPath" Type="raw" />
</Property>
<Property Id="PYTHON.USER">
<RegistrySearch Id="PYTHON.USER" Root="HKCU" Key="SOFTWARE\Python\PythonCore\$(var.PythonVersion)\InstallPath" Type="raw" />
</Property>
<!-- AppSearch CustomActions -->
<CustomAction Id="AllUsersParam" Property="AllUsersParam" Value="[ALLUSERS]" Execute="oncePerProcess" />
<CustomAction Id="TargetDirParam" Property="TargetDirParam" Value="[TARGETDIR]" Execute="oncePerProcess" />
<CustomAction Id="PythonFromMachine" Property="PythonDir" Value="[PYTHON.MACHINE]" Execute="oncePerProcess" />
<CustomAction Id="InstallForEveryone" Property="ALLUSERS" Value="1" Execute="oncePerProcess" />
<CustomAction Id="PythonFromUser" Property="PythonDir" Value="[PYTHON.USER]" Execute="oncePerProcess" />
<CustomAction Id="InstallForJustMe" Property="ALLUSERS" Value="{}" Execute="oncePerProcess" />
<CustomAction Id="InitialTargetDir" Property="TARGETDIR" Value="[PythonDir]" Execute="oncePerProcess" />
<!-- LaunchCondition CustomActions -->
<CustomAction Id="PreventDowngrading" Error="A newer version of $(var.ProductName) is already installed." />
<CustomAction Id="PythonNotFound" Error="Python $(var.PythonVersion) could not be located on your system. If Python $(var.PythonVersion) has been installed for a single user account, you should execute the PyGTK All-in-one $(var.ProductVersion) installer from the same account." />
<CustomAction Id="ValidateTargetDir" Error="TARGETDIR property is not set." />
<!-- Pre InstallFinalize CustomActions
<CustomAction Id="prep_setup_pixbuf_loaders" Property="QtExecCmdLine" Execute="commit"
Value="&quot;[TARGETDIR]python.exe&quot; -c &quot;import subprocess;output=open(r'[TARGETDIR]Lib\site-packages\gtk-2.0\runtime\etc\gtk-2.0\gdk-pixbuf.loaders', 'w');subprocess.Popen(r'[TARGETDIR]Lib\site-packages\gtk-2.0\runtime\bin\gdk-pixbuf-query-loaders.exe', stdout=output);output.close()&quot;" />
<CustomAction Id="setup_pixbuf_loaders" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="commit" Return="check" />
<CustomAction Id="prep_setup_immodules" Property="QtExecCmdLine" Execute="commit"
Value="&quot;[TARGETDIR]python.exe&quot; -c &quot;import subprocess;output=open(r'[TARGETDIR]Lib\site-packages\gtk-2.0\runtime\etc\gtk-2.0\gtk.immodules', 'w');subprocess.Popen(r'[TARGETDIR]Lib\site-packages\gtk-2.0\runtime\bin\gtk-query-immodules-2.0.exe', stdout=output);output.close()&quot;" />
<CustomAction Id="setup_immodules" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="commit" Return="check" />
<CustomAction Id="prep_setup_pango_modules" Property="QtExecCmdLine" Execute="commit"
Value="&quot;[TARGETDIR]python.exe&quot; -c &quot;import subprocess;output=open(r'[TARGETDIR]Lib\site-packages\gtk-2.0\runtime\etc\pango\pango.modules', 'w');subprocess.Popen(r'[TARGETDIR]Lib\site-packages\gtk-2.0\runtime\bin\pango-querymodules.exe', stdout=output);output.close()&quot;" />
<CustomAction Id="setup_pango_modules" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="commit" Return="check" /> -->
<InstallUISequence>
<AppSearch Sequence="50" />
<Custom Action="AllUsersParam" Sequence="51">NOT Installed</Custom>
<Custom Action="TargetDirParam" Sequence="52">NOT Installed</Custom>
<Custom Action="PythonFromMachine" Sequence="53">NOT Installed AND PYTHON.MACHINE AND NOT AllUsersParam AND NOT TargetDirParam</Custom>
<Custom Action="InstallForEveryone" Sequence="54">NOT Installed AND PYTHON.MACHINE AND NOT AllUsersParam AND NOT TargetDirParam</Custom>
<Custom Action="PythonFromUser" Sequence="55">NOT Installed AND PYTHON.USER AND NOT AllUsersParam AND NOT TargetDirParam</Custom>
<Custom Action="InstallForJustMe" Sequence="56">NOT Installed AND PYTHON.USER AND NOT AllUsersParam AND NOT TargetDirParam</Custom>
<Custom Action="InitialTargetDir" Sequence="57">NOT Installed AND NOT TargetDirParam</Custom>
<LaunchConditions Sequence="100" />
<Custom Action="PreventDowngrading" Sequence="101">DOWNGRADEFOUND</Custom>
<Custom Action="PythonNotFound" Sequence="102">NOT Installed AND NOT (PYTHON.MACHINE OR PYTHON.USER) AND NOT (AllUsersParam OR TargetDirParam)</Custom>
</InstallUISequence>
<InstallExecuteSequence>
<LaunchConditions Sequence="100" />
<Custom Action="PreventDowngrading" Sequence="101">DOWNGRADEFOUND</Custom>
<Custom Action="ValidateTargetDir" Sequence="102">NOT Installed AND NOT TARGETDIR</Custom>
<RemoveExistingProducts Sequence="1401" />
<!-- <Custom Action="prep_setup_pixbuf_loaders" Before="setup_pixbuf_loaders">NOT Installed</Custom>
<Custom Action="setup_pixbuf_loaders" Before="prep_setup_immodules">NOT Installed</Custom>
<Custom Action="prep_setup_immodules" Before="setup_immodules">NOT Installed</Custom>
<Custom Action="setup_immodules" Before="prep_setup_pango_modules">NOT Installed</Custom>
<Custom Action="prep_setup_pango_modules" Before="setup_pango_modules">NOT Installed</Custom>
<Custom Action="setup_pango_modules" Before="InstallFinalize">NOT Installed</Custom> -->
</InstallExecuteSequence>
<Feature Id="PyGTKAllInOne"
Title="PyGTK All-in-one"
Description="Installs everything you need for PyGTK development except a Python $(var.PythonVersion) interpreter."
ConfigurableDirectory="TARGETDIR"
Absent="disallow"
Display="expand"
Level="1"
AllowAdvertise="no"
InstallDefault="local">
<ComponentRef Id="Empty" />
</Feature>
<Directory Id="TARGETDIR" Name="SourceDir">
<Component Id="Empty" KeyPath="yes" Guid="{2957BDC1-E807-49fb-A46D-F70834B326C4}">
<CreateFolder />
</Component>
<Directory Id="ProgramMenuFolder" />
</Directory>
</Product>
</Wix>
Something went wrong with that request. Please try again.