
Emacs
Paquet d’installation silencieuse pour Emacs
29.4-1
- package: tis-emacs-portable
- name: Emacs
- version: 29.4-1
- maintainer: Amel FRADJ
- licence: Appendix A GNU GENERAL PUBLIC LICENSE
- target_os: windows
- architecture: x64
- signature_date:
- size: 81.88 Mo
- homepage : https://www.gnu.org/software/emacs/
package : tis-emacs-portable
version : 29.4-1
architecture : x64
section : base
priority : optional
name : Emacs
categories :
maintainer : Amel FRADJ
description : Text editor and development environment
depends :
conflicts :
maturity : PROD
locale :
target_os : windows
min_wapt_version :
sources : https://mirror.cyberbits.eu/gnu/emacs/windows/
installed_size :
impacted_process :
description_fr : Éditeur de textes et environnement de développement
description_pl : Edytor tekstu i środowisko programistyczne
description_de : Texteditor und Entwicklungsumgebung
description_es : Editor de texto y entorno de desarrollo
description_pt : Editor de texto e ambiente de desenvolvimento
description_it : Editor di testo e ambiente di sviluppo
description_nl : Teksteditor en ontwikkelomgeving
description_ru : Текстовый редактор и среда разработки
audit_schedule :
editor :
keywords :
licence : Appendix A GNU GENERAL PUBLIC LICENSE
homepage : https://www.gnu.org/software/emacs/
package_uuid : 70629146-401a-4b6c-a982-93a8071e31cd
valid_from :
valid_until :
forced_install_on :
changelog :
min_os_version :
max_os_version :
icon_sha256sum : b410f985f597b26aaa1036b1f579ce1a765c1d8a9efd34f94a5045329bf74c92
signer : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature : HFm44Uig++im9t9alF1dXtBOoXWJ+cGAXvQYMShUl3FsVr5DTYn9iqXtD7yi05JRTCYZrC/s3flttn3zF7MSwuJHzH8loKcaJqWjc2COupOE7x3PKucRE0jlgkddECII1eDX2sYssSZ6m6Ozd/W4xQpBGlmMyFCt30RF+NMLgAuRechhLlzhAQQLv2cPAN7Q73HmrmtcKpNVEj/J8n0La1SKYQOKjgZ5AEswwNtyHBV7tU0ESFlMUKuzKVCEd6tSSBM5Psx1FIey4h4XIpecJ77JjryySklMahDXeAQH2VypbD2rhAw/myO2O1oUa4Mawc1z7uf/QXgokVyrgb5eAw==
signature_date : 2024-07-13T08:00:09.602454
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
# -*- coding: utf-8 -*-
from setuphelpers import *
import glob
import os
app_name = "emacs"
app_dir = makepath(programfiles, app_name)
def find_installed_path():
# Recherche de l'emplacement de l'application installée
for dirpath, dirnames, filenames in os.walk(app_dir):
for filename in filenames:
if filename == "runemacs.exe":
return dirpath
return None
def install():
bin_name = glob.glob('*.exe')[0]
app_path = makepath(app_dir, bin_name)
# Installing software
killalltasks(ensure_list(control.impacted_process))
if isdir(app_dir) and force:
remove_tree(app_dir)
mkdirs(app_dir)
filecopyto(bin_name, app_path)
# Running the silent installation
run(f'"{app_path}" /S')
# Creating shortcuts
installed_path = find_installed_path()
if installed_path:
create_desktop_shortcut(app_name, target=makepath(installed_path, "runemacs.exe"))
create_programs_menu_shortcut(app_name, target=makepath(installed_path, "runemacs.exe"))
else:
print("Erreur: Impossible de trouver l'emplacement de l'application installée.")
def uninstall():
# Uninstalling software
killalltasks(ensure_list(control.impacted_process))
for uninstall in installed_softwares('emacs'):
uninstall_string = uninstall.get("uninstall_string", "")
print(f"Uninstalling emacs: {uninstall_string}")
run(f"{uninstall_string} --uninstall --uninstall -s")
wait_uninstallkey_absent(uninstall['key'],max_loop=600)
if isdir(app_dir):
remove_tree(app_dir)
# Removing shortcuts
remove_desktop_shortcut(app_name)
remove_programs_menu_shortcut(app_name)
from setuphelpers import *
from setupdevhelpers import *
import re
import requests
def update_package():
# Déclaration des variables locales
package_updated = False
proxies = get_proxies()
if not proxies:
proxies = get_proxies_from_wapt_console()
# Obtenir la dernière version à partir des sources officielles
re_versions = re.compile(r'<a href="emacs-([\d\.]+)/">')
re_installers = re.compile(r'<a href="(emacs-[\d\.]+-installer\.exe)">')
base_url = "https://mirror.cyberbits.eu/gnu/emacs/windows/"
index = wgets(base_url, proxies=proxies)
# Trouver la dernière version d'Emacs
version = None
latest_bin = None
for versionemacs in sorted(re_versions.findall(index), key=lambda p: Version(p), reverse=True):
version_url = f"{base_url}emacs-{versionemacs}/"
version_index = wgets(version_url, proxies=proxies)
# Trouver le dernier installateur dans le répertoire de la version
install_files = re_installers.findall(version_index)
if install_files:
latest_bin = max(install_files, key=lambda p: Version(re.search(r"emacs-(\d+\.\d+)", p).group(1)))
download_url = f"{version_url}{latest_bin}"
# Vérifier si l'URL de téléchargement est valide
if requests.head(download_url, proxies=proxies).status_code != 404:
version = download_url.split("-")[-2]
break
if not version or not latest_bin:
raise ValueError("Impossible de trouver la dernière version ou l'installateur.")
print(f"Dernière version trouvée : emacs-{version}")
print(f"URL de téléchargement de l'installateur : {download_url}")
# Supprimer les anciens fichiers installateurs
for f in glob.glob("*.exe"):
if f != latest_bin:
remove_file(f)
# Télécharger le dernier installateur
wget(download_url, latest_bin, proxies=proxies)
# Mettre à jour la version du logiciel dans le fichier de contrôle
control.set_software_version(version)
control.save_control_to_wapt()
b91dc04bb951a9e6ac1aee6c0db571e8ff56358b1bf68930582caabdf0bcc425 : setup.py
fbcc122978d412a0d6e799ab9239833c250a96b0a06a57d06636386e29c78e4b : emacs-29.4-installer.exe
4b19e391b4b1cce22feb7338aa20dcb626a41fd07a5cc58c06d12e80a81ecca8 : update_package.py
b410f985f597b26aaa1036b1f579ce1a765c1d8a9efd34f94a5045329bf74c92 : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
85f43514200afef1e49eeeb8c5a292f4b8eab966daaaf524d1c408ba19371a1d : luti.json
4318b3dc93bdf1fd61d85024f7d806defadc982fd4c5dd3d8b2546e007e1babc : WAPT/control