tis-ugrep-portable icon

ugrep

Paquet d’installation silencieuse pour ugrep

7.8.1-1

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

  • package: tis-ugrep-portable
  • name: ugrep
  • version: 7.8.1-1
  • maintainer: Administrator
  • target_os: windows
  • architecture: x64
  • signature_date:
  • size: 2.09 Mo

package           : tis-ugrep-portable
version           : 7.8.1-1
architecture      : x64
section           : base
priority          : optional
name              : ugrep
categories        : 
maintainer        : Administrator
description       : Ultra fast grep with interactive query UI and fuzzy search , search file systems, source code, text, binary files, archives (cpio/tar/pax/zip), compressed files (gz/Z/bz2/lzma/xz/lz4/zstd), documents and more
depends           : 
conflicts         : 
maturity          : PREPROD
locale            : 
target_os         : windows
min_wapt_version  : 
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : Grep ultra rapide avec interface interactive et recherche floue, recherche dans les systèmes de fichiers, le code source, le texte, les fichiers binaires, les archives (cpio/tar/pax/zip), les fichiers compressés (gz/Z/bz2/lzma/xz/lz4/zstd), les documents et plus encore
description_pl    : Ultraszybki grep z interaktywnym interfejsem zapytań i wyszukiwaniem rozmytym, przeszukuje systemy plików, kod źródłowy, tekst, pliki binarne, archiwa (cpio/tar/pax/zip), pliki skompresowane (gz/Z/bz2/lzma/xz/lz4/zstd), dokumenty i wiele więcej
description_de    : Ultra-schnelles grep mit interaktiver Abfrage-UI und Fuzzy-Suche, durchsucht Dateisysteme, Quellcode, Text, Binärdateien, Archive (cpio/tar/pax/zip), komprimierte Dateien (gz/Z/bz2/lzma/xz/lz4/zstd), Dokumente und mehr
description_es    : Grep ultrarrápido con interfaz de consulta interactiva y búsqueda difusa , búsqueda en sistemas de archivos, código fuente, texto, archivos binarios, archivos comprimidos (cpio/tar/pax/zip), archivos comprimidos (gz/Z/bz2/lzma/xz/lz4/zstd), documentos y mucho más
description_pt    : Grep ultrarrápido com interface de consulta interactiva e pesquisa difusa, sistemas de ficheiros de pesquisa, código fonte, texto, ficheiros binários, arquivos (cpio/tar/pax/zip), ficheiros comprimidos (gz/Z/bz2/lzma/xz/lz4/zstd), documentos e muito mais
description_it    : Grep ultraveloce con interfaccia interattiva e ricerca fuzzy, ricerca in file system, codice sorgente, testo, file binari, archivi (cpio/tar/pax/zip), file compressi (gz/Z/bz2/lzma/xz/lz4/zstd), documenti e altro ancora
description_nl    : Ultrasnelle grep met interactieve query UI en fuzzy search , doorzoek bestandssystemen, broncode, tekst, binaire bestanden, archieven (cpio/tar/pax/zip), gecomprimeerde bestanden (gz/Z/bz2/lzma/xz/lz4/zstd), documenten en meer
description_ru    : Сверхбыстрый grep с интерактивным интерфейсом запросов и нечетким поиском, поиск в файловых системах, исходном коде, тексте, бинарных файлах, архивах (cpio/tar/pax/zip), сжатых файлах (gz/Z/bz2/lzma/xz/lz4/zstd), документах и многом другом
audit_schedule    : 
editor            : 
keywords          : 
licence           : 
homepage          : 
package_uuid      : 18070279-2d92-4474-8d66-d674803dfa13
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 121e28c00db2a1785be59c2978381296707e6b42fc3ab042832373fad4c0bdc9
signer            : test
signer_fingerprint: b82fc8ef4a4475c0f69ac168176c2bfc58f572eb716c4eadd65e4785c155dd8e
signature_date    : 2026-05-03T13:30:44.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         : X07i07PuS2M/P3iSkBkd3tNAj3KgLbc75bJvt2Zv2bEMttasjtEF87IEtrRou6xgmwe+O0jCHDLIplX6KGaL9mpp3St7Je9M0YTTcEZpKRi4l3Rdsjy0I9PKL5Ydzbe+hCggj9UwtdmlSEi7DpawS269/AdG215/Y43rkAjO936jU4cbrmmVS+7V1c12wswU76PjcdifkULxzt1umC+oSEIS5S/f86tX9ipGE4Az8XA6pJ55F1pWzPkpgGqbIq32HNz63NMM1N9UzIRwIKg1HcsDGqXFktvyGdJaFNX76lipmbKl2fdQe6+PB4nin8INejIjIRMKwyNN/z0Dh/F0kA==

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

