Working With Wheels
Contributing to Wheels macOS Installer
Contributing to Wheels macOS Installer
Section titled “Contributing to Wheels macOS Installer”Repository
Section titled “Repository”The Wheels macOS Installer is located in the main Wheels repository at tools/installer/macos/:
Development Setup
Section titled “Development Setup”Prerequisites
Section titled “Prerequisites”- macOS 10.13+ (High Sierra or later)
- Xcode Command Line Tools
- Git
- Internet connection for downloads
Initial Setup
Section titled “Initial Setup”-
Install Xcode Command Line Tools:
Terminal window xcode-select --install -
Verify Swift installation:
Terminal window swift --version# Should show Swift 5.7+ (included with Xcode CLT) -
Clone the Wheels repository:
Terminal window git clone https://github.com/wheels-dev/wheels.gitcd wheels/tools/installer/macos -
Build the installer:
Terminal window ./build-swift.sh -
Test the installer:
Terminal window open installer/wheels-installer.app
Installer Structure
Section titled “Installer Structure”tools/installer/macos/├── WheelsInstallerApp.swift # Swift GUI application├── install-wheels # Bash installation script├── Info.plist # App bundle configuration├── build-swift.sh # Build script (creates .app)├── create-dmg.sh # DMG creation script├── assets/ # App icons and resources│ └── wheels_logo.icns # Wheels Logo├── installer/ # Build output directory│ ├── wheels-installer.app # Built application│ └── wheels-installer.dmg # Distributable DMG└── README.md # Developer technical guideArchitecture Overview
Section titled “Architecture Overview”The installer uses a two-component architecture:
- Swift GUI (
WheelsInstallerApp.swift): Native macOS interface built with SwiftUI that collects user preferences - Bash Script (
install-wheels): Handles actual installation logic, downloads, and CommandBox setup - Communication: Command-line arguments and real-time output streaming coordinate between components
Parameter Flow:
UI Controls → Swift State → Command Line Arguments → Bash Script → InstallationMaking Changes
Section titled “Making Changes”After Editing Swift UI
Section titled “After Editing Swift UI”When you modify WheelsInstallerApp.swift:
# Rebuild the app./build-swift.sh
# Test your changesopen installer/wheels-installer.appAfter Editing Bash Script
Section titled “After Editing Bash Script”When you modify install-wheels:
# Option 1: Test script directly (no GUI)./install-wheels --app-name "TestApp" --template "wheels-base-template@BE"
# Option 2: Rebuild and test with GUI./build-swift.shopen installer/wheels-installer.appAfter Editing Configuration
Section titled “After Editing Configuration”When you modify Info.plist:
# Rebuild to apply changes./build-swift.sh
# Verify changesopen installer/wheels-installer.appAdding New Templates
Section titled “Adding New Templates”- Edit
WheelsInstallerApp.swift - Find the template Picker (around line 150)
- Add your template:
Picker("Template:", selection: $template) {Text("3.0.x Bleeding Edge").tag("wheels-base-template@BE")Text("Your New Template").tag("your-template-name") // Add here}
- Rebuild and test:
Terminal window ./build-swift.shopen installer/wheels-installer.app
Adding New CFML Engines
Section titled “Adding New CFML Engines”- Edit
WheelsInstallerApp.swift - Find the engine Picker (around line 160)
- Add your engine:
Picker("CFML Engine:", selection: $cfmlEngine) {Text("Lucee (Latest)").tag("lucee")Text("Your Engine").tag("your-engine") // Add here}
- Rebuild and test:
Terminal window ./build-swift.shopen installer/wheels-installer.app
Updating CommandBox Version
Section titled “Updating CommandBox Version”- Edit
install-wheels(around line 16) - Change version:
Terminal window readonly COMMANDBOX_VERSION="6.3.0" # Update here - Rebuild:
Terminal window ./build-swift.sh
Updating Java Version
Section titled “Updating Java Version”- Edit
install-wheels(around line 17) - Change version:
Terminal window readonly MINIMUM_JAVA_VERSION=21 # Update here - Rebuild:
Terminal window ./build-swift.sh
Modifying Installation Logic
Section titled “Modifying Installation Logic”- Edit functions in
install-wheelsscript - Maintain consistent logging format:
[HH:MM:SS] LEVEL: Message - Use logging functions:
log_info(),log_success(),log_error() - Test script directly before embedding in app
Testing Your Changes
Section titled “Testing Your Changes”Quick Test (Script Only)
Section titled “Quick Test (Script Only)”./install-wheels \ --app-name "TestApp" \ --template "wheels-base-template@BE" \ --engine "lucee"Full Test (With GUI)
Section titled “Full Test (With GUI)”# Build./build-swift.sh
# Runopen installer/wheels-installer.app
# Monitor logs in another terminaltail -f /tmp/wheels-installation.logTest on Different macOS Versions
Section titled “Test on Different macOS Versions”Recommended test matrix:
- macOS 11 (Big Sur)
- macOS 12 (Monterey)
- macOS 13 (Ventura)
- macOS 14 (Sonoma)
Test on both architectures:
- Intel Mac
- Apple Silicon Mac (M1/M2/M3)
Edge Case Testing
Section titled “Edge Case Testing”- Existing CommandBox installation
- Network connectivity issues
- Limited user permissions
- Installation cancellation
- Java version compatibility
- Port 8080 already in use
Code Quality Standards
Section titled “Code Quality Standards”Swift Guidelines
Section titled “Swift Guidelines”- Use
@Statefor UI state management - Keep UI declarative with SwiftUI
- Handle errors gracefully with try/catch
- Use
DispatchQueuefor background work - Maintain separation between UI and business logic
Bash Guidelines
Section titled “Bash Guidelines”- Use strict mode:
set -eandset -u - Quote all variables:
"$VARIABLE" - Use
readonlyfor constants - Use
[[instead of[for conditionals - Maintain consistent logging format
- Use functions for reusability
Logging Standards
Section titled “Logging Standards”log_info "Starting operation..."log_success "Operation completed successfully"log_error "Operation failed"log_section "MAJOR STEP HEADING"Building and Packaging
Section titled “Building and Packaging”Build for Testing
Section titled “Build for Testing”# Build the .app./build-swift.sh
# Test locallyopen installer/wheels-installer.appBuild for Distribution
Section titled “Build for Distribution”# 1. Update version in Info.plist# Edit CFBundleShortVersionString
# 2. Build the .app./build-swift.sh
# 3. Create DMG./create-dmg.sh
# 4. Test DMGopen installer/wheels-installer.dmg
# 5. DMG ready at: installer/wheels-installer.dmgVersion Management
Section titled “Version Management”Update version in Info.plist:
<key>CFBundleShortVersionString</key><string>1.0.0</string>Contributing Process
Section titled “Contributing Process”Follow the standard Wheels contribution process:
- Open an Issue: Before making changes, open an issue in the issue tracker describing your proposed changes
- Get Approval: Wait for core team approval before starting development
- Fork and Branch: Create a feature branch from
develop - Make Changes: Implement your changes following the guidelines above
- Test Thoroughly: Test on multiple macOS versions and architectures
- Submit Pull Request: Create a pull request to the
developbranch, before creating a PR, please also review Contributing to Wheels and Submitting Pull Requests guide - Code Review: Address any feedback from the core team
Pull Request Guidelines
Section titled “Pull Request Guidelines”- Reference the issue number in your PR description
- Include clear commit messages describing changes
- Test installer on both Intel and Apple Silicon if possible
- Update documentation for user-facing changes
- Ensure no breaking changes without proper consideration
Reporting Issues
Section titled “Reporting Issues”Found a bug or have a feature request for the macOS installer?
When reporting installer-specific issues, please include:
- macOS version (e.g., macOS 14.1)
- Mac architecture (Intel or Apple Silicon)
- Swift version (
swift --version) - Installation log file (
/tmp/wheels-installation.log) - Steps to reproduce the issue
- Expected vs. actual behavior
- Any error messages or screenshots
Debugging
Section titled “Debugging”View Installation Logs
Section titled “View Installation Logs”# View full logcat /tmp/wheels-installation.log
# View recent entriestail -n 50 /tmp/wheels-installation.log
# Watch log in real-timetail -f /tmp/wheels-installation.log
# Search for errorsgrep "ERROR" /tmp/wheels-installation.logDebug Mode
Section titled “Debug Mode”Enable debug mode in install-wheels:
# Add at top of scriptset -x # Shows each command as it runsTest Script Without GUI
Section titled “Test Script Without GUI”# Run script directly with parameters./install-wheels \ --app-name "DebugTest" \ --template "wheels-base-template@BE" \ --engine "lucee" \ --use-bootstrapCommon Issues
Section titled “Common Issues”- Build fails: Ensure Xcode Command Line Tools are installed (
xcode-select --install) - App won’t open: Remove quarantine attribute (
xattr -d com.apple.quarantine installer/wheels-installer.app) - Script changes not working: Remember to rebuild after script changes (
./build-swift.sh) - Installation fails: Check logs at
/tmp/wheels-installation.log
Code Signing & Notarization
Section titled “Code Signing & Notarization”For public distribution, you need:
- Apple Developer Account ($99/year)
- Developer ID Certificate
- App Store Connect API key (for notarization)
Code Signing
Section titled “Code Signing”# Sign the appcodesign --deep --force --verify --verbose \ --sign "Developer ID Application: Your Name (TEAM_ID)" \ installer/wheels-installer.app
# Verify signaturecodesign --verify --verbose installer/wheels-installer.appNotarization
Section titled “Notarization”# 1. Create ZIP for notarizationditto -c -k --keepParent installer/wheels-installer.app wheels-installer.zip
# 2. Submit for notarizationxcrun notarytool submit wheels-installer.zip \ --apple-id "your@email.com" \ --team-id "TEAM_ID" \ --password "app-specific-password" \ --wait
# 3. Staple notarization ticketxcrun stapler staple installer/wheels-installer.app
# 4. Create DMG./create-dmg.sh
# 5. Notarize DMGxcrun notarytool submit installer/wheels-installer.dmg \ --apple-id "your@email.com" \ --team-id "TEAM_ID" \ --password "app-specific-password" \ --wait
# 6. Staple ticket to DMGxcrun stapler staple installer/wheels-installer.dmgRelease Process
Section titled “Release Process”Installer releases follow the main Wheels release cycle:
- Changes are merged to
developbranch - During Wheels release preparation, installer version is updated
- Installer is built and tested on multiple macOS systems
- DMG is created and code signed/notarized
- Final DMG is included in release assets
- Installation instructions updated in main documentation
Support
Section titled “Support”For help with installer development:
- Community Discussions - Ask questions and share ideas
- Issue Tracker - Report bugs and request features
- Wheels Documentation - Complete framework documentation
Remember: Always rebuild with ./build-swift.sh after making any code changes!