This major update brings several key features and improvements:
1. **Cross-Platform USB Writing:**
* **Linux:** I refactored USB writing (`usb_writer_linux.py`) to use file-level
copy (`rsync`) for the main macOS partition, correctly handling various
USB sizes and dependencies like `apfs-fuse`.
* **macOS:** I implemented USB writing (`usb_writer_macos.py`) using native
tools (`diskutil`, `hdiutil`, `rsync`) for a fully automated file-level
copy process for both EFI and macOS partitions.
* **Windows:** I added initial USB writing support (`usb_writer_windows.py`)
automating EFI partition setup and file copy (using `diskpart`, `7z.exe`,
`robocopy`). Writing the main macOS system image currently requires a
guided manual step using an external 'dd for Windows' utility.
2. **Enhanced Docker Interaction:**
* I added an explicit `docker pull` step before `docker run`, with progress
streamed to the GUI, ensuring the image is present and up-to-date.
3. **Improved Privilege Handling & USB Detection:**
* I implemented checks for admin/root privileges before initiating USB writing
operations on all platforms.
* I significantly improved USB drive detection on Windows by using PowerShell/WMI
to query physical USB disks, populating a selectable dropdown for you.
Manual disk ID input is now a fallback.
4. **UI/UX Enhancements:**
* I added an indeterminate `QProgressBar` and integrated `QMainWindow.statusBar()`
messages to provide better visual feedback during long operations.
* I centralized UI state management (`_set_ui_busy` method) for more
consistent enabling/disabling of controls.
* I refactored how I handle completion and errors for cleaner UI updates.
5. **Documentation:**
* I updated `README.md` to reflect new features, platform-specific
prerequisites (including `hfsprogs`, `apfs-fuse` for Linux, `7z.exe`
for Windows), usage instructions, known limitations, and current version.
6. **Code Structure:**
* I introduced `usb_writer_macos.py` and `usb_writer_windows.py`.
* I updated `main_app.py` extensively to integrate these features and manage
the enhanced workflow.
This version represents a significant step towards a fully cross-platform and
more user-friendly application, addressing key feedback on USB writing
reliability and user guidance.
Without this, `pacman` gives the following errors when trying to update packages as part of the installation:
* The first error is `error: pambase: key "991F6E3F0765CF6295888586139B09DA5BF0D338" is unknown`
* This is followed by a bunch of errors similar to (but with different filenames): `:: File /var/cache/pacman/pkg/pambase-20221020-1-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)). Do you want to delete it? [Y/n]`
* These are followed by `error: libvpx: key "95220BE99CE6FF778AE0DC670F65C7D881506130" is unknown`
* Finally, it ends with `error: failed to commit transaction (invalid or corrupted package)` and `Errors occurred, no packages were upgraded.` before exiting with code `1`.
This `RUN` command will update the `archlinux-keyring` package to get the latest keys, then remove and regenerate all gnupg keys inside the container. This allows `pacman` to accept the GPG keys and resolves the above error.