Después de intentar implementar el paquete tis-phylogene-lycee (versión 2.7.6.1-3) en varias estaciones de trabajo diferentes, estamos encontrando dificultades (bloqueo al iniciar, mensaje de error y fuga de memoria seguida de bloqueo) cuando los accesos directos en el Escritorio y el Menú Inicio no rellenan el Directorio de trabajo ("Iniciar en") con "C:\Archivos de programa (x86)\Phylogène Lycée\Programmes".
Estos errores ya no son perceptibles cuando este valor está presente.
A continuación encontrará el archivo setup.py con la corrección:
Gracias de antemano por su ayuda
JM
Código: Seleccionar todo
# -*- 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)
