EDT-Clientpaket v2023 Build 0.1.0

Fragen zu WAPT-Paketen / Anfragen und Hilfe bezüglich WAPT-Paketen.
Forumregeln
Community-Forumregeln
* Englischer Support auf www.reddit.com/r/wapt
* Französischer Community-Support ist in diesem Forum verfügbar.
* Bitte kennzeichnen Sie gelöste Themen mit [GELÖST].
* Bitte bearbeiten Sie keine Themen, die mit [GELÖST] markiert sind. Erstellen Sie stattdessen ein neues Thema und verweisen Sie auf das alte.
* Geben Sie die installierte WAPT-Version, die vollständige Versionsnummer und die Build-Nummer (2.2.1.11957 / 2.2.2.12337 / usw.) sowie die Enterprise-/Discovery-Edition an.
* Versionen 1.8.2 und älter werden nicht mehr unterstützt. Fragen zu Version 1.8.2 werden nur beantwortet, wenn sie sich auf ein Upgrade auf eine unterstützte Version (2.1, 2.2 usw.) beziehen.
* Geben Sie das Server-Betriebssystem (Linux/Windows) und die Version (Debian Buster/Bullseye – CentOS 7 – Windows Server 2012/2016/2019) an.
* Geben Sie gegebenenfalls das Betriebssystem des Administrations-/Paketerstellungsrechners und des Rechners mit dem problematischen Agenten an (Windows 7/10/11/Debian 11/etc.).
* Vermeiden Sie es, mehrere Fragen in einem Thema zu stellen, da diese sonst möglicherweise ignoriert werden. Falls mehrere Themen relevant sind, erstellen Sie bitte separate Themen, vorzugsweise nacheinander und nicht gleichzeitig (d. h. vermeiden Sie Spam im Forum).
* Fügen Sie Code-Snippets, Screenshots und andere Bilder direkt in Ihren Beitrag ein. Links zu Pastebin, Bitly und anderen Drittanbieterseiten werden systematisch entfernt.
* Wie in jedem Community-Forum erfolgt die Unterstützung freiwillig durch die Mitglieder. Für kommerziellen Support kontaktieren Sie bitte den Vertrieb von Tranquil IT unter +44 2 40 97 57 55.
Gesperrt
Olaplanche
Nachrichten: 178
Anmeldung: 26. Januar 2017 - 11:11 Uhr

19. Juni 2023 - 09:48 Uhr

Guten Morgen,

Ich teile mein Paket für den edt v2023 x64-Client:

:!: Denken Sie daran, die Variablen SERVERNAME, SERVERPORT und NOMETAB durch Ihre Werte zu ersetzen
Der neue Code berücksichtigt automatisch das mögliche Vorhandensein der vorherigen Version sowie die Funktion `def update_package()`, um das Update zu vereinfachen.
Mit demselben Code ist es daher möglich, die neueste Version nahtlos parallel zur vorherigen Version zu installieren.
Um die vorherige Version zu deinstallieren, müssen Sie daher die Deinstallationsfunktion des Pakets der vorherigen Version verwenden. :!:

setup.py:

Code: Alle auswählen

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

uninstallkey = []

# Defining variables
bin_contains = 'Install_EDTclient_FR_'
app_uninstallkey = '{FEC47E39-28BC-4549-A7F3-11E27A60911A}'
edition = 'v2023.0'
SERVERNAME = 'RNE.index-education.net' # Le nom DNS du serveur pronote
SERVERPORT = '49300' # Le port TCP du serveur pronote
NOMETAB = 'MonETAB' # Utilisé pour personnaliser le nom du raccourci sur le bureau

def install():
    # Initializing variables
    package_version = control.version.split('-',1)[0]
    bin_name = glob.glob("*%s*.exe" % bin_contains)[0]
    edition_old = str(int(edition[1:5]) - 1)

    # Installing the package
    print('Installing: %s' % bin_name)
    import tempfile
    import codecs
    pathinstallfile = makepath(tempfile.gettempdir(),'Setup.iss')
    if installed_softwares ('INDEX EDUCATION - Client EDT %s - 64bit' % edition_old):
        data = r"""[InstallShield Silent]
Version=v7.00
File=Response File
[File Transfer]
OverwrittenReadOnly=NoToAll
[%s-DlgOrder]
Dlg0=%s-SdLicense2Rtf-0
Count=6
Dlg1=%s-SdAskDestPath-0
Dlg2=%s-AskOptions-0
Dlg3=%s-AskOptions-1
Dlg4=%s-AskOptions-2
Dlg5=%s-SdFinish-0
[%s-SdLicense2Rtf-0]
Result=1
[%s-SdAskDestPath-0]
szDir=C:\Program Files\Index Education\EDT %s\Réseau\Client
Result=1
[%s-AskOptions-0]
Result=1
Sel-0=0
[%s-AskOptions-1]
Result=1
Sel-0=1
Sel-1=0
Sel-2=0
Sel-3=0
[%s-AskOptions-2]
Result=1
Sel-0=0
[%s-SdFinish-0]
Result=1
bOpt1=0
bOpt2=0
""" % (app_uninstallkey,app_uninstallkey,app_uninstallkey,app_uninstallkey,app_uninstallkey,app_uninstallkey,app_uninstallkey,app_uninstallkey,app_uninstallkey,edition[1:5],app_uninstallkey,app_uninstallkey,app_uninstallkey,app_uninstallkey)
    else:
        data = r"""[InstallShield Silent]
Version=v7.00
File=Response File
[File Transfer]
OverwrittenReadOnly=NoToAll
[%s-DlgOrder]
Dlg0=%s-SdLicense2Rtf-0
Count=5
Dlg1=%s-SdAskDestPath-0
Dlg2=%s-AskOptions-0
Dlg3=%s-AskOptions-1
Dlg4=%s-SdFinish-0
[%s-SdLicense2Rtf-0]
Result=1
[%s-SdAskDestPath-0]
szDir=C:\Program Files\Index Education\EDT %s\Réseau\Client
Result=1
[%s-AskOptions-0]
Result=1
Sel-0=1
Sel-1=0
Sel-2=0
Sel-3=0
[%s-AskOptions-1]
Result=1
Sel-0=0
[%s-SdFinish-0]
Result=1
bOpt1=0
bOpt2=0
""" % (app_uninstallkey,app_uninstallkey,app_uninstallkey,app_uninstallkey,app_uninstallkey,app_uninstallkey,app_uninstallkey,app_uninstallkey,edition[1:5],app_uninstallkey,app_uninstallkey,app_uninstallkey)
    fichier = codecs.open(pathinstallfile, "w", encoding='mbcs')
    fichier.write(data)
    fichier.close()
    install_exe_if_needed(bin_name,silentflags='-s -f1%s' % pathinstallfile,key=app_uninstallkey,min_version=package_version,killbefore='Client EDT.exe')
    uninstallkey.remove(app_uninstallkey)
    # Deleting response file
    remove_file(pathinstallfile)
    # Creating desktop shortcut for all users
    create_desktop_shortcut(r'EDT%s - %s' % (edition[1:5],NOMETAB),target=u'C:\Program Files\Index Education\EDT %s\Réseau\Client\Client EDT.exe' % edition[1:5],arguments=r'-Adresse "%s" -PortTcp "%s"' % (SERVERNAME,SERVERPORT))

