optimisation .spec

This commit is contained in:
2026-03-26 16:07:01 +01:00
parent 563e3f1f4a
commit 29437016c9
+29 -8
View File
@@ -29,7 +29,6 @@ a = Analysis(
(str(BASE_DIR / 'ui' / 'mainwindow_vertical_pager.ui'), 'ui'),
],
hiddenimports=[
"asyncio",
"pypresence"
],
hookspath=[],
@@ -191,7 +190,7 @@ a = Analysis(
"win32service",
"win32serviceutil",
],
noarchive=False,
noarchive=True,
optimize=2,
)
@@ -239,11 +238,31 @@ unwanted_dlls = [
'Qt6Concurrent',
]
a.binaries = [
(name, path, typecode)
for name, path, typecode in a.binaries
if not any(u.lower() in name.lower() for u in unwanted_dlls)
]
new_binaries = []
for item in a.binaries:
name = item[0].lower()
# filtre 1 : tes unwanted_dlls
if any(u.lower() in name for u in unwanted_dlls):
continue
# filtre 2 : nettoyage Qt
if any(x in name for x in [
# "imageformats", # à activer seulement si sûr
# "iconengines", # à garder pour les svg dans l'app
"tls",
"printsupport",
#"opengl",
"qml",
"quick",
"webengine",
]):
continue
new_binaries.append(item)
a.binaries = new_binaries
# ------------------------------------------------------------------
# 🔥 Suppression traductions Qt (gain taille)
@@ -265,7 +284,7 @@ exe = EXE(
name='La Tanière Launcher',
debug=False,
bootloader_ignore_signals=False,
strip=False,
strip=False, # pas de strip sous windows
# 🔥 Compression max
upx=True,
@@ -279,6 +298,8 @@ exe = EXE(
"python3*.dll",
"vcruntime*.dll",
"msvcp*.dll",
"vcruntime140.dll",
"msvcp140.dll"
],
runtime_tmpdir=None,
console=False,