aggiunta la possibilità di compilare per macos e linux

This commit is contained in:
VALLONGOL 2025-11-25 09:20:39 +01:00
parent d4749d35ed
commit 0cae992342
2 changed files with 16 additions and 5 deletions

View File

@ -33,8 +33,9 @@ if sys.version_info < (3, 9):
WEXPECT_HELPER_SOURCE_SCRIPT_NAME = "wexpect_console_entry.py" WEXPECT_HELPER_SOURCE_SCRIPT_NAME = "wexpect_console_entry.py"
WEXPECT_HELPER_FINAL_NAME_IN_BUNDLE = "wexpect.exe" EXE_EXT = ".exe" if sys.platform == "win32" else ""
COMPILED_HELPER_EXE_ON_DISK_NAME = "wexpect_console_helper_temp.exe" WEXPECT_HELPER_FINAL_NAME_IN_BUNDLE = f"wexpect{EXE_EXT}"
COMPILED_HELPER_EXE_ON_DISK_NAME = f"wexpect_console_helper_temp{EXE_EXT}"
class BuildOrchestrator: class BuildOrchestrator:
@ -255,6 +256,10 @@ class BuildOrchestrator:
return False return False
def _build_wexpect_helper_executable(self) -> Optional[str]: def _build_wexpect_helper_executable(self) -> Optional[str]:
if sys.platform != "win32":
self._log_message("Skipping wexpect helper build: 'wexpect' is strictly for Windows.", level="WARNING")
return None
self._log_message("="*10 + " BUILDING WEXPECT CONSOLE HELPER " + "="*10, level="INFO") self._log_message("="*10 + " BUILDING WEXPECT CONSOLE HELPER " + "="*10, level="INFO")
self._wexpect_helper_compiled_path = None self._wexpect_helper_compiled_path = None
self._temp_helper_dir_path = None self._temp_helper_dir_path = None

View File

@ -130,12 +130,18 @@ class OptionsManager:
current_row += 1 current_row += 1
# Wexpect Helper Option # Wexpect Helper Option
ttk.Checkbutton( wexpect_check = ttk.Checkbutton(
self.options_frame, self.options_frame,
text="Build and include 'wexpect' console helper (for frozen apps using wexpect)", text="Build and include 'wexpect' console helper (Windows only)",
variable=self.build_wexpect_helper_var, variable=self.build_wexpect_helper_var,
command=self._on_wexpect_helper_option_changed, command=self._on_wexpect_helper_option_changed,
).grid(row=current_row, column=0, columnspan=4, padx=5, pady=2, sticky="w") )
wexpect_check.grid(row=current_row, column=0, columnspan=4, padx=5, pady=2, sticky="w")
if sys.platform != "win32":
wexpect_check.config(state="disabled")
self.build_wexpect_helper_var.set(False)
current_row += 1 current_row += 1
ttk.Label( ttk.Label(