From 29437016c90854275b4cb72defb577c1a2639d3e Mon Sep 17 00:00:00 2001 From: Xarkam Date: Thu, 26 Mar 2026 16:07:01 +0100 Subject: [PATCH] optimisation .spec --- La Tanière Launcher.spec | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/La Tanière Launcher.spec b/La Tanière Launcher.spec index 789382d..530b814 100644 --- a/La Tanière Launcher.spec +++ b/La Tanière Launcher.spec @@ -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,