Lors de l'utilisation de la commande register_uninstall, il n'est pas possible de définir une icône. Voici une proposition de modification du fichier setuphelpers.py
Code : Tout sélectionner
def register_uninstall(uninstallkey,uninstallstring,win64app=False,
quiet_uninstall_string='',
install_location = None, display_icon=None,display_name=None,display_version=None,publisher=''):
"""Register the uninstall method in Windows registry,
so that the application is displayed in Control Panel / Programs and features
"""
if not uninstallkey:
raise Exception('No uninstall key provided')
if not uninstallstring:
raise Exception('No uninstallstring provided')
if iswin64() and not win64app:
root = "Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall"
else:
root = "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall"
with reg_openkey_noredir(_winreg.HKEY_LOCAL_MACHINE,"%s\\%s" % (root,uninstallkey.encode(locale.getpreferredencoding())),
sam=_winreg.KEY_ALL_ACCESS,create_if_missing=True) as appkey:
reg_setvalue(appkey,'UninstallString',uninstallstring)
reg_setvalue(appkey,'InstallDate',currentdate())
if quiet_uninstall_string:
reg_setvalue(appkey,'QuietUninstallString',quiet_uninstall_string)
else:
reg_setvalue(appkey,'QuietUninstallString',uninstallstring)
if display_icon:
reg_setvalue(appkey,'DisplayIcon',display_icon)
if display_name:
reg_setvalue(appkey,'DisplayName',display_name)
if display_version:
reg_setvalue(appkey,'DisplayVersion',display_version)
if install_location:
reg_setvalue(appkey,'InstallLocation',install_location)
if publisher:
reg_setvalue(appkey,'Publisher',publisher)