#!/bin/bash # # Portfolio Manager - Launcher Script # Double-click this file to launch the application # # Get script directory SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" cd "$SCRIPT_DIR" # Activate virtual environment if [ -d ".venv" ]; then source .venv/bin/activate else echo "Error: Virtual environment not found!" echo "Please run: python3 -m venv .venv && source .venv/bin/activate && pip install -r requirements.txt" read -p "Press Enter to exit..." exit 1 fi # Check if dependencies are installed if ! python -c "import PyQt6" 2>/dev/null; then echo "Error: PyQt6 not installed!" echo "Please run: pip install -r requirements.txt" read -p "Press Enter to exit..." exit 1 fi # Launch application echo "Starting Portfolio Manager..." python main.py # Keep terminal open if error occurs if [ $? -ne 0 ]; then echo "" echo "Application exited with error code $?" read -p "Press Enter to exit..." fi