tis-anagene2 icon

Anagene2+

Paquet d’installation silencieuse pour Anagene2+

2024-1

package           : tis-anagene2
version           : 2024-1
architecture      : all
section           : base
priority          : optional
name              : Anagene2+
categories        : Education
maintainer        : WAPT Team,Tranquil IT,Joffrey Le Piquet,Flavien Schelfault
description       : Installation du package Anagene2 et Anagene2+
depends           : 
conflicts         : 
maturity          : PROD
locale            : 
target_os         : windows
min_wapt_version  : 2.3
sources           : https://acces.ens-lyon.fr/acces/thematiques/evolution/logiciels/anagene/telechargement-eleves-maj-2024
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          : https://acces.ens-lyon.fr/acces/thematiques/evolution/logiciels/anagene
package_uuid      : e9c3b1b6-9480-4c2c-8201-59951040a075
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 10
max_os_version    : 
icon_sha256sum    : b7e6a6fd69bc62ae7c618d3b0ed3b0d22597cb81de0fff8ed36501e1e44b82b7
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2025-06-01T11:02:45.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         : LDqfZy/5hD6tmg1j35HH34Wqvcp9+0eOe+efmZwoSdKbkmBvs76NoxxHVbI+nx4H4tV1Bmb6wdmrqEjhTlPc9ZnBrmUQRbVJXyUuPAVpIypPMuEpUOQifqWiRRvXEM4YvFyeZL+RfQ8nW7Zyr66AKT9bJnrweMLcqVCS5BxcGz1jc+5tl5+4/9rxaIpLK3qjChNh5A1NUZdgjDx/8N+WCTUkjEXoEaVOZV12TXDQKL25cdXpjcAB6HzrSwOhg4AXs/uDYcfFbwHe7DmguPsulBIgSbIA6UnelUKDUtRy5E++XWX048X1QnYm8pF4Gc7I2CYW+dGXmYGh0hRAtiwz8A==

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

uninstallkey = []

destdir = makepath(programfiles32,'Anagene2')
daopath = makepath(programfiles32,'Common Files','microsoft shared','DAO')

def install():

    zip_name_1 = "Anagene2plus.zip"
    unzip(zip_name_1,basedir, filenames='Anagene/*')
    remove_file(zip_name_1)

    zip_name_2 = "Anagene-MAJ-2024.zip"
    unzip(zip_name_2,basedir)
    remove_file(zip_name_2)

    print('Installation de Anagene 2+')
    if not isfile(makepath(daopath,'DAO350.DLL')):
        filecopyto(makepath('%s' % basedir,'Anagene','Common','Microsoft Shared','DAO','DAO350.DLL'),daopath)
    run_powershell(r'Start-Process regsvr32.exe -Wait -ArgumentList "/s `"%s\DAO350.DLL`"" -verb runAs' % daopath)

    #Vérifie si le dossier existe et le supprime
    if isdir(makepath(programfiles32,'Anagene2')):
        remove_tree(makepath(programfiles32,'Anagene2'))

    #Enlever l'ancien anagene2
    if isdir(makepath(programfiles32,'Anagene2MAJ')):
        remove_tree(makepath(programfiles32,'Anagene2MAJ'))

    bin_name = glob.glob(f'{makepath(basedir,"Anagene")}\setup.exe')[0]
    install_exe_if_needed(bin_name,silentflags="/S /v/qn",key="{6E83FF05-B414-4AA8-A782-927CB7D516EC}",min_version="")

    with disable_file_system_redirection():
        filecopyto('Anagene\System32\COMDLG32.OCX',system32())
        filecopyto('Anagene\System32\MSCOMCT2.OCX',system32())
        filecopyto('Anagene\System32\mscomctl.ocx',system32())

        register_dll(makepath(system32(),'mscomctl.ocx'))
        register_dll(makepath(system32(),'COMDLG32.OCX'))
        register_dll(makepath(system32(),'MSCOMCT2.OCX'))

    print('Installation de Anagene 2+ version 2024')
    if not isdir(destdir):
        mkdirs(destdir)

    maj_path = makepath(basedir,"Anagène-MAJ-2024")
    copytree2(maj_path,destdir,onreplace=default_overwrite)

        #On creer le chemin de travail
