Skip to content

Commit 34a9898

Browse files
author
PyCompiler ARK++ Team
committed
feat: ACASL sortie moteur + exécutions non bloquantes; get_output_directory moteurs; docs/i18n; .gitignore; sysdep async
1 parent 8f139db commit 34a9898

7 files changed

Lines changed: 715 additions & 893 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ venv/
109109
ENV/
110110
env.bak/
111111
venv.bak/
112+
.qodo
112113

113114
# Spyder project settings
114115
.spyderproject

ENGINES/cx_freeze/engine.py

Lines changed: 50 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -253,13 +253,13 @@ def _tr(fr, en):
253253
pass
254254
return False
255255
try:
256-
gui.log.append("⏳ Installation des dépendances système… (attente de fin)")
257-
except Exception:
258-
pass
259-
try:
260-
proc.waitForFinished(-1)
256+
gui.log.append(
257+
"⏳ Installation des dépendances système en arrière‑plan… Relancez la compilation après l'installation."
258+
)
261259
except Exception:
262260
pass
261+
# Ne pas bloquer l'UI; arrêter le préflight et relancer plus tard
262+
return False
263263
elif os_name == "Windows":
264264
sdm = SysDependencyManager(parent_widget=gui)
265265
pkgs = [
@@ -273,16 +273,14 @@ def _tr(fr, en):
273273
try:
274274
gui.log.append(
275275
_tr(
276-
"⏳ Installation des dépendances Windows… (attente de fin)",
277-
"⏳ Installing Windows dependencies… (waiting to finish)",
276+
"⏳ Installation des dépendances Windows en arrière‑plan… Relancez la compilation après l'installation.",
277+
"⏳ Installing Windows dependencies in background… Relaunch the build after installation.",
278278
)
279279
)
280280
except Exception:
281281
pass
282-
try:
283-
p.waitForFinished(-1)
284-
except Exception:
285-
pass
282+
# Ne pas bloquer l'UI; arrêter le préflight et relancer plus tard
283+
return False
286284
if p is None:
287285
import webbrowser
288286

@@ -568,6 +566,47 @@ def program_and_args(self, gui, file: str) -> Optional[tuple[str, list[str]]]:
568566
except Exception:
569567
return None
570568

569+
def get_output_directory(self, gui) -> Optional[str]:
570+
"""Return the cx_Freeze output directory for ACASL.
571+
ACASL-only method: engines define their output directory but never open it themselves.
572+
"""
573+
try:
574+
# Try engine-specific output field first (cx_output_dir objectName)
575+
try:
576+
from PySide6.QtWidgets import QWidget
577+
578+
if hasattr(gui, "findChild") and callable(gui.findChild):
579+
le = gui.findChild(QWidget, "cx_output_dir")
580+
if le and hasattr(le, "text") and callable(le.text):
581+
v = str(le.text()).strip()
582+
if v:
583+
return v
584+
except Exception:
585+
pass
586+
587+
# Try engine tab field if present
588+
try:
589+
if getattr(self, "_output_dir_input", None) is not None:
590+
v = self._output_dir_input.text().strip()
591+
if v:
592+
return v
593+
except Exception:
594+
pass
595+
596+
# Fallback to global output_dir_input
597+
w = getattr(gui, "output_dir_input", None)
598+
if w and hasattr(w, "text") and callable(w.text):
599+
v = str(w.text()).strip()
600+
if v:
601+
return v
602+
603+
# Final fallback to workspace/dist
604+
ws = getattr(gui, "workspace_dir", None) or os.getcwd()
605+
return os.path.join(ws, "dist")
606+
except Exception:
607+
# Ultimate fallback
608+
return os.path.join(os.getcwd(), "dist")
609+
571610
def on_success(self, gui, file: str) -> None:
572611
# ACASL-only policy: engines must not open output directories. Use this hook only for lightweight metadata/logging if needed.
573612
try:

ENGINES/nuitka/engine.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,30 @@ def program_and_args(self, gui, file: str) -> Optional[tuple[str, list[str]]]:
379379
except Exception:
380380
return None
381381

382+
def get_output_directory(self, gui) -> Optional[str]:
383+
"""Return the Nuitka output directory for ACASL.
384+
ACASL-only method: engines define their output directory but never open it themselves.
385+
"""
386+
try:
387+
# Try GUI nuitka_output_dir field first (Nuitka-specific)
388+
w = getattr(gui, "nuitka_output_dir", None)
389+
if w and hasattr(w, "text") and callable(w.text):
390+
v = str(w.text()).strip()
391+
if v:
392+
return v
393+
# Fallback to global output_dir_input
394+
w = getattr(gui, "output_dir_input", None)
395+
if w and hasattr(w, "text") and callable(w.text):
396+
v = str(w.text()).strip()
397+
if v:
398+
return v
399+
# Final fallback to workspace/dist
400+
ws = getattr(gui, "workspace_dir", None) or os.getcwd()
401+
return os.path.join(ws, "dist")
402+
except Exception:
403+
# Ultimate fallback
404+
return os.path.join(os.getcwd(), "dist")
405+
382406
def on_success(self, gui, file: str) -> None:
383407
# ACASL-only policy: engines must not open output directories. Use this hook only for lightweight metadata/logging if needed.
384408
try:

ENGINES/pyinstaller/engine.py

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,16 +99,14 @@ def _tr(fr, en):
9999
try:
100100
gui.log.append(
101101
_tr(
102-
"⏳ Installation des dépendances système… (attente de fin)",
103-
"⏳ Installing system dependencies… (waiting to finish)",
102+
"⏳ Installation des dépendances système en arrière‑plan… Relancez la compilation après l'installation.",
103+
"⏳ Installing system dependencies in background… Relaunch the build after installation.",
104104
)
105105
)
106106
except Exception:
107107
pass
108-
try:
109-
proc.waitForFinished(-1)
110-
except Exception:
111-
pass
108+
# Ne pas bloquer l'UI: arrêter le préflight et relancer plus tard
109+
return False
112110
else:
113111
try:
114112
gui.log.append(
@@ -247,6 +245,24 @@ def program_and_args(self, gui, file: str) -> Optional[tuple[str, list[str]]]:
247245
except Exception:
248246
return None
249247

248+
def get_output_directory(self, gui) -> Optional[str]:
249+
"""Return the PyInstaller output directory for ACASL.
250+
ACASL-only method: engines define their output directory but never open it themselves.
251+
"""
252+
try:
253+
# Try GUI output_dir_input field first
254+
w = getattr(gui, "output_dir_input", None)
255+
if w and hasattr(w, "text") and callable(w.text):
256+
v = str(w.text()).strip()
257+
if v:
258+
return v
259+
# Fallback to workspace/dist
260+
ws = getattr(gui, "workspace_dir", None) or os.getcwd()
261+
return os.path.join(ws, "dist")
262+
except Exception:
263+
# Ultimate fallback
264+
return os.path.join(os.getcwd(), "dist")
265+
250266
def on_success(self, gui, file: str) -> None:
251267
# ACASL-only policy: engines must not open output directories. Use this hook only for lightweight metadata/logging if needed.
252268
try:

0 commit comments

Comments
 (0)