The _check_backends method had leftover code from an old version
mixed with the new implementation, causing:
unexpected indent (plugin.py, line 953)
Removed the duplicate/old code block.
NEW FEATURES:
1. Plugin Dependency Declaration (BasePlugin):
- Added 'dependencies' class attribute
- Format: {'pip': ['package1', 'package2'], 'optional': {...}}
- Plugins can declare required pip packages
2. Plugin Dependency Manager (core/plugin_dependency_manager.py):
- Checks if declared dependencies are installed
- Installs missing packages via pip
- Tracks installation status
- Shows progress dialog during installation
3. Settings Dialog Integration:
- When enabling a plugin with dependencies, shows dialog
- Lists missing dependencies
- Asks user if they want to install
- Shows progress bar during installation
- Handles installation failures gracefully
4. Example: Game Reader Test plugin:
- Declares dependencies: pillow, numpy
- Optional: easyocr, pytesseract, paddleocr
- When enabled, prompts to install if missing
WORKFLOW:
1. User enables a plugin in Settings → Plugins
2. System checks if plugin has dependencies
3. If dependencies missing, shows dialog
4. User clicks Yes to install
5. Progress dialog shows installation progress
6. Plugin loads after dependencies installed
This eliminates manual pip install steps for plugins!
Added to README.md:
- New 'OCR Requirements (Optional)' section after Installation
- Instructions for installing EasyOCR (recommended), Tesseract, or PaddleOCR
- Note that Game Reader works without OCR, just shows 'not available'
Improved Game Reader Test plugin:
- Better error message when Tesseract binary is not installed
- Provides download link and installation steps in error message
- Updated Calibration tab to check if Tesseract binary is available
- Shows recommendation to use EasyOCR in backend status
This helps users understand why they get 'tesseract is not installed'
errors and how to fix them.
Added new 'File Test' tab that allows testing OCR on saved screenshot files.
This is useful when:
- The game is not currently running
- You want to test OCR on a specific saved screenshot
- You want to compare OCR results on the same image
Features:
- Browse button to select image files (PNG, JPG, BMP, TIFF)
- Backend selection (Auto/EasyOCR/Tesseract)
- Displays filename and processing stats
- Shows which backend was used and processing time
The original 'Quick Test' still captures the current screen.
The new 'File Test' lets you test on saved images.
NEW TESTING PLUGINS:
1. Log Parser Test Plugin (plugins/log_parser_test/)
- Real-time event monitoring with counters
- Visual event history table (last 100 events)
- Raw log line viewer
- Simulated event buttons for testing:
* Skill Gain
* Loot
* Damage
- Event type filtering and statistics
- Color-coded event types
- Auto-scroll and refresh
2. Game Reader Test Plugin (plugins/game_reader_test/)
- Quick OCR test with progress bar
- Region-specific OCR testing with presets:
* Chat Window
* Skills Window
* Inventory
* Mission Tracker
- OCR backend selection (Auto/EasyOCR/Tesseract/PaddleOCR)
- Processing time tracking
- Test history with results
- Save/copy OCR results
- Calibration tools:
* Display DPI detection
* Backend status checker
* OCR tips and best practices
FEATURES FOR BOTH:
- Modern EU-styled UI
- Tabbed interface
- Error handling and logging
- Background processing (no UI freeze)
- Real-time updates
These plugins serve as both testing tools and demonstrations
of the Log Reader and OCR core services capabilities.