@@ -291,13 +291,14 @@ def init_ui(self):
291291 # Static tabs no longer exist - they're created dynamically by engines
292292 self .tab_pyinstaller = None
293293 self .tab_nuitka = None
294- # Lier dynamiquement les onglets des moteurs plug-and-play
295- try :
296- import Core .engines_loader as engines_loader
294+ # Lier dynamiquement les onglets des moteurs plug-and-play (only if compiler_tabs exists)
295+ if self .compiler_tabs :
296+ try :
297+ import Core .engines_loader as engines_loader
297298
298- engines_loader .registry .bind_tabs (self )
299- except Exception :
300- pass
299+ engines_loader .registry .bind_tabs (self )
300+ except Exception :
301+ pass
301302 # Widgets Nuitka (no longer static - now created dynamically by Nuitka engine)
302303 self .nuitka_onefile = None
303304 self .nuitka_standalone = None
@@ -345,7 +346,7 @@ def init_ui(self):
345346 self .btn_help .clicked .connect (self .show_help_dialog )
346347 # Find btn_show_stats widget if it exists in the UI
347348 self .btn_show_stats = self .ui .findChild (QPushButton , "btn_show_stats" )
348- if self . btn_show_stats :
349+ if getattr ( self , " btn_show_stats" , None ) :
349350 self .btn_show_stats .setToolTip (
350351 "Afficher les statistiques de compilation (temps, nombre de fichiers, mémoire)"
351352 )
@@ -355,7 +356,7 @@ def init_ui(self):
355356 # self.custom_args supprimé (widget inutilisé)
356357 # Find select_lang widget if it exists in the UI
357358 self .select_lang = self .ui .findChild (QPushButton , "select_lang" )
358- if self . select_lang :
359+ if getattr ( self , " select_lang" , None ) :
359360 self .select_lang .setToolTip ("Choisir la langue de l'interface utilisateur." )
360361 try :
361362 self .select_lang .clicked .connect (lambda : show_language_dialog (self ))
@@ -366,6 +367,8 @@ def init_ui(self):
366367 import platform
367368
368369 def update_compiler_options_enabled ():
370+ if not self .compiler_tabs :
371+ return
369372 try :
370373 import Core .engines_loader as engines_loader
371374
@@ -407,7 +410,8 @@ def set_checked_safe(widget, checked):
407410 pass
408411
409412 self .compiler_tabs .currentChanged .connect (update_compiler_options_enabled )
410- update_compiler_options_enabled ()
413+ if self .compiler_tabs :
414+ update_compiler_options_enabled ()
411415
412416 # Message d'aide contextuel à la première utilisation
413417 if not self .workspace_dir :
0 commit comments