[SOLVED] Package for Winmail Opener

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
bastien30
Messages: 38
Registration: March 8, 2024 - 3:21 PM

December 16, 2024 - 10:33

Good morning,

Here is a package for the Winmail Opener software (to open winmail.dat files).

setup.py:

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *

def install():
    appver = control.get_software_version()
    appname = control.name
    install_exe_if_needed(r'winmail_opener.exe', silentflags=r'/S', key=appname, min_version=appver)
    remove_desktop_shortcut(appname)
    remove_user_desktop_shortcut(appname)

def session_setup():
    appname = control.name
    remove_user_desktop_shortcut(appname)

def update_package():
    appver = control.get_software_version()
    url_dl = control.sources
    binary = r'winmail_opener.exe'

    # Download latest binary to check version
    wget(url_dl, binary)
    latest_version = get_version_from_binary(binary)

    if Version(latest_version, 2) > Version(appver, 2):
        print(r'Latest version is %s' % latest_version)
        # Changing version of the package
        control.version = '%s-%s'%(latest_version, control.version.split('-')[-1])
        control.save_control_to_wapt()
        print('Changing version to: %s in WAPT\\control' % control.version)
    else:
        print("Already up to date")
control:

Code: Select all

package           : xxx-winmail_opener
version           : 1.7-0
architecture      : all
section           : base
priority          : optional
name              : Winmail Opener
categories        : Utilities
maintainer        : XXXX
description       : Winmail Opener is a small and simple utility that allows you to view and extract the contents of winmail.dat files sent by Outlook
depends           : 
conflicts         : 
maturity          : PROD
locale            : 
target_os         : all
min_wapt_version  : 
sources           : https://www.eolsoft.com/get/wmo
installed_size    : 
impacted_process  : 
description_fr    : 
description_pl    : 
description_de    : 
description_es    : 
description_pt    : 
description_it    : 
description_nl    : 
description_ru    : 
audit_schedule    : 
editor            : Eolsoft
keywords          : 
licence           : proprietary_free
homepage          : https://www.eolsoft.com/freeware/winmail_opener/
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://www.eolsoft.com/freeware/winmail_opener/whatsnew.htm
min_os_version    : 
max_os_version    : 
User avatar
dcardon
WAPT Expert
Messages: 1929
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

December 19, 2024 - 2:23 PM

Thank you Bastien :-)
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
Locked