Skip to content

Conversation

@startergo
Copy link
Contributor

New Swift Interactive Application:

  • createinstalliso-interactive.swift: Menu-based GUI for ISO creation
    • Auto-discovers macOS installers in /Applications
    • Visual configuration and validation
    • Supports all installer types (10.7-26)
    • Write ISO to USB Drive feature (menu option 7)
    • Debug mode with --debug/-d flag
  • CreateInstallISO-Sudo.applescript: Sudo-enabled app launcher
  • BUILD.md: Build and compilation instructions
  • README-SWIFT-INTERACTIVE.md: Complete user documentation
  • .gitignore: Exclude compiled binaries and app bundles

Bash Script Enhancements:

  • Add g_nointeraction_mode for conditional execution
  • Direct execution path for Swift app (prevents suspension)
  • Preserve output parsing for interactive terminal use
  • Fix sudo user home directory detection with SUDO_USER

New Swift Interactive Application:
- createinstalliso-interactive.swift: Menu-based GUI for ISO creation
  * Auto-discovers macOS installers in /Applications
  * Visual configuration and validation
  * Supports all installer types (10.7-26)
  * Write ISO to USB Drive feature (menu option 7)
  * Debug mode with --debug/-d flag
- CreateInstallISO-Sudo.applescript: Sudo-enabled app launcher
- BUILD.md: Build and compilation instructions
- README-SWIFT-INTERACTIVE.md: Complete user documentation
- .gitignore: Exclude compiled binaries and app bundles

Bash Script Enhancements:
- Add g_nointeraction_mode for conditional execution
- Direct execution path for Swift app (prevents suspension)
- Preserve output parsing for interactive terminal use
- Fix sudo user home directory detection with SUDO_USER
Copilot AI review requested due to automatic review settings November 29, 2025 22:49
Copilot finished reviewing on behalf of startergo November 29, 2025 22:54
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new Swift-based interactive menu interface for creating macOS installer ISOs, providing a user-friendly alternative to the command-line bash script. The Swift application auto-discovers installers, guides users through configuration with visual feedback, and includes a bonus USB writing feature. The bash script is enhanced to support direct execution from non-interactive contexts (preventing process suspension when called from the Swift app) while preserving output parsing for interactive terminal use. Additionally, sudo user home directory detection is improved to correctly resolve user directories when running with elevated privileges.

Key Changes:

  • New Swift interactive application with menu-driven UI supporting all installer types (macOS 10.7-15+)
  • Bash script conditional execution modes (g_nointeraction_mode) to prevent terminal suspension from Swift app
  • Enhanced sudo user home directory detection using SUDO_USER environment variable

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 15 comments.

Show a summary per file
File Description
createinstalliso-interactive.swift New 970-line Swift menu application with installer discovery, configuration validation, ISO creation wrapper, and USB writing functionality
createinstalliso Added g_nointeraction_mode flag and conditional execution paths in create_install_media() and create_iso_image() to support direct execution from Swift app
CreateInstallISO-Sudo.applescript AppleScript launcher that opens Terminal with sudo privileges for the Swift binary
BUILD.md Build instructions for compiling Swift binary and creating app bundle
README-SWIFT-INTERACTIVE.md Comprehensive 508-line user documentation with quick start, troubleshooting, and examples
.gitignore Excludes compiled binaries, app bundles, and build artifacts from version control

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

startergo and others added 6 commits November 29, 2025 18:29
- Add root privilege check at start of writeISOToUSB()
- Remove unsupported status=progress from BSD dd command
- Remove redundant sudo (already running as root)
- Use direct dd execution instead of shell wrapper
- Clarify ISO naming behavior in setISOName()
- Show that custom names will be applied after creation
@startergo startergo requested a review from Copilot November 29, 2025 23:56
Copilot finished reviewing on behalf of startergo November 29, 2025 23:58
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated 7 comments.

Comments suppressed due to low confidence (1)

