tis-deepl icon

DeepL

Paquet d’installation silencieuse pour DeepL

25.11.4.19115-10
Office
Utilities
Office
Utilities

Les paquets PREPROD sont des paquets construits via LUTI. Ils restent généralement 5 jours en PREPROD, après quoi un scan VirusTotal est effectué.
Si le paquet réussit ce dernier contrôle, il est promu en PROD et publié sur le store.

  • package: tis-deepl
  • name: DeepL
  • version: 25.11.4.19115-10
  • categories: Office,Utilities
  • maintainer: WAPT Team,Tranquil IT,Jimmy PELÉ,Clément Baziret
  • editor: Deepl
  • licence: proprietary_free,wapt_public
  • locale: all
  • target_os: windows
  • impacted_process: DeepL
  • architecture: all
  • signature_date:
  • size: 296.36 Mo
  • homepage : https://www.deepl.com/
  • depends:

package           : tis-deepl
version           : 25.11.4.19115-10
architecture      : all
section           : base
priority          : optional
name              : DeepL
categories        : Office,Utilities
maintainer        : WAPT Team,Tranquil IT,Jimmy PELÉ,Clément Baziret
description       : DeepL Translator is a neural machine translation service
depends           : tis-dotnet9
conflicts         : 
maturity          : PREPROD
locale            : all
target_os         : windows
min_wapt_version  : 2.3
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            : Deepl
keywords          : deepl,translator,neural,machine,translation,service
licence           : proprietary_free,wapt_public
homepage          : https://www.deepl.com/
package_uuid      : d0665b05-2b7a-4380-b415-a4a81eb41c10
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 10.0
max_os_version    : 
icon_sha256sum    : 2cc45845a553e6f3939b26037578f62a894c89b3b5d33c12a172aaa1dd83accf
signer            : test
signer_fingerprint: b82fc8ef4a4475c0f69ac168176c2bfc58f572eb716c4eadd65e4785c155dd8e
signature_date    : 2025-12-08T09:44:37.000000
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
signature         : uW+13aej5jF7MuX3TJV6J3HKGPkBl+V6nkzk5livw3wv/OCEAb1JlAwTxCPj0/azV9ZXJjQpMmQ9UFRzOJo+4g1XHbO6I9nFl0XPMIl7r/LvQIGrX2e/yuvlbUIyDRhE0umuaGQCHHk9QwngrZ51LgDcBgnsQuTjcmwkNjkE9nvLZXrYXU6AnawP3HeWuAi9YY6QPRUkX0ruo23vRvbV4mj2fIDisJAf5dysuNG7hy+akDOA9N5DiKPpbYO4x2XYjXKsuUHF1EmxOYVjv84UaQghPz+Ih/kGbFYBy6EHEmabANW+5uDXVIdIElIqDybA9gA+8Xq/Y25nhuyZO1Tzww==

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

"""
    Usage of the DeepLSetup.exe seems to crash when there is already 0install installed.
    It tries to override the 0install directory in Program Files (C:\Program Files\Zero Install\)

    We are now doing a portable install of DeepL with the sources downloaded from 0install executable.
    This allow to avoid a lot of complication due to the usage of 0install and wrong usage of 0install by Deepl.
"""

app_name = "DeepL"
app_dir = makepath(programfiles, app_name)
app_path = makepath(app_dir, f"{app_name}.exe")
icon_path = app_path
audit_version = True

def get_installed_version(app_path):
    return get_file_properties(app_path).get("FileVersion", "")


def install():
    # Uninstalling older package version (if deepl in registry, it is old package version)
    for to_uninstall in installed_softwares(name="DeepL"):
        print("Removing: %s (%s)" % (to_uninstall["name"], to_uninstall["version"]))
        killalltasks(ensure_list(control.impacted_process))
        run(uninstall_cmd(to_uninstall["key"]))
        wait_uninstallkey_absent(to_uninstall["key"])

    # Declaring local variables
    archive_name = glob.glob(f"{app_name}.zip")[0]

    # Installing software
    killalltasks(ensure_list(control.impacted_process))
    if isdir(app_dir) and force:
        remove_tree(app_dir)
    mkdirs(app_dir)
    print("Extracting: %s to: %s" % (archive_name, app_dir))
    unzip(archive_name, programfiles)

    # Creating custom shortcuts
    create_desktop_shortcut(app_name, target=app_path)
    create_programs_menu_shortcut(app_name, target=app_path)


def audit():
    # Auditing software
    audit_status = "OK"
    installed_version = get_installed_version(app_path)
    if Version(installed_version) < Version(control.get_software_version()) and audit_version:
        print("%s is installed in version (%s) instead of (%s)" % (app_name, installed_version, control.get_software_version()))
        audit_status = "WARNING"
    elif isdir(app_dir) and not dir_is_empty(app_dir):
        print("%s (%s) is installed" % (app_name, installed_version))
        audit_status = "OK"
    else:
        print("%s is not installed" % app_name)
        audit_status = "ERROR"
    return audit_status


