Proposed update to setuphelpers.py file

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
perch
Messages: 18
Registration: Nov 08, 2017 - 09:28

November 22, 2017 - 09:36

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)
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

December 22, 2017 - 5:25 PM

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
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
perch
Messages: 18
Registration: Nov 08, 2017 - 09:28

December 31, 2017 - 11:08 AM

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.
Locked