##        mkdirs(makepath(destdir,'sauve','classeur'))

    #create_desktop_shortcut(r'Anagene2+',target=r'%s\Anagene2\Anagene2Plus_maj_2018\anagene2.exe' %programfiles32,wDir=r'%s\Anagene2\Anagene2Plus_maj_2018\\' %programfiles32,icon=r'%s\Anagene2\Anagene2Plus_maj_2018\anagene2.exe' %programfiles32)

def uninstall():
    print('Desinstallation de Anagene 2+ version 2024')
    if isdir(destdir):
        remove_tree(makepath(programfiles32,'Anagene2'))
        run_powershell(r'Start-Process regsvr32.exe -Wait -ArgumentList "/u /s `"%s\DAO350.DLL`"" -verb runAs' % daopath)
        remove_file(makepath(programfiles32,'Common Files','microsoft shared','DAO','DAO350.DLL'))
        remove_file(makepath(programfiles32,'Common Files','microsoft shared','DAO','DAO2535.TLB'))
        #remove_desktop_shortcut('Anagene2+.lnk')

    print('Desinstallation de Anagene 2')
    # Uninstalling older version of the software that can remains
    for to_uninstall in installed_softwares(name="Anagène 2"):
        print(f"Removing: {to_uninstall['name']} ({to_uninstall['version']})")
        killalltasks(ensure_list(control.impacted_process))
        run(uninstall_cmd(to_uninstall["key"]))
        wait_uninstallkey_absent(to_uninstall["key"])


# -*- coding: utf-8 -*-
##################################################
# This file is part of WAPT Enterprise
# All right reserved, (c) Tranquil IT Systems 2023
# For more information please refer to
# https://wapt.tranquil.it/store/licences.html
##################################################
from setuphelpers import *


def update_package():

    version = "2024"

    zip_name_1 = "Anagene2plus.zip"
    download_url = "http://srvtemplates.ad.tranquil.it/binary_cache/" + zip_name_1
    sha256 = "80204E4E492EB88CF9F5E08E9E9F6266435587D3B43AFA3D35DA1AB12E794DFD"

    wget(download_url, zip_name_1, sha256=sha256)

    zip_name_2 = "Anagene-MAJ-2024.zip"
    download_url = "http://srvtemplates.ad.tranquil.it/binary_cache/" + zip_name_2
    sha256 = "488665560EB07F1E3884C6045553AF383C0EBE2C5597A87F8ED6BEC3E8683400"

    wget(download_url, zip_name_2, sha256=sha256)

    control.set_software_version(version)
    control.save_control_to_wapt()

    # Validating or not update-package-sources
    return True

488665560eb07f1e3884c6045553af383c0ebe2c5597a87f8ed6bec3e8683400 : Anagene-MAJ-2024.zip
80204e4e492eb88cf9f5e08e9e9f6266435587d3b43afa3d35da1ab12e794dfd : Anagene2plus.zip
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
126d9b18d460b976ee9f771e6bfa56eba03c24d54a2369a5c7ed946e15448510 : WAPT/control
b7e6a6fd69bc62ae7c618d3b0ed3b0d22597cb81de0fff8ed36501e1e44b82b7 : WAPT/icon.png
c08e7f12e6ef6748306e18c7ca9f91396bf08faa1bb139f9248db1ef85d06a03 : luti.json
4ff3973feb8fd5a9c9225e314421da97562fddad8a200323bccbff821a1fd792 : setup.py
068f0b54e8e3eba98520e7c29e65bc9775b97013e139e6a407591e646e6fb1ed : update_package.py