-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.sh
More file actions
60 lines (48 loc) · 1.55 KB
/
setup.sh
File metadata and controls
60 lines (48 loc) · 1.55 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
#!/bin/bash
# Computer Security Project Setup Script
# This script sets up the development environment for the RSA Key Management System
echo "🔐 Computer Security Project - Setup Script"
echo "============================================"
# Check if Python 3 is installed
if ! command -v python3 &> /dev/null; then
echo "❌ Python 3 is not installed. Please install Python 3.8 or later."
exit 1
fi
echo "✅ Python 3 found: $(python3 --version)"
# Check if pip is installed
if ! command -v pip3 &> /dev/null; then
echo "❌ pip3 is not installed. Please install pip3."
exit 1
fi
echo "✅ pip3 found"
# Install system dependencies for Ubuntu/Debian
if command -v apt &> /dev/null; then
echo "🔧 Installing system dependencies (tkinter)..."
sudo apt update
sudo apt install -y python3-tk
echo "✅ System dependencies installed"
fi
# Create virtual environment
echo "🔧 Creating virtual environment..."
python3 -m venv venv
# Activate virtual environment
echo "🔧 Activating virtual environment..."
source venv/bin/activate
# Upgrade pip
echo "🔧 Upgrading pip..."
pip install --upgrade pip
# Install Python dependencies
echo "🔧 Installing Python dependencies..."
pip install -r requirements-minimal.txt
echo ""
echo "🎉 Setup completed successfully!"
echo ""
echo "To run the application:"
echo "1. Activate the virtual environment: source venv/bin/activate"
echo "2. Run the application: python3 main.py"
echo ""
echo "To run tests:"
echo "python3 test_rsa.py"
echo ""
echo "To deactivate virtual environment:"
echo "deactivate"