[SOLVED] Correction for the Phylogène Lycée package (2.7.6.1-3)

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
jmarcot
Messages: 2
Registration: June 29, 2026 - 3:06 PM

June 29, 2026 - 3:20 PM

Good morning,

After attempting to deploy the tis-phylogene-lycee package (version 2.7.6.1-3) on several different workstations, we are encountering difficulties (crash on launch, error message and memory leak then crash) when the shortcuts on the Desktop and Start Menu do not populate the Working Directory ("Start in") with "C:\Program Files (x86)\Phylogène Lycée\Programmes".

These bugs are no longer noticeable when this value is present.

Please find the setup.py file with the fix below:

Thank you in advance for your help
JM

Code: Select all

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


app_name = "Phylogène Lycée"
app_dir = makepath(programfiles32, app_name)
work_path = makepath(app_dir, "Programmes")
app_path = makepath(work_path, "Phylo.exe")
icon_path = app_path
audit_version = False


def get_installed_version(app_path):
    return get_file_properties(app_path).get("FileVersion", "")


def install():
    # Declaring local variables
    zip_name = glob.glob(f"Phylogene-Lycee-2021.zip")[0]
    unzip_dest = "."
    unzipped_dir = "Phylogène-Lycée-2021"

    # Removing old portable app
    old_app_dir = makepath(programfiles32, "Phylogene-lycée")
    if isdir(old_app_dir) and app_dir != old_app_dir:
        remove_tree(old_app_dir)
    unregister_uninstall(app_name)

    # Installing software
    killalltasks(ensure_list(control.impacted_process))
    if isdir(app_dir) and force:
        remove_tree(app_dir)
    mkdirs(app_dir)
    print("Extracting: %s to: %s" % (zip_name, app_dir))
    unzip(zip_name, unzip_dest)
    copytree2(unzipped_dir, app_dir, onreplace=default_overwrite)

    # Creating custom shortcuts
    create_desktop_shortcut(app_name, target=app_path, wDir=work_path)
    create_programs_menu_shortcut(app_name, target=app_path, wDir=work_path)


def audit():
    # Auditing software
    audit_status = "OK"
    installed_version = get_installed_version(app_path)
    if Version(installed_version) < Version(control.get_software_version()) and audit_version:
        print("%s is installed in version (%s) instead of (%s)" % (app_name, installed_version, control.get_software_version()))
        audit_status = "WARNING"
    elif isdir(app_dir) and not dir_is_empty(app_dir):
        print("%s (%s) is installed" % (app_name, installed_version))
        audit_status = "OK"
    else:
        print("%s is not installed" % app_name)
        audit_status = "ERROR"
    return audit_status


def uninstall():
    # Uninstalling software
    killalltasks(ensure_list(control.impacted_process))
    if isdir(app_dir):
        remove_tree(app_dir)

    # Removing shortcuts
    remove_desktop_shortcut(app_name)
    remove_programs_menu_shortcut(app_name)
kcherel
Messages: 10
Registration: January 12, 2026 - 10:01

June 29, 2026 - 4:18 PM

Hi jmarcot,

Thank you so much for your feedback!
I'll look into your suggestion and make the change in the store.
The fact that the "Working Directory" isn't clearly defined can cause this kind of problem.

The new package will be available in production within 5 days.
Have a good day,
Kevin.
Locked