def uninstall():
    # Uninstalling software
    killalltasks(ensure_list(control.impacted_process))
    if isdir(app_dir):
        remove_tree(app_dir)

    # Removing shortcuts
    remove_desktop_shortcut(app_name)
    remove_programs_menu_shortcut(app_name)

# -*- coding: utf-8 -*-
from setuphelpers import *
from setupdevhelpers import *
import xml.etree.ElementTree as ET

"""
    This update package download the DeeplSetup.exe from the official website,
    extract the sources from it and create a portable version of DeepL with the sources.
"""

def get_version_from_xml(xml_file_path):
    root = ET.parse(xml_file_path)
    namespace = {"zi": "http://zero-install.sourceforge.net/2004/injector/interface"}

    stable_version = [
        (impl.get("id"), impl.get("version"))
        for impl in root.findall(".//zi:implementation", namespace)
        if impl.get("stability") == "stable"
    ]
    def get_tuple_version(version_str):
        return Version(version_str[1], 4)
    version = sorted(stable_version, key=get_tuple_version, reverse=True)[0]

    return (version[0] + ".tgz", version[1])

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

    # Deleting binaries
    if isfile(latest_bin):
        remove_file(latest_bin)
    if isdir(source_folder):
        rmtree(source_folder)

    # Downloading latest binaries
    print("Download URL is: %s" % download_url)
    if not isfile(latest_bin) or not isdir(source_folder):
        print("Downloading %s and fetching sources" % latest_bin)
        wget(download_url, latest_bin, proxies=proxies)
        # Fetch sources from exe file
        run([latest_bin, "--prepare-offline", "--verysilent"])
    else:
        print("Binary is present: %s" % latest_bin)

    # Extract from xml software version and source archive filename
    deepl_xml_file = glob.glob(makepath(os.getcwd(), source_folder, r"https%3a%2f%2fappdownload.deepl.com%2fwindows%2f0install%2fdeepl.xml"))[0]
    (deepl_archive, version) = get_version_from_xml(deepl_xml_file)
    deepl_archive = makepath(os.getcwd(), source_folder, deepl_archive)
    if not isfile(deepl_archive):
        error("Archive %s not found in content directory. Please check the 0install XML file." % deepl_archive)
    
    # Unzipping archives in content folder
    print("Creating deepl full archive with sources located in '%s'" % source_folder)
    for tgz in glob.glob(makepath(os.getcwd(), source_folder, "*.tgz")):
        print("Unzipping tar gz file: %s" % tgz)
        unzip_with_7zip(tgz, source_folder)
    # Unzipping the deepl archive
    unzipped_deepl_archive = makepath(os.getcwd(), source_folder, "deepl")
    deepl_tar_archive = glob.glob(makepath(os.getcwd(), source_folder, deepl_archive.replace(".tgz", ".tar")))[0]
    unzip_with_7zip(deepl_tar_archive, unzipped_deepl_archive)
    # Unzipping other archives in deepl folder
    for tar in glob.glob(makepath(os.getcwd(), source_folder, "*.tar")):
        if tar == deepl_archive.replace(".tgz", ".tar"):
            print("Skipping archive %s as it is the one we are updating to." % tar)
            continue
        print("Unzipping tar file: %s" % tar)
        unzip_with_7zip(tar, unzipped_deepl_archive)

    # Creating 7z archive with sources
    print("Creating archive deepl.zip")
    run([get_7z_path(), "a", "-tzip", "DeepL.zip", unzipped_deepl_archive])

    # Remove content folder
    remove_tree(source_folder)

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

    # Validating update-package-sources
    return package_updated

c025ab913b2c2e6e2b222e2fe8c30df5bd0ad7c37ada2f4463e1b1d21d2a0586 : DeepL.zip
7ebe56c94f5036c35b4b530c64e406bba59b44be03876044334307d6c04cba73 : DeepLSetup.exe
01ca7fe94636e5a08fcb73849d3b5df25d51e2c82f4dd1a08f01798b25899819 : WAPT/certificate.crt
8488cdb3427e265aafd055f080547d04848d48f3443242a6a220cd03f4847947 : WAPT/control
2cc45845a553e6f3939b26037578f62a894c89b3b5d33c12a172aaa1dd83accf : WAPT/icon.png
98c889daafccb1679d0b714f7bdbbc2a0ff48897331fdfe30bfb8484d34ffbf9 : import.cmd
4a4b3bb1a2f97e63472e55b8e4435c821b232552fabddea36e68637d69c4d3ef : luti.json
954b3d9a579172b3957d23736b30e9622ac684c282da09a92dac9b2abec0d51f : setup.py
84bed3538fa261277b01d1e9dfb7e56c467996cc27c2d7395b8ac09b02d2c298 : update_package.py