-
Notifications
You must be signed in to change notification settings - Fork 10
Add Swift interactive version with menu-driven UI #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
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
There was a problem hiding this 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_USERenvironment 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.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
- 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
There was a problem hiding this 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.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
- 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
There was a problem hiding this 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.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
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.
There was a problem hiding this 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.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
- 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
There was a problem hiding this 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.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this 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.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
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
|
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, |
Thanks Michael
The key enhancements would be:
Let me know what approach you prefer!
|
New Swift Interactive Application:
Bash Script Enhancements: