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.
Implements the "Skyscope macOS on PC USB Creator Tool" with core features:
1. **GUI (PyQt6):** For macOS version selection, Docker interaction, image extraction, USB selection, and feedback.
2. **Docker Orchestration:**
* Builds and runs Docker-OSX commands.
* Streams logs to GUI; runs Docker in a separate thread.
* Persists containers with unique names for file access.
3. **Image Extraction:**
* Copies `mac_hdd_ng.img` and `OpenCore.qcow2` from the container.
* Manages container lifecycle (stop/remove).
4. **USB Writing (Linux PoC):**
* `usb_writer_linux.py` handles partitioning, formatting, and image writing.
* Uses `qemu-img`, `parted`, `kpartx`, `rsync`, `mkfs.vfat`, `dd`.
* Includes data erasure warning.
* Known issue: `dd` for main image writes full sparse size; needs change to file-level copy.
5. **iGPU Config Review:** Confirmed Docker-OSX's use of WhateverGreen.
6. **Documentation:** Added `README.md` with overview, prerequisites, usage, known issues, and future work based on your feedback (image sizing, explicit pull, privilege handling).
The application files include `main_app.py`, `utils.py`, `constants.py`, `usb_writer_linux.py`, and `README.md`.
This commit reflects the state after incorporating your feedback regarding visibility of all created files in the repository.
# Share directories, sharing files, shared folder, mount folder
The easiest and most secure way is `sshfs`
```bash
# on Linux/Windows
mkdir ~/mnt/osx
sshfs user@localhost:/ -p 50922 ~/mnt/osx
# wait a few seconds, and ~/mnt/osx will have full rootfs mounted over ssh, and in userspace
# automated: sshpass -p <password> sshfs user@localhost:/ -p 50922 ~/mnt/osx
```
From official MS documentation around `.wslconfig`. Link also has some interesting reading about the `8 second rule` regarding changes not really being made to configs until about 8 seconds after *all* the instance of a distro are shut down. Might be good for some troubleshooting issues with wsl configs not "sticking".
I ran into some issues when I ran software that was trying to lock files under the nfs folder. This was on Catalina and looks like this is a common issue with Mac -> Linux nfs.
After digging into it, for my use case using the `locallocks` NFS option on the Mac client resolved it. The `locallocks` option means that locking is handled by the client. There would be problems if you actually need server side locking.