tis-deepl icon

DeepL

Paquet d’installation silencieuse pour DeepL

4.0.6052-2

  • package: tis-deepl
  • name: DeepL
  • version: 4.0.6052-2
  • categories: Office,Utilities
  • maintainer: WAPT Team,Tranquil IT,Jimmy PELÉ
  • locale: all
  • target_os: windows
  • impacted_process: DeepL
  • architecture: all
  • signature_date:
  • size: 153.38 Mo
  • homepage : https://www.deepl.com/

package           : tis-deepl
version           : 4.0.6052-2
architecture      : all
section           : base
priority          : optional
name              : DeepL
categories        : Office,Utilities
maintainer        : WAPT Team,Tranquil IT,Jimmy PELÉ
description       : DeepL Translator is a neural machine translation service
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : windows
min_wapt_version  : 2.0
sources           : https://www.deepl.com/app/
installed_size    : 
impacted_process  : DeepL
description_fr    : DeepL est un service de traduction automatique
description_pl    : DeepL Translator to neuronowa usługa tłumaczenia maszynowego
description_de    : DeepL Translator ist ein neuronaler maschineller Übersetzungsdienst
description_es    : DeepL Translator es un servicio de traducción automática neuronal
description_pt    : DeepL O tradutor é um serviço de tradução automática neural
description_it    : DeepL Translator è un servizio di traduzione automatica neurale
description_nl    : DeepL Translator is een neurale machine vertaaldienst
description_ru    : DeepL Translator - это сервис нейронного машинного перевода
audit_schedule    : 
editor            : 
keywords          : 
licence           : 
homepage          : https://www.deepl.com/
package_uuid      : 8c60d142-1483-4683-a23c-13b5e3bf55e2
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 2cc45845a553e6f3939b26037578f62a894c89b3b5d33c12a172aaa1dd83accf
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature         : K1LrwvD8rDHo6el7QtRQTWTfE9ZzQChcz1HEmt/N2UTo0pNkWDLSJzBPPDVm4UT+j1OlmS+humq/pb8fZvO1LdpxwgaJDgiCwHJ26bO4MfkFkmYJ1+4vaFC4D0+qf0UefUVo7ClWPuQCbBu8Tuz0+s1x3n412B7pSsd6wKidVXOoI61Yygswl+yLBPMgbSAbjkMuprs9GWjj+CQYr4AS6DM/BM0tSqmdLtlgClaJ5/1RtsEGTjFbjEg/qtuP7MjEzRMM3F9DZmHQme3zJJslY+trlUgAMQ4o3+3lchHZhCDPEhPzsbf3xK+WkB2EZAp2GSwkYBYUbKhiznxpgD9ewg==
signature_date    : 2022-08-02T03:19:47.271818
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 win32con
import time

r"""
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()

"""
# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls
bin_name = "DeepLSetup.exe"
app_name = "DeepL"
app_dir = makepath(programfiles, app_name)
bin_path = makepath(app_dir, bin_name)


def install():
    # Installing the package
    mkdirs(app_dir)
    print("Copying: %s to: %s" % (bin_name, app_dir))
    filecopyto(bin_name, app_dir)


def uninstall():
    # Uninstalling the package
    killalltasks("DeepL.exe")
    time.sleep(5)
    if isdir(app_dir):
        remove_tree(app_dir)
    for f in glob.glob(r"C:\Users\*\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\DeepL.lnk"):
        remove_file(f)
    for f in glob.glob(r"C:\Users\*\Desktop\DeepL.lnk"):
        remove_file(f)
    for d in glob.glob(r"C:\Users\*\AppData\Local\DeepL*"):
        remove_tree(d)


