ref: Move creation logic to standalone script, add legacy macOS support

Move macOS installer image creation logic from GitHub workflow file
to a dedicated shell script `mkmaciso` for better maintainability and reusability.

Changes:
- Add support for legacy macOS versions:
  - 10.7 (Lion)
  - 10.8 (Mountain Lion)
  - 10.9 (Mavericks)
  - 10.10 (Yosemite)
  - 10.11 (El Capitan)
  - 10.12 (Sierra)
- Simplify workflow to call external script
- Enable running `mkmaciso` locally without GitHub Actions
This commit is contained in:
LongQT-sea committed 2025-12-15 20:54:45 +07:00
1 parent 9aafaf8527
commit 828b53128d
4 files changed
+1347 -271

No files matched your search

+19 -15
View File
@@ -1,20 +1,24 @@
## macOS Installer Image Builder – No Mac Required
## Build macOS Installer ISO and DMG image via Github Action – No Mac Required
* Generate bootable macOS installer images directly from Apple's servers via GitHub Actions.
* Support **macOS 10.7 Lion** through **macOS 26 Tahoe** installers.
* Download macOS installers exclusively from official Apple sources.
* Includes intelligent file size optimization to produce the smallest possible installer images.
**Supported formats:**
* **ISO** – True DVD format compatible with **Proxmox VE**, **QEMU**, **VirtualBox**, and **VMware**
* **DMG** – Create bootable macOS installer USB drives on Windows with [Rufus](https://rufus.ie/en/#download) or on Linux with **`dd`**
* **ISO** – True DVD/CD format compatible with **Proxmox VE**, **QEMU**, **VirtualBox**, and **VMware**
* **DMG** – For create bootable macOS installer USB drives on Windows with [Rufus](https://rufus.ie/en/#download) or on Linux with **`dd`**
**Available workflows:**
* **macOS Recovery ISO (Recommended)** – Lightweight recovery image (build takes ~2-5 min) • Best for virtualization
* **macOS Full Installer** – Complete offline installer (build takes ~20-60 min, 5-18GB) • Best for offline use
* **Recovery ISO (Recommended)** – Lightweight recovery image (build takes ~2-5 min) • Best for virtualization
* **Full Installer** – Complete offline installer (build takes ~10-60 min, 5-18GB) • Best for offline use
> [!IMPORTANT]
> * Use the **"Build macOS Recovery ISO image"** workflow unless you really need an offline installer.
> * GitHub-hosted runners are a free public resource — please use them responsibly.
> * Already have a macOS VM? Build macOS Installer ISO inside your VM with [Create_macOS_ISO.command](https://github.com/LongQT-sea/OpenCore-ISO/blob/main/Create_macOS_ISO.command)
> * Already have macOS? Build macOS installer ISO/DMG image with this command (replace tahoe with the desired version):
> ```
> curl -L https://raw.githubusercontent.com/LongQT-sea/macos-iso-builder/main/mkmaciso | bash -s tahoe
> ```
---
@@ -22,17 +26,17 @@
1. **Fork** this repository.
2. Go to the **Actions** tab in your forked repository.
3. Click the green **"I understand my workflows, go ahead and enable them"** button.
4. Select the **"Build macOS Installer ISO/DMG image"** or **"Build macOS Recovery ISO image"** workflow.
3. Click the green button **"I understand my workflows, go ahead and enable them"**.
4. Select the **"Build macOS Installer ISO/DMG image"** or **"Build macOS Recovery ISO image"** workflow from the left sidebar..
5. Click the **"Run workflow"** button.
6. Configure the workflow inputs:
* **macOS version** – Choose a version (*Sequoia*, *Sonoma*, etc.).
* **Image format** – Choose `iso` for virtual machines or `dmg` for bootable USB drives.
7. Click the green **"Run workflow"** button to start the build.
8. Wait for the workflow to complete (this may take 20-60 minutes).
8. Wait for the workflow to complete (this may take 10-60 minutes).
9. Open the completed workflow run and scroll to the **Artifacts** section.
10. Download the artifact (e.g., `macOS-Sequoia-15.7.2-ISO`).
10. Download the artifact (e.g., `macOS_Sequoia_15.7.3.iso`).
> [!TIP]
> Enable [Cloudflare WARP](https://one.one.one.one/) for faster downloads.
11. Extract the ZIP file to get your `.iso` or `.dmg` file.
@@ -42,12 +46,12 @@
> [!TIP]
> To create a bootable macOS installer USB drive on Windows:
> 1. Open [Rufus](https://rufus.ie/en/#download)
> 2. Click **SELECT**, change the filter to **"All files"**, then select your `.dmg`
> 2. Click **SELECT**, change the filter to **"All files"**, then select your macOS `.dmg`
> 3. Click **START**
> 4. Optional: After flashing the `dmg` image to the USB drive with Rufus, there will be free/unallocated space remaining on the USB drive. Use Disk Management to create a new FAT32 partition and place your EFI there if needed.
> 4. Optional: After flashing the `dmg` image to the USB drive, there will be free/unallocated space remaining on the USB drive. Use Disk Management to create a new FAT32 partition and place your EFI folder there if needed.
> [!NOTE]
> By default, artifacts are kept for 5 days. You can change this in the workflow YAML file.
> By default, artifacts are kept for 7 days. You can change this in the workflow YAML file.
> [!TIP]
> * For best performance, use a macOS VM on **Proxmox VE** with iGPU or dGPU passthrough.
@@ -57,4 +61,4 @@
---
## Legal Notice
This tool downloads macOS images directly from Apple's servers. Users are responsible for complying with Apple's Software License Agreement.
This tool downloads macOS images directly from Apple's servers. Users are responsible for complying with Apple's Software License Agreement.