def audit():
    if not installed_softwares ('Mise à jour automatique'):
        print('Module de Mise à jour automatique manquant')
        return "ERROR"
    if not isfile(r'%s\InstallShield Installation Information\%s\setup.exe' % (programfiles32,app_uninstallkey)):
        print('Binaire de désinstallation manquant')
        return "WARNING"
    else:
        for soft in installed_softwares ('Mise à jour automatique'):
            print(soft['name'] + " : " + soft['version'])
        return "OK"

def update_package():
    print('Downloading/Updating package content from upstream binary sources')

    # Initializing variables
    bin_name_string = 'Install_EDTclient_FR_%s.%s_win64.exe'
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    app_name = control.name
    url = control.sources
    app_arch = control.architecture
    if app_arch == 'x64':
        dl_arch = 'win64'
    else:
        dl_arch = 'win32'

    # Getting latest version from official website
    page = wgets(control.sources,proxies=proxies)
    for line in page.splitlines() :
        if ('CLIENT %s - 0.' % edition[1:5]) in line :
            version = line.split('-')[-1].split('<')[0].replace(" ","")
            break
    latest_bin = bin_name_string % (edition[1:5],version)
    url_dl = 'https://tele3.index-education.com/telechargement/edt/%s/exe/Install_EDTclient_FR_%s.%s_%s.exe' % (edition,edition[1:5],version,dl_arch)

    print("Latest %s version is: %s" % (app_name,version))
    print("Download url is: %s" % url_dl)

    # Downloading latest binaries
    if not isfile(latest_bin):
        print('Downloading: %s' % latest_bin)
        wget(url_dl,latest_bin,proxies=proxies)

        # Checking version from file
        version_from_file = get_version_from_binary(latest_bin)
        if version != version_from_file:
            os.rename(latest_bin,bin_name_string % (edition[1:5],version_from_file))
            version = version_from_file

        # Changing version of the package
        control.version = '%s-%s'%(version,int(control.version.split('-')[-1])+1)
        control.save_control_to_wapt()
        print('Changing version to: %s in WAPT\\control' % control.version)

    # Deleting outdated binaries
    remove_outdated_binaries(version)

def uninstall():
    # Uninstalling the package
    print('Uninstalling: %s' % control.package)
    import tempfile
    pathuninstallfile = makepath(tempfile.gettempdir(),'Uninstall.iss')
    data = r"""[InstallShield Silent]
Version=v7.00
File=Response File
[File Transfer]
OverwrittenReadOnly=NoToAll
[%s-DlgOrder]
Dlg0=%s-MessageBox-0
Count=2
Dlg1=%s-SdFinishReboot-0
[%s-MessageBox-0]
Result=6
[%s-SdFinishReboot-0]
Result=1
BootOption=0
""" % (app_uninstallkey,app_uninstallkey,app_uninstallkey,app_uninstallkey,app_uninstallkey)
    fichier = open(pathuninstallfile, "w")
    fichier.write(data)
    fichier.close()
    run(r'"%s\InstallShield Installation Information\%s\setup.exe" -s -uninst -f1%s' % (programfiles32,app_uninstallkey,pathuninstallfile))
    # Deleting response file
    remove_file(pathuninstallfile)
    # Removing desktop shortcut for all users
    remove_desktop_shortcut('EDT%s - %s.lnk' % (edition[1:5],NOMETAB))
    # Uninstalling Auto Update Agent
    if uninstall_key_exists('{775E087D-A428-428C-A5FD-000010010000}'):
        run('"MsiExec.exe" /X{775E087D-A428-428C-A5FD-000010010000} /qn')
Kontrolle:

Code: Alle auswählen

architecture      : x64
sources           : https://www.index-education.com/fr/telecharger-edt.php
- Installierte WAPT-Version: 2.6.0.16795 Enterprise
- Server-Betriebssystem: Linux / Debian Bookworm
- Betriebssystem des Administrations-/Paketerstellungsrechners: Windows 10
Gesperrt