diff --git a/pyinstallerguiwrapper/build/build_orchestrator.py b/pyinstallerguiwrapper/build/build_orchestrator.py index dfc2125..b71273b 100644 --- a/pyinstallerguiwrapper/build/build_orchestrator.py +++ b/pyinstallerguiwrapper/build/build_orchestrator.py @@ -33,8 +33,9 @@ if sys.version_info < (3, 9): WEXPECT_HELPER_SOURCE_SCRIPT_NAME = "wexpect_console_entry.py" -WEXPECT_HELPER_FINAL_NAME_IN_BUNDLE = "wexpect.exe" -COMPILED_HELPER_EXE_ON_DISK_NAME = "wexpect_console_helper_temp.exe" +EXE_EXT = ".exe" if sys.platform == "win32" else "" +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: @@ -255,6 +256,10 @@ class BuildOrchestrator: return False 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._wexpect_helper_compiled_path = None self._temp_helper_dir_path = None diff --git a/pyinstallerguiwrapper/gui/options_manager.py b/pyinstallerguiwrapper/gui/options_manager.py index d69054a..bfea4e1 100644 --- a/pyinstallerguiwrapper/gui/options_manager.py +++ b/pyinstallerguiwrapper/gui/options_manager.py @@ -130,12 +130,18 @@ class OptionsManager: current_row += 1 # Wexpect Helper Option - ttk.Checkbutton( + wexpect_check = ttk.Checkbutton( 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, 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 ttk.Label(