- Updated Makefile to include new setup commands for Android SDK and emulator management. - Revised README.md to reflect changes in setup instructions and command usage. - Introduced setup.sh script for one-time environment setup, including SDK installation and configuration. - Modified CrklAccessibilityService to implement a floating action button instead of a full-screen overlay. - Enhanced OverlayView to support toggling between button and overlay modes for gesture capture. - Adjusted accessibility service configuration to disable touch exploration mode for better user experience.
57 lines
1.5 KiB
Bash
Executable File
57 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Crkl Setup Script
|
|
# This script sets up the Android SDK and environment for Crkl development
|
|
|
|
set -e
|
|
|
|
echo "🚀 Setting up Crkl development environment..."
|
|
|
|
# Check if we're in the right directory
|
|
if [ ! -f "Makefile" ]; then
|
|
echo "❌ Error: Please run this script from the Crkl project root directory"
|
|
exit 1
|
|
fi
|
|
|
|
# Setup Android SDK
|
|
echo "📱 Setting up Android SDK..."
|
|
make setup-sdk
|
|
|
|
# Add environment variables to shell profile
|
|
SHELL_PROFILE=""
|
|
if [ -f "$HOME/.zshrc" ]; then
|
|
SHELL_PROFILE="$HOME/.zshrc"
|
|
elif [ -f "$HOME/.bashrc" ]; then
|
|
SHELL_PROFILE="$HOME/.bashrc"
|
|
fi
|
|
|
|
if [ -n "$SHELL_PROFILE" ]; then
|
|
echo "🔧 Adding environment variables to $SHELL_PROFILE..."
|
|
|
|
# Check if already added
|
|
if ! grep -q "ANDROID_HOME" "$SHELL_PROFILE"; then
|
|
echo "" >> "$SHELL_PROFILE"
|
|
echo "# Crkl Android SDK" >> "$SHELL_PROFILE"
|
|
echo "export ANDROID_HOME=\$HOME/android-sdk" >> "$SHELL_PROFILE"
|
|
echo "export PATH=\$ANDROID_HOME/platform-tools:\$PATH" >> "$SHELL_PROFILE"
|
|
echo "✓ Environment variables added to $SHELL_PROFILE"
|
|
else
|
|
echo "✓ Environment variables already present in $SHELL_PROFILE"
|
|
fi
|
|
fi
|
|
|
|
# Build the project
|
|
echo "🔨 Building Crkl APK..."
|
|
make build
|
|
|
|
echo ""
|
|
echo "✅ Setup complete!"
|
|
echo ""
|
|
echo "Next steps:"
|
|
echo "1. Connect your Android tablet/phone via USB"
|
|
echo "2. Enable Developer Options and USB Debugging on your device"
|
|
echo "3. Run: make check-device"
|
|
echo "4. Run: make install"
|
|
echo "5. Run: make run"
|
|
echo ""
|
|
echo "For help, run: make help" |