This commit concludes a major development cycle I focused on. I transitioned to a
`gibMacOS`-based installer workflow, significantly enhancing platform-specific
USB creation logic, refining OpenCore `config.plist` modifications (especially
for NVIDIA GTX 970 OCLP preparation), and improving UI/UX and documentation.
**Key Accomplishments in this Overall Plan:**
1. **Core Workflow Overhaul (Installer-Based via `gibMacOS`):**
- I fully refactored `main_app.py` for the new workflow, removing Docker.
- I now download official macOS assets with UI progress.
2. **Platform-Specific USB Installer Creation (`usb_writer_*.py`):**
- **Linux & macOS:** I implement nearly complete automation for creating macOS
USB installers. This includes GPT partitioning, HFS+ formatting,
BaseSystem extraction (`7z`) and writing (`dd`), copying of all essential
installer assets (`BaseSystem.dmg`/`.chunklist`, `InstallInfo.plist`,
`InstallAssistant.pkg`/`InstallESD.dmg`, `AppleDiagnostics.dmg`, `boot.efi`)
to standard locations within a created `Install macOS [VersionName].app`
structure, and `bless`ing (macOS).
- **Windows:** I automate EFI partition setup and OpenCore EFI placement (from
template + `plist_modifier.py`). I prepare `BaseSystem.hfs` and provide
highly detailed guidance for manual `dd` of BaseSystem and manual copying
of other HFS+ installer content by you.
3. **Advanced `plist_modifier.py` (OpenCore `config.plist` Enhancement):**
- I expanded hardware mappings (Alder Lake iGPUs with headless logic, audio
codecs via name detection, Ethernet kexts).
- **NVIDIA GTX 970 (Maxwell) OCLP Preparation:** For newer macOS, I add
`amfi_get_out_of_my_way=0x1` (and consider `ngfxcompat=1`, `ngfxgl=1`)
to `boot-args`, set conditional `nv_disable=1`, and ensure
`SecureBootModel=Disabled`. For High Sierra, I set `nvda_drv=1`.
- I create `config.plist.backup`.
4. **`linux_hardware_info.py`:** I enhanced this with `get_audio_codecs()` for more
accurate audio configuration.
5. **`EFI_template_installer`:**
- I thoroughly updated `config-template.plist` with robust, modern defaults
(Alder Lake friendly, OCLP preparation) for `plist_modifier.py` to build upon.
- I established a placeholder structure for kexts, drivers, ACPI.
6. **UI/UX Enhancements (`main_app.py`):**
- I added a status bar spinner for active operations.
- I added a determinate `QProgressBar` for `gibMacOS` downloads.
- I centralized UI state management.
- I added privilege checks before USB writing.
- I improved Windows USB detection (WMI/PowerShell).
- (Note: Displaying determinate `rsync` progress in the UI was blocked by tooling issues,
though `usb_writer_linux.py` emits the data).
7. **Documentation (`README.md`):**
- I comprehensively rewrote this for "Skyscope" branding, new workflow, detailed
NVIDIA/OCLP strategy, full prerequisites, and usage instructions.
- I updated the version to 1.1.0.
8. **Research:**
- I analyzed OCLP and community examples for NVIDIA Maxwell/Pascal support,
confirming OCLP post-install patching as the standard for acceleration on
newer macOS.
- I confirmed `gibMacOS` as the preferred macOS asset downloader.
This version delivers a substantially more capable and user-informed tool for
creating macOS USB installers across multiple platforms, with a clear strategy
for handling common and specific hardware configurations like your
NVIDIA GTX 970.
This monolithic commit represents a comprehensive overhaul of the application,
transitioning from a Docker-OSX based system image creator to a sophisticated
macOS USB Installer creation tool using `corpnewt/gibMacOS.py`. It also
incorporates significant research and implementation for hardware compatibility,
especially for NVIDIA GPUs on newer macOS via OpenCore Legacy Patcher (OCLP)
preparation, and substantial UI/UX enhancements.
**Core Architectural Changes:**
1. **Installer-Based Workflow with `gibMacOS`:**
- `main_app.py`: Completely refactored. All Docker dependencies, UI components,
and related logic have been removed.
- I introduced a way to download official macOS installer assets
directly from Apple via `gibMacOS.py`. The UI now reflects a two-step process:
1. Download macOS Assets, 2. Create USB Installer.
- The USB writing process now consumes `macos_download_path` from `gibMacOS`.
2. **Platform-Specific USB Writer Modules (`usb_writer_*.py`) Refactored:**
- **`usb_writer_linux.py`:** Creates a comprehensive macOS installer.
- Uses `sgdisk` for GPT partitioning (EFI FAT32, Main HFS+).
- Employs `7z` to extract BaseSystem HFS image from downloaded assets.
- Writes BaseSystem image to USB via `dd`.
- Copies essential installer files (`BaseSystem.dmg`/`.chunklist`,
`InstallInfo.plist`, `InstallAssistant.pkg`/`InstallESD.dmg`,
`AppleDiagnostics.dmg`, `boot.efi`) to standard locations within a
created `Install macOS [VersionName].app` structure on the USB.
- Sets up OpenCore EFI from `EFI_template_installer`, including
conditional `config.plist` enhancement via `plist_modifier.py`.
- Includes logic to emit determinate `rsync` progress (though UI display
in `main_app.py` was blocked by difficulties).
- **`usb_writer_macos.py`:** Mirrors Linux writer functionality using native
macOS tools (`diskutil`, `hdiutil`, `7z`, `dd`, `rsync`/`cp`, `bless`).
Creates a full installer with custom OpenCore EFI.
- **`usb_writer_windows.py`:**
- Automates EFI partition setup (`diskpart`) and OpenCore EFI placement
(from template + `plist_modifier.py`, using `robocopy`).
- Extracts BaseSystem HFS image using `7z`.
- Provides detailed, enhanced guidance for you to manually:
1. Write the `BaseSystem.hfs` to the main USB partition using
"dd for Windows" (includes disk number, path, partition info).
2. Copy other installer assets to the HFS+ partition using
third-party tools or another OS.
3. **`plist_modifier.py` (OpenCore `config.plist` Enhancement):**
- Expanded hardware mappings for Intel Alder Lake iGPUs (including headless
logic if dGPU detected), audio codecs (prioritizing detected names), and
Ethernet kexts.
- Refined NVIDIA GTX 970 (Maxwell) `boot-args` logic:
- `nvda_drv=1` for High Sierra.
- For Mojave+: `amfi_get_out_of_my_way=0x1` (OCLP prep), and `nv_disable=1`
if an iGPU is present and primary; otherwise, no `nv_disable=1` to allow
GTX 970 VESA boot.
- Creates a `config.plist.backup` before modifications.
4. **`linux_hardware_info.py` (Hardware Detection - Linux Host):**
- Added `get_audio_codecs()` to detect audio codec names from `/proc/asound/`,
improving `layout-id` accuracy for `plist_modifier.py`.
5. **`EFI_template_installer`:**
- `config-template.plist` significantly improved with robust, generic defaults
for modern systems (Alder Lake friendly) and for `plist_modifier.py`.
- Directory structure for kexts, drivers, ACPI defined with placeholders.
6. **UI/UX Enhancements (`main_app.py`):**
- Status bar features a QTimer-driven text-based spinner for active operations.
- Implemented determinate `QProgressBar` for `gibMacOS` downloads.
- Centralized UI state management (`_set_ui_busy`, `update_all_button_states`).
- Improved lifecycle and error/completion signal handling.
- Privilege checks implemented before USB writing.
- Windows USB detection improved using PowerShell/WMI to populate a selectable list.
7. **Documentation (`README.md`):**
- Completely rewritten with "Skyscope" branding and project vision.
- Details the new `gibMacOS`-based installer workflow.
* Explains the NVIDIA GPU support strategy (guiding you to OCLP for
post-install acceleration on newer macOS).
* Comprehensive prerequisites (including `gibMacOS.py` setup, `7z`, platform
tools like `hfsprogs` and `apfs-fuse` build info for Debian).
* Updated usage instructions and current limitations.
* Version updated to 1.1.0.
**Known Issue/Stuck Point:**
- Persistent difficulties prevented the full integration of determinate `rsync`
progress display in `main_app.py`. While `usb_writer_linux.py` emits the
data, I could not reliably update `main_app.py` to use it for the progress bar.
This change represents a foundational shift to a more flexible and direct
method of macOS installer creation and incorporates many advanced configuration
and usability features.
This commit culminates a major refactoring to an installer-based workflow using
`gibMacOS` and includes significant enhancements to platform-specific USB
writers, `config.plist` modification, and UI/UX feedback.
**1. Core Workflow Change (Installer-Based via `gibMacOS`):**
- `main_app.py`: I re-architected this to use `corpnewt/gibMacOS.py` for downloading
official macOS installer assets. Docker dependencies and related UI/logic
have been removed. I introduced a new approach for downloads using `gibMacOS`.
- The application flow is now: Download macOS Assets -> Create USB Installer.
**2. Platform-Specific USB Writer Modules (`usb_writer_*.py`):**
- All writers (`linux`, `macos`, `windows`) were updated to accept `macos_download_path`.
- **`usb_writer_linux.py`:**
- Creates macOS installer USB using `sgdisk`, `mkfs.hfsplus`, `7z` (for
BaseSystem HFS extraction), `dd` (for BaseSystem write).
- Copies key installer assets (`BaseSystem.dmg`/`.chunklist`, `InstallInfo.plist`,
`InstallAssistant.pkg`, `AppleDiagnostics.dmg`) to standard locations,
including a basic `Install macOS [VersionName].app` structure.
- Sets up OpenCore EFI from `EFI_template_installer`, with conditional
`plist_modifier.py` enhancements.
- **`rsync` progress:** This module was updated to parse `rsync --info=progress2`
output and emit detailed progress, but I encountered issues integrating the display of this as a determinate progress bar in `main_app.py`.
Raw rsync log lines with progress will still appear.
- **`usb_writer_macos.py`:**
- Similar installer creation logic using `diskutil`, `hdiutil`, `7z`, `dd`,
`rsync`/`cp`, and `bless`.
- **`usb_writer_windows.py`:**
- Automates EFI setup (from template + `plist_modifier`) and BaseSystem HFS
image extraction (`7z`).
- Provides detailed guidance for manual `dd for Windows` step for BaseSystem
and manual copying of other HFS+ installer content.
**3. `plist_modifier.py` Enhancements:**
- Expanded hardware mappings (Alder Lake iGPUs - including headless logic,
audio codecs prioritizing name detection, Ethernet kexts).
- Refined NVIDIA GTX 970 `boot-args` logic (for OCLP prep: `amfi_get_out_of_my_way=0x1`;
`nv_disable=1` conditional on iGPU; `nvda_drv=1` for High Sierra).
- Creates `config.plist.backup` before modifications.
**4. `linux_hardware_info.py` Improvements:**
- Added `get_audio_codecs()` for more accurate audio configuration.
**5. `EFI_template_installer`:**
- `config-template.plist` updated with robust defaults for modern systems
(Alder Lake friendly) and for `plist_modifier.py`.
- Placeholder files for kexts, drivers, ACPI established.
**6. UI/UX Enhancements (`main_app.py`):**
- Status bar now features a QTimer-driven text-based spinner during operations.
- Determinate `QProgressBar` implemented for `gibMacOS` downloads by parsing its output.
- Centralized UI state management (`_set_ui_busy`, `update_all_button_states`).
- Improved lifecycle management and error/completion handling.
**7. Documentation (`README.md`):**
- Completely rewritten for "Skyscope" branding and the new installer workflow.
* Details NVIDIA GPU strategy (guidance towards post-install OCLP).
* Comprehensive prerequisites (including `gibMacOS.py`, `7z`, platform tools,
Debian `apfs-fuse` build info) and usage instructions.
**Stuck Point during Development:**
- I persistently failed to update `main_app.py` to fully integrate the display of determinate `rsync` progress from
`usb_writer_linux.py`. The `usb_writer_linux.py` module *does* emit the
necessary progress data, but the `main_app.py` changes to consume it for the
progress bar were blocked by repeated errors. This means `rsync` progress
will appear in logs but not as a filling bar.
This represents a near-complete transition to the new installer-based
architecture with significant feature enhancements across the application.
This commit represents a major architectural shift for the Skyscope macOS USB Creator Tool. I've changed the core functionality from a Docker-OSX based VM image creation process to a macOS installer creation method using `corpnewt/gibMacOS` for downloading official macOS assets.
Key Changes and Features in this Submission:
1. **Core Workflow Overhaul (Installer-Based):**
* `main_app.py`: I've fundamentally refactored this to remove all Docker dependencies and UI elements.
* I've introduced a process to download macOS installer assets directly from Apple using `gibMacOS.py`. This includes basic progress parsing for UI feedback.
* The application flow is now: 1. Download macOS Assets -> 2. Create Bootable USB Installer.
2. **Platform-Specific USB Writer Modules Refactored (`usb_writer_*.py`):**
* I've updated all USB writer modules (`usb_writer_linux.py`, `usb_writer_macos.py`, `usb_writer_windows.py`) to accept the `macos_download_path` (from `gibMacOS`) as input.
* Their `format_and_write` methods now aim to create a bootable macOS *Installer* USB:
* **Linux & macOS Writers:** I've implemented partitioning (EFI FAT32, Main HFS+), extraction of BaseSystem HFS image (via `7z`), writing BaseSystem to USB (via `dd`), copying of essential installer support files (`BaseSystem.dmg`, `.chunklist`, `InstallInfo.plist`, main installer PKG), and setup of a template-based OpenCore EFI (with `plist_modifier.py` enhancements). I'm still refining the completeness of all installer support files.
* **Windows Writer:** I've automated EFI partition setup and OpenCore EFI placement. I've prepared the BaseSystem HFS image. I'll guide you through a manual `dd for Windows` step for writing the BaseSystem image and note the difficulty of copying further HFS+ content from Windows.
3. **`plist_modifier.py` Enhancements:**
* I've updated hardware mappings, particularly for Intel Alder Lake iGPUs (including headless configurations if a dGPU is detected) and common audio/Ethernet chipsets.
* I've refined NVIDIA GTX 970 `boot-args` logic: `nvda_drv=1` for High Sierra; `amfi_get_out_of_my_way=0x1` and conditional `nv_disable=1` (if iGPU present) for newer macOS to prepare for potential OCLP use.
* I now create a backup of the `config.plist` before modification.
4. **`linux_hardware_info.py` Improvements:**
* I've added `get_audio_codecs()` to detect audio codec names, enabling more accurate `layout-id` selection by `plist_modifier.py`.
5. **`EFI_template_installer` Created:**
* I've added a directory with a base OpenCore structure and a more robust `config-template.plist` (suited for Alder Lake and `plist_modifier.py`).
6. **UI/UX Enhancements:**
* I've added a QTimer-driven text-based spinner to the status bar for active operations.
* I've made an initial implementation of determinate progress for `gibMacOS` downloads.
* I've centralized UI state management (`_set_ui_busy`, `update_all_button_states`).
7. **Documentation (`README.md`):**
* I've completely rewritten this to reflect the "Skyscope" branding, the new installer-based workflow, updated features, detailed prerequisites (including for `gibMacOS` and platform-specific USB writing tools like `7z`, `hfsprogs`, `apfs-fuse`), comprehensive usage instructions, and current limitations (especially for Windows USB writing and NVIDIA on newer macOS, guiding towards OCLP post-install).
This submission lays a new foundation for the tool, focusing on creating macOS installers directly. While the Linux and macOS USB creation paths are mostly automated, the Windows path still has a significant manual component for the main OS partition. Further refinements will focus on completing the installer file sets for Linux/macOS, improving Windows automation if feasible, and acting on NVIDIA/OCLP research.
This commit marks a significant architectural change, moving away from
the Docker-OSX VM based approach to a macOS installer creation method
leveraging `corpnewt/gibMacOS` for downloading official macOS assets.
Key changes in this submission:
1. **Core Workflow Change (`main_app.py`):**
* I removed Docker-dependent UI and associated logic.
* I introduced new logic to manage downloading macOS installer assets
using `gibMacOS.py` (assumed to be present in a `./scripts` subdirectory or PATH).
* The UI flow is now:
* Step 1: Download macOS Installer Assets.
* Step 2: Create Bootable USB Installer (using platform-specific writers).
* The USB writing process now expects `macos_download_path` (where
`gibMacOS` saves files) instead of qcow2 image paths.
* Application version in "About" dialog updated to reflect major change.
2. **Refactored `usb_writer_linux.py` for Installer Creation:**
* `__init__` updated to accept `macos_download_path`.
* The `format_and_write` method was substantially rewritten to:
* Partition USB (EFI FAT32, Main HFS+).
* Implement `_find_gibmacos_asset` and `_get_gibmacos_product_folder`
to locate key files (BaseSystem.dmg, InstallAssistant.pkg, etc.)
within the `gibMacOS` download structure.
* Implement `_extract_hfs_from_dmg_or_pkg` to extract the
bootable BaseSystem HFS image from downloaded DMGs/PKGs.
* Write the extracted BaseSystem HFS image to the main USB HFS+
partition.
* Copy essential installer support files (`BaseSystem.dmg`,
`BaseSystem.chunklist`, `InstallInfo.plist`, and the main installer
PKG like `InstallAssistant.pkg`) to standard locations on the USB's
HFS+ partition to make it a more complete installer.
* Set up an OpenCore EFI on the USB's ESP by copying from a
`EFI_template_installer` directory and conditionally calling
`plist_modifier.enhance_config_plist` on its `config.plist`.
* Updated dependency checks (added `7z`, `sgdisk`; removed `qemu-img`, `kpartx`
as direct dependencies for this script's new role).
3. **Created `EFI_template_installer` Directory:**
* Established a basic directory structure for a minimal OpenCore EFI
(EFI/BOOT/BOOTx64.efi, EFI/OC/*, config-template.plist, and placeholder
files for common drivers, kexts, ACPI). This template is used by
`usb_writer_linux.py`.
**Note:**
* `usb_writer_macos.py` and `usb_writer_windows.py` have **not yet** been
refactored for this new installer-based workflow and will require
significant updates in subsequent steps.
* The logic for copying *all* necessary files to make a fully complete
macOS installer partition in `usb_writer_linux.py` (beyond BaseSystem
and key packages) is still a work-in-progress and will need further
refinement based on macOS installer structure research.
This commit lays the foundation for the new installer-centric approach as per
your recent feedback.
This commit introduces several major enhancements:
1. **Experimental `config.plist` Auto-Enhancement (Linux Host for Detection):**
* `linux_hardware_info.py`: Added audio codec detection.
* `plist_modifier.py`:
* Uses detected audio codecs for more accurate `layout-id` selection.
* Expanded mappings for Intel Alder Lake iGPUs, more audio devices, and Ethernet kexts.
* Refined NVIDIA GTX 970 `boot-args` logic based on target macOS version and iGPU presence.
* Creates a `.backup` of `config.plist` before modification and attempts restore on save failure.
* Integrated into `main_app.py` with a user-selectable experimental checkbox.
2. **Reworked `README.md`:**
* Completely rewritten for "Skyscope" branding and project vision.
* Details all current features, including platform-specific USB writing (manual Windows dd step).
* Comprehensive prerequisites, including `apfs-fuse` build dependencies for Debian.
* Updated usage guide and future enhancement plans. Version set to 0.8.2.
3. **UI/UX Enhancements for Task Progress:**
* Added a QTimer-driven text-based spinner to the status bar for active operations.
* Centralized UI state management (`_set_ui_busy`, `update_all_button_states`) for consistent feedback and control enabling/disabling.
* Refactored completion/error handling into generic slots.
4. **Improved Windows USB Writing Guidance:**
* `usb_writer_windows.py` now uses `diskpart` to fetch and display the
macOS partition number and byte offset, providing more specific details
for your manual `dd` operation.
5. **Debian 13 "Trixie" Compatibility:**
* Reviewed dependencies and updated `README.md` with specific notes for
`hfsprogs` and `apfs-fuse` installation on Debian-based systems.
This set of changes makes the application more intelligent in its OpenCore
configuration attempts, improves your feedback during operations, and provides
much more comprehensive documentation, while also advancing the capabilities
of the platform-specific USB writers.
This commit builds upon the previous cross-platform USB writer implementation
by adding an experimental feature to auto-enhance the OpenCore `config.plist`
and reviewing Debian 13 compatibility for dependencies.
Key new features and changes in this iteration:
1. **Experimental `config.plist` Auto-Enhancement:**
* Introduced `linux_hardware_info.py` to gather CPU details and PCI device
information (GPU, Audio, Ethernet) on Linux systems.
* Created `plist_modifier.py` with logic to:
* Load an existing `config.plist`.
* Apply targeted modifications based on detected Linux host hardware:
* Inject Intel iGPU `DeviceProperties` (AAPL,ig-platform-id, device-id).
* Set audio `layout-id` for common audio controllers.
* Ensure relevant Ethernet kexts are enabled.
* Implement specific boot-arg adjustments for NVIDIA GTX 970 based on the
target macOS version and presence of an iGPU (e.g., `nvda_drv=1` for
High Sierra, `nv_disable=1` for newer macOS if iGPU is primary).
* Create a backup (`config.plist.backup`) before modifying the plist.
* Integrated this feature into `main_app.py` with a UI checkbox (default off)
to enable it during the USB writing process (currently, hardware detection
for enhancement is Linux-only).
* The USB writer modules (`usb_writer_linux.py`, `usb_writer_macos.py`) now
conditionally call the plist enhancement logic.
2. **Debian 13 "Trixie" Compatibility Review:**
* Reviewed dependencies for Linux USB writing (`qemu-img`, `parted`, `kpartx`,
`rsync`, `mkfs.vfat`, `mkfs.hfsplus`, `apfs-fuse`, etc.) for expected
availability on Debian 13.
* Updated `README.md` with more specific guidance for Debian users on
installing `hfsprogs` and `apfs-fuse` (including typical build
dependencies for compiling `apfs-fuse` from source).
3. **Documentation Updates (`README.md`):**
* Updated to version 0.8.1 (Alpha).
* Added details about the new experimental `config.plist` enhancement feature,
its current limitations (Linux-only hardware detection), and user guidance.
* Incorporated notes from the Debian 13 compatibility review.
4. **Consolidated Previous Work:**
* This submission includes all prior work from this session, such as the
cross-platform USB writer shells (Linux, macOS, Windows PoC), UI/UX
enhancements (status bar, progress bar), improved Docker interaction
(explicit `docker pull`), and privilege checks.
The application now offers a more advanced, albeit experimental, capability to
tailor the OpenCore configuration, alongside its core functionality of
automating Docker-OSX VM setup and bootable USB creation.
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.
This commit introduces USB writing capabilities for Linux, macOS, and an initial
proof-of-concept for Windows. It also includes the preceding work on GUI development,
Docker orchestration, and image extraction.
Key features and changes:
1. **GUI (PyQt6):**
* I've created a user interface for macOS version selection, Docker interaction, image
extraction, USB drive selection, and operational feedback.
* I've also made platform-specific UI adjustments for USB drive identification on Windows
(manual disk number input).
2. **Docker Orchestration:**
* I've set up the system to build and run Docker-OSX commands in a separate thread.
* It now streams Docker logs to the GUI.
* It also persists containers with unique names for file access.
* And finally, it manages container lifecycle (stop/remove).
3. **Image Extraction:**
* This allows you to copy `mac_hdd_ng.img` (main OS) and `OpenCore.qcow2` (EFI)
from the Docker container to the local filesystem.
4. **USB Writing - Linux (`usb_writer_linux.py`):**
* I've refactored this to use file-level copy (`rsync`) for the main macOS system
partition, correctly handling various USB sizes.
* It uses `qemu-img`, `parted`, `kpartx`, `apfs-fuse`, `mkfs.hfsplus`, `rsync`.
* I've also automated partitioning, formatting, EFI copy, and macOS system copy.
5. **USB Writing - macOS (`usb_writer_macos.py`):**
* I've implemented this using `diskutil`, `hdiutil`, `qemu-img`, and `rsync`.
* I've also automated partitioning, formatting, EFI copy (via raw image attach and
rsync), and macOS system copy (via raw image attach and rsync).
6. **USB Writing - Windows (`usb_writer_windows.py`):**
* This is an initial implementation using `diskpart` for partitioning and EFI setup.
* It uses `qemu-img` for image conversion.
* It relies on `7z.exe` (external) for EFI file extraction from raw image and
`robocopy` for copying EFI files to USB.
* **Main macOS system image writing is currently a guided manual step**,
instructing you to use an external 'dd for Windows' utility. This
is due to the complexity of automating raw HFS+/APFS partition writing
safely on Windows without commercial filesystem drivers.
7. **Cross-Platform Integration (`main_app.py`):**
* I now dispatch to the appropriate platform-specific
writer module (Linux, macOS, Windows).
* GUI elements adapt for platform-specific needs (e.g., Windows disk ID input).
* All long-running operations are threaded with progress updates.
8. **Documentation:**
* I've created a `README.md` file, covering overview, features, prerequisites (including
OS-specific tools), usage instructions, known limitations (especially for
Windows USB writing and the macOS image sizing for `dd`), and planned
enhancements.
9. **General Structure:**
* I've organized the code into `main_app.py`, `utils.py`, `constants.py`,
`usb_writer_linux.py`, `usb_writer_macos.py`, and `usb_writer_windows.py`.
This work consolidates all development up to providing initial USB
creation capabilities across the three target platforms, with Linux and macOS
being mostly automated and Windows having a defined path with some manual
intervention required for the main system write.
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.
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.
When doing `docker build`, docker (tested with 27.0.3) prints a warning:
LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 238)
This commit fixes it by using proper syntax.
Signed-off-by: Marat Radchenko <marat@slonopotamus.org>