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: en
  • target_os: windows
  • architecture: x64
  • signature_date:
  • size: 178.23 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            : en
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      : f6b815b0-b986-45ac-b67e-b4cb68c447b9
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         : TosTLl9ehQwsnO6jftcrNIBjXm4F+unb5Pd19mGdhTIj8GzerWpkoYOU0zDIiTghtHiG9nlbDXEVWUHXjY2PMdNAN2jBRkxaYigJqWzBjN6Fu2QXpR2nBv3sAQXD1Gw3nNSDkd8NSh1jPyUu6+YOO4WFBMucb6Ks1O24nt7DY1YsJmkt+mf7Wt7nd6h1rvc8zNOvbK/gKLUTId3XBCSQ2OZIc1eSLkXSQSUsJi4B/m/4z8HOy5JrGIg6/POk53Etl3Gd2jucRIOpO6CG26nAIdvojqX7jrzoRJgVVHJAzo9IdT0sn7qcs0gNVDhM95ouKmuHv/ao374OCnhHAAQM4Q==
signature_date    : 2024-06-05T11:00:35.700997
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'}

    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
4be254b4aa5145359bf8d430c650ba3ffedbf8e1334815ff991849f582a2ebba : update_package.py
a6ae8e05c48d13c4f0bfd4401484ad582680c3ed2a666553656fba769fbb95b5 : Opale5.0.7_en-US_202404091222_win_x64.exe
8af7c92e52b3d762613fd95757228df955329f7c9f34b5ca767e5ae791d950b2 : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
c3df9e74461298769cd322cbb36c589031f03937bffe6a2aca5b997be6d1aab3 : luti.json
da8ce4a5fbe9e29c97d520c3dbdf13a9e1d944a6716b6f5f7d0107f5be21abab : WAPT/control