#!/bin/bash echo "๐Ÿ“ฆ Creating DMG installer..." # Build the app first ./build.sh # Variables APP_NAME="EnhancedTerminal" VERSION="3.0" DMG_NAME="${APP_NAME}-v${VERSION}" DMG_TEMP="${DMG_NAME}-temp" DMG_FINAL="${DMG_NAME}.dmg" VOLUME_NAME="${APP_NAME} ${VERSION}" # Clean up any existing DMG files rm -f "${DMG_FINAL}" rm -rf "${DMG_TEMP}" # Create temporary DMG folder mkdir -p "${DMG_TEMP}" # Copy the app echo "๐Ÿ“‹ Copying application..." cp -R "${APP_NAME}.app" "${DMG_TEMP}/" # Create Applications symlink echo "๐Ÿ”— Creating Applications symlink..." ln -s /Applications "${DMG_TEMP}/Applications" # Copy documentation echo "๐Ÿ“„ Copying documentation..." mkdir -p "${DMG_TEMP}/Documentation" cp README.md "${DMG_TEMP}/Documentation/" cp USAGE_GUIDE.md "${DMG_TEMP}/Documentation/" cp QUICK_REFERENCE.md "${DMG_TEMP}/Documentation/" # Create a README for the DMG cat > "${DMG_TEMP}/README.txt" << 'EOF' Enhanced Terminal v3.0 ====================== Installation: 1. Drag "EnhancedTerminal.app" to the "Applications" folder 2. Open Applications folder and right-click EnhancedTerminal 3. Select "Open" (first time only, due to macOS security) 4. Enjoy your enhanced terminal! Documentation: - See the Documentation folder for detailed guides - Press Cmd+? in the app for keyboard shortcuts - Type 'help' in the terminal for quick reference Features: โœ“ Multiple tabs with session persistence โœ“ Split panes (vertical/horizontal) โœ“ AI command generation (OpenAI/Ollama) โœ“ Command snippets with categories โœ“ Command history search (fuzzy) โœ“ Auto-suggestions from history โœ“ Command aliases โœ“ Multiple themes โœ“ Copy-on-select โœ“ Middle-click paste โœ“ Visual bell โœ“ Clickable URLs โœ“ Zoom pane โœ“ And much more! For support or issues, check the documentation. EOF # Create the DMG echo "๐Ÿ’ฟ Creating DMG image..." hdiutil create -volname "${VOLUME_NAME}" \ -srcfolder "${DMG_TEMP}" \ -ov -format UDZO \ "${DMG_FINAL}" # Clean up echo "๐Ÿงน Cleaning up..." rm -rf "${DMG_TEMP}" # Get file size DMG_SIZE=$(du -h "${DMG_FINAL}" | cut -f1) echo "" echo "โœ… DMG created successfully!" echo "โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”" echo "๐Ÿ“ฆ File: ${DMG_FINAL}" echo "๐Ÿ’พ Size: ${DMG_SIZE}" echo "" echo "To test the DMG:" echo " open ${DMG_FINAL}" echo "" echo "To distribute:" echo " Share the ${DMG_FINAL} file" echo "โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”"