Skip to content

Commit c06b97d

Browse files
authored
Update README.md
1 parent a092f2f commit c06b97d

File tree

1 file changed

+63
-21
lines changed

1 file changed

+63
-21
lines changed

README.md

Lines changed: 63 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ BlueStacks Root GUI is a utility designed to easily toggle root access settings
1818
- [Usage Guide](#usage-guide)
1919
- [Troubleshooting](#troubleshooting)
2020
- [Development](#development)
21-
- [Changelog](#changelog)
2221
- [Contributing](#contributing)
22+
- [Changelog](#changelog)
2323
- [License](#license)
2424

2525
---
@@ -35,8 +35,6 @@ BlueStacks Root GUI is a utility designed to easily toggle root access settings
3535
- **Responsive UI:** Uses background threads (`QThread`) for potentially long operations (file I/O, process termination) to keep the GUI responsive.
3636
- **Basic Internationalization:** Includes English and Japanese translations.
3737

38-
---
39-
4038
## Prerequisites
4139

4240
- **Operating System:** Windows 10 or later (due to registry keys and file paths used).
@@ -45,8 +43,6 @@ BlueStacks Root GUI is a utility designed to easily toggle root access settings
4543
- **Administrator Rights:** **Required** to read the HKLM registry and terminate BlueStacks processes effectively. Run the application as an administrator.
4644
- **Dependencies:** Listed in `requirements.txt`. Key dependencies include `PyQt5`, `pywin32`, `psutil`.
4745

48-
---
49-
5046
## Installation & Download
5147

5248
### For End Users (Executable Download)
@@ -85,8 +81,6 @@ BlueStacks Root GUI is a utility designed to easily toggle root access settings
8581
```
8682
The executable will be in the `dist/` folder.
8783

88-
---
89-
9084
## Usage Guide
9185

9286
1. **Launch as Administrator:** Start the GUI (`.exe` or `python main.py`) with administrator privileges.
@@ -117,8 +111,6 @@ BlueStacks Root GUI is a utility designed to easily toggle root access settings
117111
8. **Verify:** Launch the instance. Open Kitsune Mask; it should show as installed and active. Root applications should now work.
118112
9. **Close:** Close the BlueStacks Root GUI.
119113
120-
---
121-
122114
## Troubleshooting
123115
124116
- **"Path Not Found" / No Instances Listed:**
@@ -135,8 +127,6 @@ BlueStacks Root GUI is a utility designed to easily toggle root access settings
135127
* Try closing and reopening the Kitsune Mask app within the BlueStacks instance.
136128
- **Errors during Toggle Operations:** Check the status bar in the GUI and the application logs (if run from source/console) for specific error messages.
137129

138-
---
139-
140130
## Development
141131

142132
Follow the steps in [Installation & Download > For Developers](#for-developers-building-from-source).
@@ -148,14 +138,6 @@ Key modules:
148138
- `registry_handler.py`: Reads BlueStacks paths from Windows Registry.
149139
- `constants.py`: Shared constant values (keys, filenames, modes, etc.).
150140

151-
---
152-
153-
## Changelog
154-
155-
*(See commit history for details)*
156-
157-
---
158-
159141
## Contributing
160142

161143
Contributions are welcome! Please follow these guidelines:
@@ -168,8 +150,68 @@ Contributions are welcome! Please follow these guidelines:
168150
- Submit pull requests with clear descriptions of changes.
169151
- Open an issue to discuss significant changes beforehand.
170152

171-
---
153+
## Changelog
154+
155+
> v2.1 vs v2
156+
157+
### Major Changes
158+
159+
* **Code Modularization:** The entire application has been restructured from a single `main.py` file into multiple focused modules:
160+
* `main.py`: Handles the GUI (PyQt5), application logic, and threading.
161+
* `config_handler.py`: Dedicated to reading and writing `bluestacks.conf`.
162+
* `instance_handler.py`: Manages instance file (`.bstk`) modifications and BlueStacks process handling.
163+
* `registry_handler.py`: Specifically handles reading BlueStacks paths from the Windows Registry.
164+
* `constants.py`: Centralizes all constants (file names, keys, modes, etc.) for easier maintenance and consistency.
165+
* **Improved Error Handling & Reporting:**
166+
* More specific exceptions are caught and raised throughout the helper modules (`FileNotFoundError`, `IOError`, `ValueError`, etc.).
167+
* Worker threads now emit more granular error messages and status updates to the main UI, distinguishing between critical failures and per-instance issues.
168+
* Functions now often return `Optional[...]` types (like `Optional[bool]`) to better represent indeterminate states (e.g., when a file is missing or unreadable).
169+
170+
### Improvements
171+
172+
* **Configuration Handling (`config_handler.py`):**
173+
* Uses regular expressions for more reliable parsing of `bluestacks.conf` settings.
174+
* `modify_config_file` now correctly handles appending new settings if they don't exist and avoids writing the file if no changes are actually made.
175+
* `get_all_instance_root_statuses` provides an efficient way to read all instance statuses at once.
176+
* **Instance File Handling (`instance_handler.py`):**
177+
* `modify_instance_files` uses more robust regex (`REGEX_BSTK_TYPE_PATTERN`) to find and replace the `Type` attribute in `.bstk` files, handling different whitespace and casing.
178+
* `is_instance_readonly` now checks specifically for the `Readonly` type associated with target disk files and returns `None` if the status cannot be determined (e.g., file missing, read error), preventing incorrect assumptions.
179+
* **Process Management (`instance_handler.py`):**
180+
* `terminate_bluestacks` implements a more robust termination sequence: attempts graceful `terminate()`, waits (`PROCESS_KILL_TIMEOUT_S`), and then forcefully `kill()` any remaining processes.
181+
* Uses a more comprehensive list of `BLUESTACKS_PROCESS_NAMES` from `constants.py`.
182+
* `is_bluestacks_running` uses `psutil` for efficient process checking.
183+
* **Registry Access (`registry_handler.py`):**
184+
* More specific error handling for `FileNotFoundError` and `PermissionError` during registry access.
185+
* Checks the registry value type (`REG_SZ`) to ensure a string path is returned.
186+
* **GUI & User Experience (`main.py`):**
187+
* Instance list now uses `QGridLayout` for potentially better column alignment.
188+
* Path label now displays both the `UserDefinedDir` and `DataDir` paths found.
189+
* Language selection ComboBox moved to the top-left for better visibility.
190+
* Added tooltips to the "Toggle Root" and "Toggle R/W" buttons explaining their function.
191+
* Added a specific, clearer "Kitsune Mask Install Reminder" popup message with updated instructions.
192+
* Worker thread emits detailed status messages (`operation_message` signal) during operations (e.g., "Toggling Root for Nougat64...").
193+
* Improved cleanup logic for the background thread (`QThread`).
194+
* Added Windows AppUserModelID setting for better taskbar integration (pinning, icon grouping).
195+
* Icon handling is more robust, checking for file existence.
196+
* **Logging:**
197+
* Standardized logging setup using `logging.basicConfig`.
198+
* Modules use `logger = logging.getLogger(__name__)` for better log organization.
199+
* Increased logging detail, especially at the DEBUG level.
200+
201+
### Fixes
202+
203+
* **Potential State Inconsistencies:** Improved logic for reading R/W status (`is_instance_readonly`) reduces the chance of misrepresenting the state if files are unreadable or missing attributes.
204+
* **Configuration File Writing:** `modify_config_file` now avoids unnecessary file writes if the value is already correct.
205+
* **Instance File Modification:** More reliable identification and modification of the `Type` attribute in `.bstk` files due to regex usage.
206+
207+
### Code Quality & Refactoring
208+
209+
* Massive refactoring into separate modules improves readability and maintainability.
210+
* Introduction of `constants.py` eliminates magic strings and numbers.
211+
* Increased use of type hinting (`typing` module) enhances code clarity and allows for static analysis.
212+
* Removed unused dependencies (`lxml`, `pillow`, `python-docx`) from `requirements.txt`.
213+
* Improved docstrings across functions and classes.
172214
173215
## License
174216
175-
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file (if included, standard MIT otherwise) for details.
217+
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file (if included, standard MIT otherwise) for details.

0 commit comments

Comments
 (0)