tis-cleanup-unins icon

tis-cleanup-unins

Paquet d’installation silencieuse pour tis-cleanup-unins

1.0-4

  • package: tis-cleanup-unins
  • version: 1.0-4
  • categories: tools
  • maintainer: Alexandre Gauvrit
  • editor: Tranquil IT
  • locale: all
  • target_os: windows
  • architecture: all
  • signature_date:
  • size: 7.67 Ko
  • installed_size: 5.00 Ko

package           : tis-cleanup-unins
version           : 1.0-4
architecture      : all
section           : base
priority          : optional
name              : 
categories        : tools
maintainer        : Alexandre Gauvrit
description       : Nettoyage unins00X residuels dans WAPT
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : windows
min_wapt_version  : 2.0
sources           : 
installed_size    : 5000
impacted_process  : 
description_fr    : Nettoyage unins00X residuels dans WAPT
description_pl    : 
description_de    : 
description_es    : 
description_pt    : 
description_it    : 
description_nl    : 
description_ru    : 
audit_schedule    : 1d
editor            : Tranquil IT
keywords          : 
licence           : 
homepage          : 
package_uuid      : f91b94c5-b0af-47e0-9a19-f4110a565617
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 6.1
max_os_version    : 
icon_sha256sum    : 2ce83d28ac37b9f48d710a0ffb6ab9c6063e6f8aa28325b15e9a65fc08163cea
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature         : S6lY1kyitV5fQyAvZsaJ3zTMYEje9bLVZ65n2mw9Sj+s3DtFvI25M3uzuMLykB0bAzkJzPWRAObOM8jjqOdyjsVDnrBOgXtRi9MsybSlw5BrjE0DaiU4DMGtGQhdxNg2QqOjCawgVu/y9XuMUrSrKTV1v65ev58RnxLnCAV7jycEZt6ZAjUDP/+K3VTmFSaYgu+2oHdbupgRbEKvHPD6gjvyjmUljbPna74EAA05Z5ZApHeq1PT+cHLZSgzAy55xxVL+IPBTBjbwZCx1PAE/JNM8CNybrcUn56Zyrwe1zuMVQwK950eGkzvc91lpDQ919latKQabzWRlU4No4sXPiQ==
signature_date    : 2022-07-31T04:34:39.316722
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes

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

def install():
    print("installing %s" % control.asrequirement())
    clean_uninst()


def audit():
    test_vers = clean_uninst()
    if test_vers[0] != "000":
        return "ERROR"
    else:
        return "OK"


def clean_uninst():
    print("Nettoyage unins00X.exe/unins00X.dat")
    list_ex = ["unins000.dat", "unins000.exe"]
    pattern = re.compile("[0-9]+(?=\.[^.]*$)")

    unins_exe = makepath(install_location("WAPT_is1"), "unins000.exe")
    unins_dat = makepath(install_location("WAPT_is1"), "unins000.dat")
    wapt_unins = makepath(install_location("WAPT_is1"), "unins*.*")

    all_unins = []
    for item in glob.glob(wapt_unins):
        all_unins.append(item.split("\\")[-1])

    bestvers = pattern.findall("".join(sorted(all_unins)))

    print("La version maximum est : {}".format(bestvers[0]))

    if bestvers[0] != "000":
        print(r"Restauration en unins000.exe et unins000.dat de la dernière version")
        try:
            filecopyto(makepath(install_location("WAPT_is1"), "unins{}.exe".format(bestvers[0])), unins_exe)
            filecopyto(makepath(install_location("WAPT_is1"), "unins{}.dat".format(bestvers[0])), unins_dat)
        except:
            pass

    for item_path in all_unins:
        if item_path in list_ex:
            continue
        try:
            print("Suppression de : {}".format(makepath(install_location("WAPT_is1"), item_path)))
            remove_file(makepath(install_location("WAPT_is1"), item_path))
        except:
            pass

    return bestvers




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

def update_package():
    pe = PackageEntry()
    pe.load_control_from_wapt(os.getcwd())
    current_version = pe["version"].split("-", 1)[0]
    minor_version = pe["version"].split("-", 1)[1]
    pe.version = current_version + "-" + str(int(minor_version) + 1)
    pe.save_control_to_wapt(os.getcwd())

698ba2c109a95eaa3ad31878eb842d6aa6fb45bfee48a17ffafb3e1fe5ab9b7b : setup.py
62ad080647320e9f3a3b80cbd527919564a7b71e0e88998f039fd4322aab7d32 : update_package.py
2ce83d28ac37b9f48d710a0ffb6ab9c6063e6f8aa28325b15e9a65fc08163cea : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
00d72a86f99662d6ea7ec47b36504b2f5a7eb23f4293910d75d1da8c924916ad : luti.json
afa94c35b62e6678c9e188474ed272a34e9700adf6aa3b0b26a1eb80b6fd8db8 : WAPT/control