Add DMG creation script for distribution

This commit is contained in:
2026-01-31 23:51:51 +00:00
parent 246f4b0b26
commit b94235473c

98
create_dmg.sh Executable file
View File

@@ -0,0 +1,98 @@
#!/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 "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"