
- package: tis-waptconsole-repos
- name: WAPT Console Repos
- version: 0.1.1-4
- categories: Configuration
- maintainer: WAPT Team,Tranquil IT,Jimmy PELÉ
- locale: all
- target_os: windows
- architecture: all
- signature_date:
- size: 7.23 Ko
package : tis-waptconsole-repos
version : 0.1.1-4
architecture : all
section : base
priority : optional
name : WAPT Console Repos
categories : Configuration
maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ
description : Add WAPT Console repos for Import from internet - Place your configured waptconsole.ini in package and edit repos_to_remove if needed
depends :
conflicts :
maturity : PROD
locale : all
target_os : windows
min_wapt_version : 2.0
sources :
installed_size :
impacted_process :
description_fr : Ajouter les dépôts de la console WAPT pour l'importation depuis l'internet - Placez votre waptconsole.ini configuré dans le paquet et modifiez repos_to_remove si nécessaire
description_pl : Dodaj WAPT Console repos dla importu z internetu - Umieść skonfigurowany waptconsole.ini w pakiecie i edytuj repos_to_remove jeśli to konieczne
description_de : Fügen Sie WAPT Console Repos für den Import aus dem Internet hinzu - Legen Sie Ihre konfigurierte waptconsole.ini in das Paket und bearbeiten Sie repos_to_remove, falls erforderlich
description_es : Añada los repos de la consola WAPT para importarlos desde Internet - Coloque su waptconsole.ini configurado en el paquete y edite repos_to_remove si es necesario
description_pt : Adicionar repos_to_remove WAPT Console para Importação da Internet - Coloque a sua waptconsole.ini configurada em pacote e edite repos_to_remove se necessário
description_it : Aggiungere i repository di WAPT Console per l'importazione da Internet - Inserire il file waptconsole.ini configurato nel pacchetto e modificare repos_to_remove se necessario
description_nl : WAPT Console-repos toevoegen voor import van internet - Plaats uw geconfigureerde waptconsole.ini in het pakket en bewerk repos_to_remove indien nodig
description_ru : Добавьте репо WAPT Console для импорта из интернета - Поместите настроенный waptconsole.ini в пакет и отредактируйте repos_to_remove, если необходимо
audit_schedule :
editor :
keywords :
licence :
homepage :
package_uuid : d6dedf3f-e213-4fce-9d5d-4daa15adb6bb
valid_from :
valid_until :
forced_install_on :
changelog :
min_os_version :
max_os_version :
icon_sha256sum : 7891f1ca19ac8a9e41cb2963c0833bb3424a1dcc3f89e6ae484b1841a67063b2
signer : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature : HDDOUm9QCMYd5lH7er3yi0DSTnInlmoLgn711gyrp/RGWnoE9Qthf4Vst8JHc1l4d/9jtLq/PjGIw8eGvR3yGm3VZS2JpDFSViQNHarlFi6weXJKLsFk0W8gP3g0Nd+UJsgNWWNauqeK629U5agjtqAodCX8oIuSmkvbtxaUNp+Offf/u6lCMCuiB9jctnZjtm4RN3uwTTqcJm09gdbPN1XJe54BYTCeFLBj9B3EKwbBz58/uWP1OfDGaPQVHw+VElW/s6mc7khaNX3fMG6S7iYa5fn4BYBO075BN1n7sT0+oNekBJirJUr7xDMq7iv1fgxYswiZdhm1W8ppcRKrQQ==
signature_date : 2023-06-05T20:00:12.223449
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 configparser
repos_to_remove = []
def install():
if not isdir(get_public_persistent_dir()):
mkdirs(get_public_persistent_dir())
filecopyto(r"WAPT\public_persistent\waptconsole.ini", get_public_persistent_dir())
def uninstall():
if isfile(get_public_persistent_file("waptconsole.ini")):
remove_file(get_public_persistent_file("waptconsole.ini"))
def session_setup():
user_local_waptconsole_ini = makepath(user_local_appdata, "waptconsole", "waptconsole.ini")
new_local_waptconsole_ini = get_public_persistent_file("waptconsole.ini")
mkdirs(makepath(user_local_appdata, "waptconsole"))
if not isfile(user_local_waptconsole_ini):
inifile_writestring(user_local_waptconsole_ini, "wapt-templates", "repo_url", "https://store.wapt.fr/wapt")
new_inifile = configparser.RawConfigParser()
new_inifile.read(new_local_waptconsole_ini)
user_inifile = configparser.RawConfigParser()
user_inifile.read(user_local_waptconsole_ini)
# Comparing ini files
sections_updated = False
for section in new_inifile.sections():
if section not in ["global", "waptwua"] and section not in user_inifile.sections():
print(f"[{section}] added")
sections_updated = True
if not user_inifile.has_section(section):
user_inifile.add_section(section)
user_inifile.set(section, "repo_url", new_inifile[section]["repo_url"])
for section in user_inifile.sections():
if section in repos_to_remove:
print(f"[{section}] removed")
sections_updated = True
user_inifile.remove_section(section)
if sections_updated:
print("WAPT repos updated in WAPT Console")
user_inifile.write(open(user_local_waptconsole_ini, "w"))
def get_public_persistent_dir():
"""
Get the path to the public persistent directory.
Returns:
str: Path to the public persistent directory.
"""
try:
return makepath(WAPT.wapt_base_dir, "public", "persistent")
except Exception:
try:
return makepath(installed_softwares(uninstallkey="WAPT_is1")[0]["install_location"], "public", "persistent")
except Exception:
return makepath(programfiles32, "wapt", "public", "persistent")
def get_public_persistent_file(fname):
"""
Get the path to a file in the public persistent directory.
Args:
fname (str): Filename.
Returns:
str: Path to the file in the public persistent directory.
"""
try:
return makepath(WAPT.wapt_base_dir, "public", "persistent", fname)
except Exception:
try:
return makepath(installed_softwares(uninstallkey="WAPT_is1")[0]["install_location"], "public", "persistent", fname)
except Exception:
return makepath(programfiles32, "wapt", "public", "persistent", fname)
17fb7b8efc4863dfecb24d0cb97d1b260575651fbc3c2efd0b99e31dde544357 : setup.py
7891f1ca19ac8a9e41cb2963c0833bb3424a1dcc3f89e6ae484b1841a67063b2 : WAPT/icon.png
63623def3121c75556ed283e60b32663641dfefd9cb2e019adb816c813b489c0 : WAPT/public_persistent/waptconsole.ini
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
fea312177cb6eb7e84e88c31be0f7a752508c5e2dbd40c817d5c7070a9f724bd : luti.json
f9ea2b59942770a73c6c2f10c5225e4e3c0aeda8fa7ed94e80a066a9d2b72d09 : WAPT/control