tis-opale icon

opale

Paquet d’installation silencieuse pour opale

5.0.7-1

  • package: tis-opale
  • name: opale
  • version: 5.0.7-1
  • maintainer: Amel FRADJ
  • licence: MPL-2.0, GPL-3.0-only, LGPL-3.0-only, CECILL-2.1
  • locale: fr
  • target_os: windows
  • architecture: x64
  • signature_date:
  • size: 177.97 Mo
  • homepage : https://download.scenari.software/

package           : tis-opale
version           : 5.0.7-1
architecture      : x64
section           : base
priority          : optional
name              : opale
categories        : 
maintainer        : Amel FRADJ
description       : Opale enables you to create pedagogical documents for classroom, distance or blended training
depends           : 
conflicts         : 
maturity          : PROD
locale            : fr
target_os         : windows
min_wapt_version  : 
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : Opale permet de créer des documents pédagogiques pour la formation présentielle, à distance ou mixte
description_pl    : Opale może być używany do tworzenia dokumentów dydaktycznych do nauczania w klasie, na odległość lub w trybie mieszanym
description_de    : Opale ermöglicht die Erstellung von Unterrichtsmaterialien für Präsenz-, Fern- und Blended-Learning-Kurse
description_es    : Opale permite crear documentos didácticos para la enseñanza presencial, a distancia o semipresencial
description_pt    : O Opale pode ser utilizado para criar documentos pedagógicos para o ensino presencial, à distância ou misto
description_it    : Opale può essere utilizzato per creare documenti didattici per l'apprendimento in aula, a distanza o misto
description_nl    : Opale kan worden gebruikt om lesdocumenten te maken voor klassikaal leren, leren op afstand of blended learning
description_ru    : Opale можно использовать для создания учебных документов для аудиторного, дистанционного или смешанного обучения
audit_schedule    : 
editor            : 
keywords          : 
licence           : MPL-2.0, GPL-3.0-only, LGPL-3.0-only, CECILL-2.1
homepage          : https://download.scenari.software/
package_uuid      : 18fd1061-7914-43f6-bc13-735d92e72cd3
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 10.0
max_os_version    : 
icon_sha256sum    : 8af7c92e52b3d762613fd95757228df955329f7c9f34b5ca767e5ae791d950b2
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature         : rdEAkvMyQvlT7/yrA52QY8Enwq4GQ/UjvewBRvFR7k06mUbKCv23L7+YFjhcOvi/PndEySTpucwATq2nM8135hKD9cm7o1260ZRD3wzBQTgDOkHc4JhDmdm3inPs0qJamQ4Q1GUT8w1VPgypFIVjaaLPJdGRG4bbCQPPEaZroNUB8hhNhtDu/rl1MErjHFoYhxQPeD1NFo6xR/MxR0EPmulP47/pNbGbccD7s+5Mt2md2GmHWRSXUUH409Y1Mtr0mcCX32RYREZtws3GYJh/+sMl/pb1XabVeM5iP4vNdCxQJjNPJxROSS+PkRhsxOIpjyfuCRIo+bGlf1l3t511Sg==
signature_date    : 2024-06-05T11:01:24.394844
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 *

r"""
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()
{
   "key":"5cd4152b-2048-5a5c-a3a3-5dc9044605a8",
   "name":"Opale 5",
   "version":"5.0.7-final.202404091222",
   "install_date":"",
   "install_location":"",
   "uninstall_string":"\"C:\\Program Files\\Opale 5\\Uninstall Opale 5.exe\" /allusers",
   "publisher":"Scenari",
   "system_component":0,
   "win64":true
  }

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


def install():
    # Declaring local variables
    bin_name = glob.glob('*_win_x64.exe')[0]


    # Installing the software
    
    install_exe_if_needed(bin_name,
        silentflags='/S',
        key='5cd4152b-2048-5a5c-a3a3-5dc9044605a8',
        min_version=control.get_software_version(),
        get_version=get_version,
        timeout=600,
    )


def get_version(app_registry_dict):
    return app_registry_dict["version"].split("-")[0]
    



import urllib.parse
import os
from setuphelpers import *
from setupdevhelpers import *
import glob


def update_package():
    # Déclaration des variables locales
    package_updated = False
    proxies = get_proxies_from_wapt_console()
    if not proxies:
        proxies = get_proxies()

    lang_dict = {'en':'en-US' ,'fr':'fr-FR'}

    lang = control.locale
    url_base = "https://download.scenari.software/Opale/?productInfos"
    response = requests.get(url_base, proxies=proxies, allow_redirects=True)
    response.raise_for_status()

    # Supposons que la réponse soit un JSON contenant les informations du produit
    product_info = response.json()
    
    # Trouve la version la plus récente dans la liste 'hist'
    versions = product_info.get('hist', [])
    if not versions:
        raise ValueError("Impossible de récupérer les informations des versions.")
    
    latest_version = max(versions, key=lambda x: x['v'])['v']

    if not latest_version:
        raise ValueError("Impossible de récupérer la dernière version.")

    # Compose l'URL dynamique avec la dernière version
    url_latest_version = f"https://download.scenari.software/Opale@{latest_version}/?productInfos"    
    response = requests.get(url_latest_version, proxies=proxies, allow_redirects=True)
    response.raise_for_status()

    # Supposons que la réponse soit un JSON contenant les informations des fichiers
    product_files_info = response.json()
    
   
    # Rechercher le fichier .exe pour Windows correspondant à la langue de control.locale
    exe_file = None
    if 'ch' in product_files_info:
        for file in product_files_info['ch']:
            if isinstance(file, dict) and file['n'].endswith('.exe') and file['metas']['os'] == 'windows' and file['metas']['lang'] == lang_dict[control.locale]:
                exe_file = file['metas']['path']
                break
    else:
        raise ValueError("Le format des informations des fichiers est incorrect. Attendu: clé 'ch' dans le dictionnaire.")

    if not exe_file:
        raise ValueError(f"Impossible de trouver le fichier .exe pour Windows correspondant à la langue {control.locale}.")

    url_download = f"https://download.scenari.software{exe_file}"
    filename = exe_file.split('/')[-1]
    if not isfile(filename):
        package_updated = True
        wget(url_download, filename, proxies=proxies)
        print("Téléchargé:", filename)


    for f in glob.glob("*.exe"):
        if f != filename:
            remove_file(f)
 
    version = str(Version(get_version_from_binary(filename).split('-')[0],3))

    control.set_software_version(version)
    control.save_control_to_wapt()

    return package_updated

bce621fb216e9557786e5ed492dcc173341f9798c9136426f83e1fc93fa2d769 : setup.py
a25003ccd6b3e77942819582215808651df6b21e59f1214068ec318856e98499 : update_package.py
3c859ce097c0eab5808a38e56aeabafaaefc32156679924a36d4fba4ea50c7a6 : Opale5.0.7_fr-FR_202404091208_win_x64.exe
8af7c92e52b3d762613fd95757228df955329f7c9f34b5ca767e5ae791d950b2 : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
29bc100a76c7e5ddc171fd3294f07afd1d3ebd539881380fb41607e8ba913b48 : luti.json
186d3442454f632dfb0061f923a3fa1df6731e47bbb1086315b438ac0bbd58a5 : WAPT/control