app_name = "ugrep"
app_dir = makepath(programfiles, app_name)
app_path = makepath(app_dir, "ug.exe")
audit_version = False

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

def install():
    # Find the zip file
    zip_name = glob.glob(f"{app_name}*.zip")[0]
    unzip_dest = makepath(".", "temp_dezip")
    
    # Remove the temporary directory if it already exists
    if isdir(unzip_dest):
        remove_tree(unzip_dest)
    
    # Extract the zip file
    print(f"Extracting: {zip_name} to: {unzip_dest}")
    unzip(zip_name, unzip_dest)
    
    # List the contents of the temporary directory
    extracted_files = os.listdir(unzip_dest)
    print(f"Contents of the temporary directory after extraction: {extracted_files}")
    
    # Find the name of the extracted directory or the extracted files
    if not extracted_files:
        raise Exception("No extracted files or directories found")
    
    # If the first extracted item is a directory, use that directory, otherwise use unzip_dest
    first_extracted_item = makepath(unzip_dest, extracted_files[0])
    if isdir(first_extracted_item):
        unzipped_dir = first_extracted_item
    else:
        unzipped_dir = unzip_dest
    
    # Verify that the extracted directory exists
    if not isdir(unzipped_dir):
        raise Exception(f"Invalid source directory for copytree2: {unzipped_dir}")
    
    # Remove the old application directory if it exists
    if isdir(app_dir):
        remove_tree(app_dir)
    
    # Move the new extracted directory or files to the final installation directory
    copytree2(unzipped_dir, app_dir, onreplace=default_overwrite)
    
    # Remove the temporary directory
    remove_tree(unzip_dest)
    
    # Create custom shortcuts
    create_programs_menu_shortcut(app_name, target=app_path)
    
    # Get the desktop path
    desktop_path = os.path.expanduser("~\\Desktop")
    desktop_shortcut_path = makepath(desktop_path, f"{app_name}.lnk")
    
    # Create the desktop shortcut
    print(f"Creating desktop shortcut: {desktop_shortcut_path}")
    create_shortcut(desktop_shortcut_path, target=app_path)
    
    print(f"Desktop shortcut created successfully: {desktop_shortcut_path}")

def create_shortcut(shortcut_path, target):
    try:
        create_desktop_shortcut(shortcut_path, target=target)
        return True
    except Exception as e:
        print(f"Error creating shortcut: {e}")
        return False

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
    desktop_path = os.path.expanduser("~\\Desktop")
    desktop_shortcut_path = makepath(desktop_path, f"{app_name}.lnk")
    
    if os.path.exists(desktop_shortcut_path):
        print(f"Removing desktop shortcut: {desktop_shortcut_path}")
        os.remove(desktop_shortcut_path)
    
    remove_programs_menu_shortcut(app_name)

    # Additional check
    if os.path.exists(desktop_shortcut_path):
        print(f"Failed to remove desktop shortcut: {desktop_shortcut_path}")
    else:
        print(f"Desktop shortcut removed successfully: {desktop_shortcut_path}")

from setuphelpers import *
import requests
import re
import json

def update_package():
    # Déclarer les variables locales
    result = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    git_repo = "Genivia/ugrep"
   
    url_api = f"https://api.github.com/repos/{git_repo}/releases/latest"
    
    # Getting latest version information from official sources
    print("API used is: %s" % url_api)
    json_load = json.loads(wgets(url_api, proxies=proxies))

    for download in json_load["assets"]:
        if download["browser_download_url"].endswith('.zip') :
            url_dl = download["browser_download_url"]
            version = json_load["tag_name"].replace("v","")
            filename = download["name"]
            break

    if not isfile(filename):
        package_updated = True
        wget(url_dl,filename,proxies=proxies)

    #nettoyer les fichiers temporaires
    for f in glob.glob('*.zip'):
        if f != filename:
            remove_file(f)
    
    control.set_software_version(version)
    control.save_control_to_wapt()

01ca7fe94636e5a08fcb73849d3b5df25d51e2c82f4dd1a08f01798b25899819 : WAPT/certificate.crt
c8cb6d92aa140016fb2631de68f2dcd87dc444e99d9cea81c68968f8af428c49 : WAPT/control
121e28c00db2a1785be59c2978381296707e6b42fc3ab042832373fad4c0bdc9 : WAPT/icon.png
39a949d3c012f0c07898b5d07b7647ba8a49fe1228d68f930a935b5c58cfd20a : luti.json
9d2f6cff60f16775b31cd7d5bbfbb9feeaf6bafb515475358d49dcc7eb15b9fb : setup.py
d9cba323f078522e3379708ce32e707f7539e1b7b58c69b23c4229c236632819 : ugrep-windows-x64.zip
7ea2e05d3f18af46505a5eebfb04b74f0ba72ebf7489d0285eadce7cdd3eaa92 : update_package.py