tis-ripgrep-portable icon

RipGre

Silent install package for RipGre

15.1.0-1

Preprod packages are packages built on LUTI. They remain in PREPROD usually for 5 days, after which a new VirusTotal scan is performed.
If the package passes this last check, it is promoted to PROD and published on the store.

  • package: tis-ripgrep-portable
  • name: RipGre
  • version: 15.1.0-1
  • maintainer: Administrator
  • target_os: windows
  • architecture: x64
  • signature_date:
  • size: 1.82 Mo

package           : tis-ripgrep-portable
version           : 15.1.0-1
architecture      : x64
section           : base
priority          : optional
name              : RipGre
categories        : 
maintainer        : Administrator
description       : rga is an online search tool that allows you to search for a regular expression in a multitude of file types
depends           : 
conflicts         : 
maturity          : PREPROD
locale            : 
target_os         : windows
min_wapt_version  : 
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : rga est un outil de recherche orienté ligne qui vous permet de rechercher une expression régulière dans une multitude de types de fichiers
description_pl    : rga to narzędzie do wyszukiwania online, które umożliwia wyszukiwanie wyrażeń regularnych w szerokiej gamie typów plików
description_de    : rga ist ein online-orientiertes Suchwerkzeug, mit dem Sie in einer Vielzahl von Dateitypen nach einem regulären Ausdruck suchen können
description_es    : rga es una herramienta de búsqueda en línea que le permite buscar una expresión regular en una amplia gama de tipos de archivo
description_pt    : O rga é uma ferramenta de pesquisa online que lhe permite procurar uma expressão regular numa vasta gama de tipos de ficheiros
description_it    : rga è uno strumento di ricerca online che consente di cercare un'espressione regolare in un'ampia gamma di tipi di file
description_nl    : rga is een online zoekprogramma waarmee je kunt zoeken naar een reguliere uitdrukking in een groot aantal bestandstypen
description_ru    : rga - это инструмент онлайн-поиска, позволяющий искать регулярные выражения в файлах самых разных типов
audit_schedule    : 
editor            : 
keywords          : 
licence           : 
homepage          : 
package_uuid      : f64a0978-216a-428a-8b35-513e19ea6c09
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 5005ab036c49d4d00c52cfdb72c778f1f1324c3f767f98f94ed5eda9afd5a159
signer            : test
signer_fingerprint: b82fc8ef4a4475c0f69ac168176c2bfc58f572eb716c4eadd65e4785c155dd8e
signature_date    : 2025-10-22T13:26:39.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         : PjH9LUeBTEQhmVQEkTKqaU3MSI+jjrsX/0RXbJlYxQ2pyT2R3Qj2U+2mCmT1iz1tbmVcDN+qrXVxSZ34geCXL5NhoryjkiFKrkfnIc4hbk9qMsJzg03toZd4rAdVcYHmDQUNhJQag/n4U+BtKVWwupYlC9O9mAJBkscv2jES/0PisCa2voi5V8luR7eJN3kGrHdOxdR1LRh4Q4+/MFroVwxB5Ce9Ey2UZe6IJAoYT/ffb+iHZaZI59VMDYn0vHaie4dfRXrzLutDD9OdAAUY7IGQQ2G6k/HtmnXlufrnjl0AlVB6zNaEEybVvymaAxg6diYt1cskAS7/1Zz0/Vf/5Q==

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

app_name = "ripgrep"
app_dir = makepath(programfiles, app_name)
app_path = makepath(app_dir,  "rg.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)
    
    # Find the name of the extracted directory
    unzipped_dir = makepath(unzip_dest, os.listdir(unzip_dest)[0])
    
    # Remove the old application directory if it exists
    if isdir(app_dir):
        remove_tree(app_dir)
    
    # Move the new extracted directory 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_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)

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 = "BurntSushi/ripgrep"
    dict_arch ={
        "x64":"x86_64-pc-windows-msvc",
        "x86": "-686-pc-windows-msvc"
    }
    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') and dict_arch[control.architecture] in download["browser_download_url"]:
            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
0ed5f8aa7710b69e35d7be26b8ecbc9f1016ce39d800c5ba44a7f2ae7ad31c98 : WAPT/control
5005ab036c49d4d00c52cfdb72c778f1f1324c3f767f98f94ed5eda9afd5a159 : WAPT/icon.png
3c4b4a4cebe5d5fc1bef5b81d7eaf36970a0e0ec68fe1bf579aec3e6dfc6db01 : luti.json
124510b94b6baa3380d051fdf4650eaa80a302c876d611e9dba0b2e18d87493a : ripgrep-15.1.0-x86_64-pc-windows-msvc.zip
b2cb6c87cf65f91fb23fcef43b50218eb03bca199437f13654354e586111684f : setup.py
c90e38aed919b07d3f074bd2961279543b10930b2204314ab6f7f234ad2eb734 : update_package.py