tis-jq icon

jq

Paquet d’installation silencieuse pour jq

1.7.1-1

  • package: tis-jq
  • name: jq
  • version: 1.7.1-1
  • categories: Development
  • maintainer: WAPT Team,Tranquil IT,Amel FRADJ
  • licence: opensource_free,wapt_public
  • target_os: windows
  • architecture: x64
  • signature_date:
  • size: 404.62 Ko
  • homepage : https://jqlang.github.io/jq/

package           : tis-jq
version           : 1.7.1-1
architecture      : x64
section           : base
priority          : optional
name              : jq
categories        : Development
maintainer        : WAPT Team,Tranquil IT,Amel FRADJ
description       : jqis a lightweight, flexible command-line JSON processor
depends           : 
conflicts         : 
maturity          : PROD
locale            : 
target_os         : windows
min_wapt_version  : 2.3
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : jqest un processeur JSON en ligne de commande léger et flexible
description_pl    : jqis - lekki, elastyczny procesor JSON wiersza poleceń
description_de    : jqist ein schlanker und flexibler JSON-Befehlszeilenprozessor
description_es    : jqis un procesador JSON de línea de comandos ligero y flexible
description_pt    : jqis um processador JSON de linha de comando leve e flexível
description_it    : jqis un processore JSON leggero e flessibile a riga di comando
description_nl    : jqis een lichtgewicht, flexibele commandoregel JSON-verwerker
description_ru    : jqis - легкий и гибкий процессор JSON из командной строки
audit_schedule    : 
editor            : 
keywords          : 
licence           : opensource_free,wapt_public
homepage          : https://jqlang.github.io/jq/
package_uuid      : f083b625-7efb-4f09-bcf0-4c92a8f9a045
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 450b11537fb865b912299aa81a0953b433041d1eac5cb6662c87f518c139d639
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2024-10-15T08:00:09.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         : U4ZQ0KUFFXKGNkVNMVaYhqqgPXwpumNPEhXzcNbts5VxwnA70GgQ0GYHnPFLHrC72ltA8vDU+S+ccuaCiHNBU2CfqWLc8/5AS6wJMpvAIvpVR8/+mHhA0GqIImlHYB7D6n5i29exPPw5AR88Q1T4JcSjgx5lq7WseXQVto1PCr4/Z6WfqU7BrTzonK13qumHYt4Jo9p9UpALxjuRTw2putXsYe5jpCacl0+nZ9b0YVmgg8/ys1viLIinb7M3OyxoSM947G0bbLdGs3WD8eQLvukiEzE4itHB5jei7kOmWaKb/YBjxyYnGR0WN6nfavXJdXxQ544ypcII+xXK56u19A==

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

app_name = "jq"

app_dir = makepath(programfiles, app_name)



def install():
    bin_name = glob.glob('*.exe')[0]
    app_path = makepath(app_dir, bin_name)
    # Installing software
    killalltasks(ensure_list(control.impacted_process))
    if isdir(app_dir) and force:
        remove_tree(app_dir)
    mkdirs(app_dir)
    filecopyto(bin_name, app_path)

    add_to_system_path(app_dir)



def uninstall():
    # Uninstalling software
    killalltasks(ensure_list(control.impacted_process))
    for uninstall in installed_softwares('jq'):
        uninstall_string = uninstall.get("uninstall_string", "")
        print(f"Uninstalling jq: {uninstall_string}")
        run(f"{uninstall_string} --uninstall --uninstall -s")
        wait_uninstallkey_absent(uninstall['key'],max_loop=600)
    if isdir(app_dir):
        remove_tree(app_dir)

   

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

# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls


def update_package():
    result = False
    proxies = get_proxies()

    if not proxies:
        proxies = get_proxies_from_wapt_console()
    dict_arch = {
        "x64" :"win64.exe" ,
        "x86" :"windows-i386.exe"
    }
    git_repo = "jqlang/jq"
    url_api = "https://api.github.com/repos/%s/releases/latest" % git_repo   
    # 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('.exe') and dict_arch[control.architecture] in download["browser_download_url"]:
            url_dl = download["browser_download_url"]
            version = json_load["name"].split(' ')[-1]
            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('*.exe'):
        if f != filename:
            remove_file(f)

    
    control.set_software_version(version)
    control.save_control_to_wapt()

38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
1659cc69559ab9a30f1c748d2e76d7c9b74baa92acbdb0b1f0a5096d885aebc5 : WAPT/control
450b11537fb865b912299aa81a0953b433041d1eac5cb6662c87f518c139d639 : WAPT/icon.png
7451fbbf37feffb9bf262bd97c54f0da558c63f0748e64152dd87b0a07b6d6ab : jq-win64.exe
f923ef80e21374627ce98302537a7a00dffb813a7d45b6f94e0a75ad8cd2c472 : luti.json
ff55131de8aed896a3e5380e4be9f43021e1def1743f10203e25c9e172ad7ae7 : setup.py
650a6885d622d90e67c574ae003057756cb6e5b2c71d57aba5c4ab9fb1e7a880 : update_package.py