def session_setup():
    # Declaring local variables
    package_version = control.version.split("-")[0]
    user_reg_version = ".".join(
        registry_readstring(HKEY_CURRENT_USER, r"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\DeepL", "DisplayVersion").split(".")[:4]
    )
    user_app_dir = makepath(user_local_appdata(), app_name)
    user_app_path = makepath(user_app_dir, "DeepL.exe")
    user_app_updater_path = makepath(user_app_dir, "Update.exe")

    # Determining to install the software or not based on user agreement
    if not registry_readstring(HKEY_CURRENT_USER, r"SOFTWARE\WAPT\%s" % app_name, "Install") or force:
        if params.get("install_with_luti", False):
            ask_to_install = 6
        else:
            ask_to_install = messagebox(
                "Configuring %s" % app_name, "Do you want to install %s on this user account?" % app_name, style=win32con.MB_YESNOCANCEL
            )
        if ask_to_install == 6:
            registry_setstring(HKEY_CURRENT_USER, r"SOFTWARE\WAPT\%s" % app_name, "Install", "Yes")
        elif ask_to_install == 7:
            registry_setstring(HKEY_CURRENT_USER, r"SOFTWARE\WAPT\%s" % app_name, "Install", "No")

    # Installing or Uninstalling the software in user environment
    if registry_readstring(HKEY_CURRENT_USER, r"SOFTWARE\WAPT\%s" % app_name, "Install") == "Yes":
        if Version(package_version) > Version(user_reg_version) or user_reg_version == "":
            print("Installing: %s (%s) in user environment" % (bin_name, package_version))
            install_exe_if_needed(bin_path, silentflags="-s", min_version=package_version)
    elif registry_readstring(HKEY_CURRENT_USER, r"SOFTWARE\WAPT\%s" % app_name, "Install") == "No":
        if isfile(user_app_updater_path):
            killalltasks(control.get_impacted_process_list())
            run('"%s" %s' % (user_app_updater_path, "--uninstall -s"), accept_returncodes=[0, 3010])  # , 4294967295
            if isdir(user_app_dir):
                time.sleep(30)  # Waiting since uninstall may still running
                remove_tree(user_app_dir)
        registry_delete(HKEY_CURRENT_USER, r"SOFTWARE\WAPT\%s" % app_name, "DisableAutorunOnce")

    # Disabling app autorun
    if not reg_value_exists(HKEY_CURRENT_USER, r"SOFTWARE\WAPT\%s" % app_name, "DisableAutorunOnce"):
        time.sleep(20)  # Waiting since install may still running
        registry_delete(HKEY_CURRENT_USER, r"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", app_name)
        registry_setstring(HKEY_CURRENT_USER, r"SOFTWARE\WAPT\%s" % app_name, "DisableAutorunOnce", "Done")

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


def update_package():
    # Declaring local variables
    result = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    download_url = "https://appdownload.deepl.com/windows/full/DeepLSetup.exe"
    latest_bin = download_url.split("/")[-1]

    # Downloading latest binaries
    if not isfile(latest_bin):
        print("Downloading: %s" % latest_bin)
        wget(download_url, latest_bin, proxies=proxies)

    # Checking version from file
    version = get_version_from_binary(latest_bin)

    # Changing version of the package
    if Version(version) > Version(control.get_software_version()):
        print("Software version updated (from: %s to: %s)" % (control.get_software_version(), Version(version)))
        result = True
    else:
        print("Software version up-to-date (%s)" % Version(version))
    control.version = "%s-%s" % (Version(version), control.version.split("-", 1)[-1])
    # control.set_software_version(version)
    control.save_control_to_wapt()

    # Deleting outdated binaries
    remove_outdated_binaries(version)

    # Validating update-package-sources
    return result

c96d27d391ddff748b4192777b45acb28eeeb470bbb4804ccbf7fa3a6af0c345 : setup.py
cd083583d5dd66c77355b526f9e50d92d9b4c8794b4b11c25d11d65fe15672ae : DeepLSetup.exe
5bbb4f8b6e9d05cf419421c4351b1cf9cd531aea9bc92a9fc01624546c6725f5 : update_package.py
2cc45845a553e6f3939b26037578f62a894c89b3b5d33c12a172aaa1dd83accf : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
774514a30bc6e50ac01f34a427f62f20d35f46197c750a3d2d083beb45b6c878 : luti.json
6f5deb04c7a0ce5f9e53ac0a1c8e1eff31921b03f8a49bd233f18f4691eea394 : WAPT/control