README-SWIFT-INTERACTIVE.md:1

  • Version number inconsistency: macOS Tahoe is listed as version '26' but should be version '16' based on Apple's numbering scheme. Version 26 would be over a decade in the future. This appears in multiple places (lines 46, 64, 293, 548).
# createinstalliso - Interactive Swift Version

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

startergo and others added 5 commits November 29, 2025 19:04
- Remove redundant getRealUserHomeDirectory() calls in selectOutputDirectory()
- Implement ISO renaming after successful creation
- Add patchSierra and replaceSignatures flags to bash script command
- Remove unused ddCommand variable in writeISOToUSB()
- Update comments to reflect actual behavior
@startergo startergo requested a review from Copilot November 30, 2025 00:11
Copilot finished reviewing on behalf of startergo November 30, 2025 00:16
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

startergo and others added 4 commits November 29, 2025 19:18
Add missing function to check if a disk is external/removable.
Uses diskutil info to inspect disk properties for:
- Removable media indicator
- USB/Thunderbolt protocol
- External device location
- Internal/external status

Fixes compilation error from undefined function call.
Copilot finished reviewing on behalf of startergo November 30, 2025 00:30
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated 16 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

startergo and others added 10 commits November 29, 2025 19:36
- Add clear documentation of bash script naming assumption
- Check if target file already exists before rename
- Validate default ISO exists before attempting rename
- Provide helpful feedback when expected ISO not found
- List any ISO files found in output directory on error
- Give user clear information about where ISO is located
@startergo startergo requested a review from Copilot November 30, 2025 00:43
Copilot finished reviewing on behalf of startergo November 30, 2025 00:46
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@startergo startergo requested a review from Copilot November 30, 2025 00:51
Copilot finished reviewing on behalf of startergo November 30, 2025 00:54
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

startergo and others added 3 commits November 29, 2025 19:56
The bash script only supports: --isodirectory, --applicationpath, --nointeraction

Removed non-existent options and renumbered menu:
- Removed Option 4: Patch Sierra and Option 5: Replace Signatures
- New numbering: 4=Create ISO, 5=USB Writer, 6=Info, 7=Help, 0=Exit
- Removed unused config properties and toggle functions
- Fixed unrecognized option error
@BITespresso
Copy link
Owner

Hello @startergo,

thank you very much for your contribution to this project and for the effort and quality you put into this pull request. I was really happy to see this level of dedication 😄.

I completely understand that some users might prefer a UI over a purely command-line interface. My concern, though, is that introducing a Swift-based solution that requires compilation could make the tool more complex to use.

My current thought would be to take the functionality you added in the Swift version and integrate it directly into the Bash script. This would keep the tool simple to use without any additional build or installation steps.

What do you think about pursuing this approach?

Best regards,
Michael

@startergo
Copy link
Contributor Author

Hello @startergo,

thank you very much for your contribution to this project and for the effort and quality you put into this pull request. I was really happy to see this level of dedication 😄.

I completely understand that some users might prefer a UI over a purely command-line interface. My concern, though, is that introducing a Swift-based solution that requires compilation could make the tool more complex to use.

My current thought would be to take the functionality you added in the Swift version and integrate it directly into the Bash script. This would keep the tool simple to use without any additional build or installation steps.

What do you think about pursuing this approach?

Best regards, Michael

Thanks Michael
Would you like me to :

  1. Create a new PR with bash-only implementation?
  2. Add an --interactive flag to the existing bash script?
  3. Or close this PR and discuss the approach first?

The key enhancements would be:

  • Interactive mode with menus (similar to dialog/whiptail)
  • Auto-discovery of installers
  • USB writing capability
  • Better progress feedback

Let me know what approach you prefer!
If you don't mind can you do the actual signing of the binary?
For the app to be signed and distributed, either:

  1. You would need to compile and sign it
  2. Or distribute it unsigned and users get Gatekeeper warnings
  3. Or users compile it themselves (gets adhoc signature, but still warnings)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants