-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlaunch_with_diagnostics.command
More file actions
executable file
·91 lines (76 loc) · 2.72 KB
/
launch_with_diagnostics.command
File metadata and controls
executable file
·91 lines (76 loc) · 2.72 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
85
86
87
88
89
90
91
#!/bin/bash
# Alternative launcher that may help with permission issues
# This runs the app in a way that may inherit better permissions
# Get the directory where this script is located
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Change to the script directory
cd "$SCRIPT_DIR"
echo "=== Meeting Secretary AI Launcher ==="
echo "Working directory: $SCRIPT_DIR"
# Check for required files
if [ ! -f "meeting_secretary_gui.py" ]; then
echo "ERROR: meeting_secretary_gui.py not found"
read -p "Press Enter to exit..."
exit 1
fi
# Check conda installation
if ! command -v conda &> /dev/null; then
echo "ERROR: conda not found in PATH"
echo "Please install conda/miniconda first"
read -p "Press Enter to exit..."
exit 1
fi
# Initialize conda
echo "Initializing conda environment..."
source "$(conda info --base)/etc/profile.d/conda.sh"
# Check if environment exists
if ! conda env list | grep -q "meetingsecretaryai_env"; then
echo "ERROR: Environment 'meetingsecretaryai_env' not found"
echo "Please create it with: conda create -n meetingsecretaryai_env python=3.9"
read -p "Press Enter to exit..."
exit 1
fi
# Activate environment
echo "Activating environment: meetingsecretaryai_env"
conda activate meetingsecretaryai_env
if [ $? -ne 0 ]; then
echo "ERROR: Failed to activate environment"
read -p "Press Enter to exit..."
exit 1
fi
# Check Python and required modules
echo "Checking Python environment..."
# Use `conda run` to ensure we use the env attached to this conda install
# (avoids hard-coded env paths and activation edge cases when double-clicking .command)
conda run -n meetingsecretaryai_env python -c "import tkinter; print('✓ tkinter available')" 2>/dev/null
if [ $? -ne 0 ]; then
echo "ERROR: tkinter not available"
read -p "Press Enter to exit..."
exit 1
fi
# Test Documents folder access
echo "Testing Documents folder access..."
if [ -d "$HOME/Documents/Zoom" ]; then
if ls "$HOME/Documents/Zoom" > /dev/null 2>&1; then
echo "✓ Documents folder access: OK"
else
echo "⚠ Documents folder access: Limited (app will still work)"
echo " To fix: System Preferences > Security & Privacy > Files and Folders"
echo " Grant Terminal access to Documents folder"
fi
else
echo "⚠ Zoom folder not found (app will still work)"
fi
echo ""
echo "Starting Meeting Secretary AI..."
echo "================================"
# Launch the application
conda run -n meetingsecretaryai_env python meeting_secretary_gui.py
exit_code=$?
echo ""
if [ $exit_code -eq 0 ]; then
echo "Meeting Secretary AI closed normally."
else
echo "Meeting Secretary AI closed with error code: $exit_code"
read -p "Press Enter to exit..."
fi