Repository navigation
Expand file tree
/
Copy pathinstall_mac.command
More file actions
63 lines (51 loc) · 2.1 KB
/
Copy pathinstall_mac.command
File metadata and controls
63 lines (51 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/env bash
# ==============================================================================
# ApexClash Pro — macOS 1-Click Installer (Double-Clickable in Finder)
# ==============================================================================
set -e
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
cd "$SCRIPT_DIR"
echo "======================================================="
echo " ⚡ ApexClash Pro — macOS 1-Click Setup"
echo "======================================================="
# Check Python 3
if ! command -v python3 >/dev/null 2>&1; then
echo "[!] Python 3 was not found on your Mac."
echo "[*] Opening Python download page..."
open "https://www.python.org/downloads/"
read -p "Press [Enter] once Python is installed..."
fi
# Optional Homebrew setup for Tesseract OCR
if command -v brew >/dev/null 2>&1; then
echo "[*] Homebrew detected. Ensuring Tesseract OCR is installed..."
brew install tesseract || true
else
echo "[*] Tip: Install Homebrew (https://brew.sh) and run 'brew install tesseract' for optimal OCR accuracy."
fi
# Create Virtual Environment
VENV_DIR="$SCRIPT_DIR/.venv"
if [ ! -d "$VENV_DIR" ]; then
echo "[*] Creating virtual environment at $VENV_DIR..."
python3 -m venv "$VENV_DIR"
fi
# Activate & Install requirements
source "$VENV_DIR/bin/activate"
echo "[*] Upgrading pip & wheel..."
pip install --upgrade pip wheel setuptools --quiet
echo "[*] Installing dependencies from requirements.txt..."
pip install -r requirements.txt
# Grant executable permissions
chmod +x "$SCRIPT_DIR/start_mac.command" 2>/dev/null || true
chmod +x "$SCRIPT_DIR/install_mac.command" 2>/dev/null || true
echo ""
echo "======================================================="
echo " ✅ Installation Complete!"
echo "======================================================="
echo "You can launch ApexClash Pro at any time by simply"
echo "double-clicking 'start_mac.command' in Finder!"
echo "======================================================="
echo ""
if [ "$1" != "--no-run" ]; then
echo "[*] Starting ApexClash Pro..."
exec "$SCRIPT_DIR/start_mac.command"
fi