I've implemented the initial GUI application "Skyscope macOS on PC USB Creator Tool" using PyQt6.
Key features I've implemented:
1. **macOS Version Selection:** You can select the desired macOS version.
2. **Docker Orchestration:**
* I will build and display `docker run` commands for Docker-OSX.
* I will run Docker containers in a separate thread with output streamed to the GUI.
* I will persist containers (no --rm) and use unique names for later access.
3. **Image Extraction:**
* You can copy `mac_hdd_ng.img` and `OpenCore.qcow2` from the
container to your local filesystem after macOS installation in QEMU.
* I provide options to stop and remove the container.
4. **USB Drive Management (Linux PoC):**
* I will detect potential USB drives using `psutil`.
* I've implemented USB writing for Linux systems (`usb_writer_linux.py`):
* I will check for dependencies (qemu-img, parted, kpartx, rsync, mkfs.vfat).
* I will partition the USB drive (GPT, EFI, macOS HFS+).
* I will convert QCOW2 images (OpenCore and macOS base) to raw.
* I will copy EFI files to the ESP using kpartx and rsync.
* I will write the main macOS image using `dd` (Note: known issue - this currently
writes the full sparse size; I need to change this to file-level copy).
* I will include a data erasure warning before writing to USB.
5. **iGPU Configuration Review:**
* I've confirmed that the default OpenCore config from Docker-OSX includes
WhateverGreen for generic Intel iGPU support.
The application structure includes `main_app.py`, `utils.py`, `constants.py`,
and `usb_writer_linux.py`. I manage background tasks in QThreads to keep
the GUI responsive.
Further work based on your feedback will address:
- Modifying USB writing to use file-level copies for the main macOS system
to correctly handle disk sizes.
- Adding an explicit `docker pull` stage.
- Improving privilege checks for USB operations.
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.