tis-charlemagne-viescolaire icon

Charlemagne Vie Scolaire

Paquet d’installation silencieuse pour Charlemagne Vie Scolaire

12.1.0.0-7

  • package: tis-charlemagne-viescolaire
  • name: Charlemagne Vie Scolaire
  • version: 12.1.0.0-7
  • categories: Education
  • maintainer: WAPT Team,Tranquil IT, Flavien Schelfaut
  • editor: Aplim
  • locale: all
  • target_os: windows
  • impacted_process: VieScolaire.exe
  • architecture: all
  • signature_date:
  • size: 54.00 Mo
  • homepage : https://www.aplim.fr
  • depends:

package           : tis-charlemagne-viescolaire
version           : 12.1.0.0-7
architecture      : all
section           : base
priority          : optional
name              : Charlemagne Vie Scolaire
categories        : Education
maintainer        : WAPT Team,Tranquil IT, Flavien Schelfaut
description       : Charlemagne VieScolaire
depends           : tis-charlemagne-outils
conflicts         : 
maturity          : PROD
locale            : all
target_os         : windows
min_wapt_version  : 2.1
sources           : https://api.ecoledirecte.com/v3/c/0/download/majcharlemagne.awp?verbe=get&chemin=MiseAJour\V2\&fichier=wVieScolaire.exe
installed_size    : 
impacted_process  : VieScolaire.exe
description_fr    : 
description_pl    : 
description_de    : 
description_es    : 
description_pt    : 
description_it    : 
description_nl    : 
description_ru    : 
audit_schedule    : 
editor            : Aplim
keywords          : 
licence           : 
homepage          : https://www.aplim.fr
package_uuid      : 0fd85571-28e4-4f2e-9ea7-d02787d55701
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 10.0
max_os_version    : 
icon_sha256sum    : 1cda6ba35e0ed632200ff6e08a00ef85a16d9f5a4a62d2667784f2bf817fae9e
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2025-09-06T02:03:59.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         : iu0qDBSZbbnUOlq2/6PzDKf1pJYafdRVNaKfKkUpQAqrk9Jzpy32w7ptiL0WXaML64EsTc6sAOCb60EmgHaYW4JlFRRjUE/t3Inhr7XDcio0SgC1hsN918BJoW5Pbk2wF6HXlA5E8Op05GuUjb+4Q8F5OJXihBys6nJIdBO2M27U91j/Jkm5lw90BsUpDPhAD0IYclkzSzm2MG8IrrzzOsv7ZzCSZGglRgi2o+aR9n+zwFOQS8KcqkvceIXxBI65SC6f3ZQoL3VaE6g+EB/rtE++8Cbct91ufgM7gv3m8NhIcq8tKZgQlJr5whosxdOBSgdOJrAu4D4R2SnN3sGBcw==

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

# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls
bin_name = "charlemagne_viescolaire.exe"
silent_args = "/S"
desktop_shortcut_name = 'Charlemagne Vie Scolaire'
path_folder = makepath(programfiles32(),'alcuin')
bin_exe = makepath(path_folder, 'VieScolaire.exe') # Edit here the name of the executable

def install():
    
    # Initializing variables
    package_version = control.version.split("-")[0]

    # Installing the package
    print(f"Installing: {bin_name}")
    if force or not isfile(bin_exe) or Version(get_version_from_binary(bin_exe)) < Version(package_version):
        killalltasks(control.impacted_process)
        run(f"{makepath(basedir, bin_name)} {silent_args}")

    if not isfile(bin_exe): 
        error('error %s not found' % bin_exe) 

    bin_version = get_version_from_binary(bin_exe)
    if Version(bin_version) < Version(package_version):
        error('Version file for %s is %s' % (bin_exe,bin_version))
    
    remove_desktop_shortcut(desktop_shortcut_name)

def uninstall():
    remove_desktop_shortcut(desktop_shortcut_name)
    remove_file(bin_exe)

def audit():
    
    if not isfile(bin_exe):
        print(f"The executable can't be found here : {bin_exe}")
        return "ERROR"

    bin_version = get_version_from_binary(bin_exe)
    package_version = control.version.split("-")[0]

    if Version(bin_version) < Version(package_version):
        print('Version file for %s is %s' % (bin_exe,bin_version))
        return "ERROR"        

    if Version(bin_version) > Version(package_version):
        print('Version file for %s is %s' % (bin_exe,bin_version))
        return "WARNING"

    print("The installation has been done correctly")
    return "OK"

# -*- coding: UTF-8 -*-
from setuphelpers import *
from setupdevhelpers import *
import waptlicences

targeted_text = "wVieScolaire"
latest_bin = "charlemagne_viescolaire.exe"

api_version_url = "https://apic.ecoledirecte.com/v3/c/maj/versions.awp?verbe=get&mc=Outils"
api_download_url = f"https://api.ecoledirecte.com/v3/c/0/download/majcharlemagne.awp?verbe=get&chemin=MiseAJour/V2/&fichier={targeted_text}.exe"
user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36"

def update_package():
    # Declaring local variables
    package_updated = False
    proxies = get_proxies_from_wapt_console()
    if not proxies:
        proxies = get_proxies()

    app_name = control.name

    version = wgets(api_version_url, user_agent=user_agent, proxies=proxies, as_json=True)['data'][targeted_text]

    print(f"Latest {app_name} version is: {version}")
    print(f"Download url is: {api_download_url}")

    for f in glob.glob('*.exe'):
        if Version(get_version_from_binary(f)) < Version(version):
            remove_file(f)

    if not isfile(latest_bin):
        print(f"Downloading: {latest_bin}")
        package_updated = True
        wget(api_download_url, latest_bin, proxies=proxies)
    else:
        print(f"Binary is present: {latest_bin}")

    expected_issuer = 'Aplim'
    sign_name = waptlicences.check_exe_signing_certificate(latest_bin)[0]
    if sign_name != expected_issuer:
        error(f'Bad issuer {sign_name} != {expected_issuer} ')

    # Changing version of the package
    if Version(version) > Version(control.get_software_version()):
        print(f"Software version updated (from: {control.get_software_version()} to: {version})")
        package_updated = True
    else:
        print(f"Software version up-to-date ({version})")
        
    control.set_software_version(get_version_from_binary(latest_bin))
    control.save_control_to_wapt()

    return package_updated

38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
2726e0c32140c61be1bbe7effd364bff4309ccecdf04778700841fa5fef29580 : WAPT/control
1cda6ba35e0ed632200ff6e08a00ef85a16d9f5a4a62d2667784f2bf817fae9e : WAPT/icon.png
01165c471eec3495ab680e87c4cafddb9cc2e0002aee2578bd077e36b09d559a : charlemagne_viescolaire.exe
cfee29b125b72c4ea2e36e50495335fdd6c4266dc3087a322682aa99c81499b3 : luti.json
6041daefb9facbe9ccf4463f3548baccce9d54c5e3f29bdaf301a86a6cab9430 : setup.py
7a29948ce7ae8cbbf6d2b172d0d4421e271392641f2c6e7b462f04bbdd09bc6e : update_package.py