Page 1 of 1

Proposed update to setuphelpers.py file

Published: November 22, 2017 - 09:36
by perch
Good morning,


When using the register_uninstall command, it is not possible to define an icon. Here is a suggested modification to the setuphelpers.py file

Code: Select all

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)

Re: Proposed update to setuphelpers.py file

Published: Dec 22, 2017 - 5:25 PM
by dcardon
Hi Percherie,

sorry for not replying to your post sooner. I'll check with Hubert about including the code. We've been quite busy lately preparing version 1.5 (I recommend everyone try 1.5.1, you'll love it!).

Regarding contributions, we need to define an internal process. With version 1.5, we'll be releasing two versions in January 2018: WAPT Community Edition and WAPT Enterprise Edition.

WAPT 1.5 Community Edition is the successor to WAPT 1.3, which you all know and appreciate, with all its features and many improvements (much better responsiveness, a refined graphical interface, many minor bugs fixed, enhanced security, etc.).

WAPT 1.5 Enterprise Edition is based on the WAPT Community Edition code and adds features for larger deployments (role separation, better Active Directory integration, reporting, etc.) requested by our paying customers.

Since WAPT 1.5 adopts a dual licensing model [1], we need to implement a Contributor License Agreement [2]. CLAs aren't specific to Community/Enterprise software. Many FOSS projects also use CLAs to facilitate long-term project management (e.g., Apache, Python, Canonical, Django, jQuery projects, etc.).

Our team is more focused on engineering than legal expertise, so we haven't had time to implement a CLA yet (and in five years, our code contributions can be counted on one hand...). We plan to adopt the CLA from another large Community/Enterprise dual-licensing project, and we'll keep you updated.

Note: please refrain from trolling about dual licensing. I'm quite involved in several FOSS projects, but I'm not a free software purist.

Merry Christmas and Happy New Year,

Denis

[1] https://en.wikipedia.org/wiki/Multi-licensing
[2] https://en.wikipedia.org/wiki/Contribut ... _Agreement

Re: Proposed update to setuphelpers.py file

Published: Dec 31, 2017 - 11:08 AM
by perch
Thank you for your reply. As far as I'm concerned, all my contributions can be reused without any licenses or compensation from me. I'm not a lawyer, and when it comes to small contributions like what I'm currently making, I prefer to share them to help advance each of the projects that interest me.