-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
56 lines (41 loc) · 1.5 KB
/
setup.sh
File metadata and controls
56 lines (41 loc) · 1.5 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
#!/bin/bash
# Update and upgrade the package list
echo "Updating and upgrading the package list..."
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt full-upgrade -y
# Install Python3 and pip if not already installed
echo "Installing Python3 and pip..."
sudo apt-get install python3 -y
sudo apt-get install python3-pip -y
# Install Tkinter
echo "Installing Tkinter..."
sudo apt-get install python3-tk -y
# Install required Python libraries
echo "Installing required Python libraries..."
pip3 install ttkthemes pillow --break-system-packages
# Install imageTK
echo "Installing imageTK..."
sudo apt-get install python3-pil python3-pil.imagetk -y
echo "All necessary libraries and dependencies have been installed."
# Get the directory where the script is located
SCRIPT_DIR="$(dirname "$(realpath "$0")")"
echo "Creating desktop shortcut..."
# Define the source and destination paths
SOURCE_FILE="$SCRIPT_DIR/MECSware_Interface.desktop"
DESTINATION_DIR="/home/pi/Desktop"
# Check if the source file exists
if [ -f "$SOURCE_FILE" ]; then
# Copy the file to the destination directory
cp "$SOURCE_FILE" "$DESTINATION_DIR"
echo "MECSware_Interface.desktop has been copied to $DESTINATION_DIR"
else
echo "MECSware_Interface.desktop not found in $SCRIPT_DIR"
fi
chmod +x /home/pi/Desktop/MECSware_Interface.desktop
# Display a message to indicate completion
echo "Setup is complete. You can now run your Python script."
# make the script executable
# 1. chmod +x setup.sh
# Execute the scrip
# 2. ./setup.sh