Skip to content

PawnBit V1.0.0-beta.1#84

Open
sayrox106 wants to merge 15 commits intoPanagiotisIatrou:mainfrom
sayrox106:main
Open

PawnBit V1.0.0-beta.1#84
sayrox106 wants to merge 15 commits intoPanagiotisIatrou:mainfrom
sayrox106:main

Conversation

@sayrox106
Copy link

No description provided.

- UI: Reorganized settings (Random Delay moved under Bongcloud) and fixed slider placement.
- Features: Added automatic saving and loading of all UI settings via config.json.
- Stability: Increased Stockfish detection timeouts and added binary pre-validation.
- Robustness: Improved browser status detection and implemented proper cleanup of background processes on exit.
- Validation: Added input checks for Memory, Threads, and Slow Mover settings.
- Performance: Added a warning if CPU threads exceed logical core count.
- Technical: Added multiprocess freeze_support for better compatibility with .exe builds.
- Build: Updated CI workflow to pre-download and bundle Stockfish 18 modern for Windows, macOS, and Linux.
- Engine: Implemented fallback mechanism in engine_manager.py to prioritize bundled assets over runtime downloads.
- Security: Reduced Antivirus triggers by eliminating the need for dynamic binary downloads at first launch.
- Reliability: Fixed Stockfish installation failures in frozen EXE environments by ensuring a valid engine is always present.
- Updated Installation guide: highlighted that Stockfish is now bundled with the executable.
- Features: Added "Settings Persistence" and "Human-like Behavior" (Random Delays) to the feature list.
- Support Matrix: Updated status for Chess.com and Lichess.org (Mouseless, Non-stop, Puzzles).
- Technical: Refined source-build instructions for Windows and macOS/Linux.
- Fixed: Resolved the 404 error during CI by using the correct Stockfish 18 asset naming convention (AVX2 instead of modern).
- Resilience: Implemented a fallback loop for Stockfish downloads on Windows, macOS, and Linux that tries multiple optimized binary variants.
- CI: Added proper error handling via PowerShell Try/Catch and bash loops to ensure engine bundling always succeeds.
- Metadata: Updated bundled engine version info to reflect "bundled" status.
- Stability: Added multiprocess.set_executable for reliable execution in frozen environments.
- Cleanup: Implemented a recursive shutdown sequence to ensure Stockfish, Chrome, and Overlay processes are fully terminated on exit.
- Stealth: Patched subprocess calls to use CREATE_NO_WINDOW, eliminating all console popups on Windows.
- UX: Enabled High-DPI awareness for sharper UI rendering on Windows.
- Logging: Added automatic error logging to 'error_log.txt' for debugging potential crashes in the compiled EXE.
- Resilience: Wrapped keyboard hooks in safe try-except blocks to prevent crashes when running without elevation.
- Fixed 'NameError: Path is not defined' by restoring missing imports in gui.py.
- Restored missing engine detection helpers in engine_manager.py (_find_binary_in_dir, etc.).
- Implemented kill_process_tree using 'taskkill /T /F' to ensure no lingering Stockfish or ChromeDriver processes remain on Windows.
- Added a smart version-tagging fallback for bundled SF 18 engines.
- Improved shutdown sequence with a slight delay to allow clean browser termination.
- Fixed a syntax error in the engine validation try-except blocks.
- Architecture: Switched from Multiprocessing to Threading to prevent Windows-specific crashes in frozen EXEs.
- UI Overlay: Replaced heavy PyQt6 dependency with a lightweight vanilla Tkinter-based overlay (saves ~100MB in build).
- Browser: Threaded 'Open Browser' logic to keep GUI responsive; removed webdriver-manager in favor of Selenium's built-in manager for better reliability.
- Stability: Added global exception hook that logs fatal errors to 'error_log.txt' and shows a user-friendly popup.
- Build Optimization:
    - Disabled UPX in PyInstaller to reduce Antivirus false positives.
    - Simplified GitHub Actions by removing manual Stockfish bundling (Stockfish is now auto-downloaded on first run).
    - Reduced EXE size by excluding redundant libraries (PyQt6, multiprocess, etc.).
- Cleaned up engine_manager.py and updated requirements.txt.
- Restored & Optimized 'Keep Looking': Board detection now loops efficiently with 1s sleep and respects GUI STOP signals.
- Fixed DLL Load Errors: Disabled symbol stripping in PawnBit.spec to resolve 'Invalid access to memory location' on Windows.
- Lichess/Chesscom Grabbers: Improved resilience against stale elements and slow page loads.
- Threading Architecture: Completed the transition from multiprocess to threading/queues for all core components (Bot, Overlay, Browser).
- Dependency Streamlining: Finalized requirements.txt by removing PyQt6, multiprocess, and webdriver-manager.
- UI: Updated versioning and improved error logging for better diagnostic in frozen EXEs.
- Reverted to Bundled Engine: Stockfish 18 is now included directly in the assets for instant use.
- Resolved DLL load errors: Adjusted PyInstaller spec flags and disabled symbol stripping for better Windows compatibility.
- Build Workflow Update: Added a portable ZIP artifact alongside the EXE to bypass Antivirus/Temp-folder restrictions.
- Grabber Polish: Restored persistent board detection (with 1s polling) and enabled immediate interruption via GUI STOP signal.
- Architecture: Finalized the transition to a lightweight, threaded Tkinter GUI (PyQt6 and Multiprocessing completely removed).
Upgraded Selenium: Updated
requirements.txt
 from version 4.9.1 to 4.22.0. Newer versions of Selenium have a significantly more robust "Selenium Manager" (internally rewritten in Rust) that handles frozen environments like PyInstaller much more reliably.
Explicitly Bundled Binaries: Modified
PawnBit.spec
 to use collect_data_files('selenium'). This ensures that selenium-manager.exe and its required dynamic assets are explicitly included in the final executable, preventing the "file not found" or "failed to discover" errors.
Enhanced Chrome Discovery: Updated the browser launch logic in
src/gui.py
 to:
Assist Discovery: On Windows, it now automatically adds common Chrome installation paths (Program Files, Local AppData) to the system PATH before launching. This helps Selenium Manager find your Chrome installation even if it's not in the default system path.
Retry Mechanism: Added a fallback retry during initialization to handle transient failures in driver establishment.
Actionable Error Messages: If it fails again, the GUI will now provide a specific tip (e.g., "Ensure Chrome is installed") instead of just showing a raw stack trace.
…s Mode and a fully persistent settings management system to ensure maximum stealth and performance.

 This major update significantly enhances the bot's reliability and undetectability by implementing a sophisticated background mouse simulation. This new Ghost Human mode mimics realistic human drag-and-drop actions with randomized jitter and pauses directly inside the browser, allowing the bot to play moves without ever touching your physical hardware mouse. The entire configuration system has been rebuilt with a reactive auto-save feature that remembers every checkbox and slider change instantly for your next session. To give users even more control, we have added the ability to export and import configuration profiles via JSON files, making it easy to back up or share specific playstyles. Performance has been optimized through advanced board geometry caching and a streamlined main loop that reduces CPU overhead while reacting faster to opponent moves. Additionally, we have implemented more robust color detection for Lichess, refined the move synchronization to prevent desyncs during laggy sessions, and cleaned up the terminal interface by removing redundant synchronization logs. All build scripts and documentation have been updated to reflect these stability improvements for the current beta release.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant