-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_mac.sh
More file actions
executable file
·84 lines (73 loc) · 2.29 KB
/
setup_mac.sh
File metadata and controls
executable file
·84 lines (73 loc) · 2.29 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/bash
# Mac setup script for TD Launcher Plus development
# Installs Python dependencies and prepares build environment
set -e
echo "Setting up TD Launcher Plus development environment for Mac..."
echo "=" * 60
# Check Python version
echo "Checking Python installation..."
if command -v python3 &> /dev/null; then
PYTHON_VERSION=$(python3 --version)
echo "✅ Found: $PYTHON_VERSION"
else
echo "❌ Python 3 not found. Please install Python 3.8+ from python.org"
exit 1
fi
# Check if we're in a virtual environment (recommended)
if [[ "$VIRTUAL_ENV" != "" ]]; then
echo "✅ Virtual environment detected: $VIRTUAL_ENV"
else
echo "⚠️ No virtual environment detected."
echo " Consider creating one with: python3 -m venv td_launcher_env"
echo " Then activate it with: source td_launcher_env/bin/activate"
echo ""
read -p "Continue anyway? (y/n): " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
echo "Setup cancelled."
exit 1
fi
fi
# Install Python dependencies
echo ""
echo "Installing Python dependencies..."
pip3 install -r requirements.txt
# Make build scripts executable
echo ""
echo "Making build scripts executable..."
chmod +x BUILD_mac.sh
chmod +x BUILD_mac_simple.sh
chmod +x td_launcher.sh
# Check for optional tools
echo ""
echo "Checking optional tools..."
if command -v create-dmg &> /dev/null; then
echo "✅ create-dmg found (DMG creation available)"
else
echo "⚠️ create-dmg not found (optional for DMG creation)"
echo " Install with: brew install create-dmg"
fi
if command -v brew &> /dev/null; then
echo "✅ Homebrew found"
else
echo "⚠️ Homebrew not found (recommended for Mac development)"
echo " Install from: https://brew.sh"
fi
# Test the basic functionality
echo ""
echo "Testing basic functionality..."
if python3 -c "import dearpygui, platform, plistlib, glob; print('✅ All imports successful')" 2>/dev/null; then
echo "✅ All Python dependencies working"
else
echo "❌ Some Python dependencies failed to import"
exit 1
fi
echo ""
echo "🎉 Setup completed successfully!"
echo ""
echo "Next steps:"
echo "1. Test the launcher: ./td_launcher.sh"
echo "2. Build the app: ./BUILD_mac_simple.sh"
echo "3. For distribution: ./BUILD_mac.sh"
echo ""
echo "Happy coding! 🚀"