-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopen.command
More file actions
executable file
·37 lines (30 loc) · 1022 Bytes
/
open.command
File metadata and controls
executable file
·37 lines (30 loc) · 1022 Bytes
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
#!/bin/bash
# Simple Converter script for PNG to ICNS Converter
# This script can be used as an alternative to a compiled .app bundle
# Get the directory where this script is located
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Change to the script directory
cd "$SCRIPT_DIR"
# Check if requirements.txt exists and install dependencies if needed
if [ -f "requirements.txt" ]; then
echo "Checking dependencies..."
python3.13 -c "import PIL" 2>/dev/null || {
echo "Installing required dependencies..."
pip3.13 install -r requirements.txt
}
fi
# Run the Python application
echo "Starting PNG to ICNS Converter..."
echo ""
python3.13 Converter.py
# Check if the command was successful
if [ $? -eq 0 ]; then
echo "Application closed successfully."
else
echo "Application failed to start."
echo "Please make sure you have Python 3 and Pillow installed:"
echo "pip3 install -r requirements.txt"
echo ""
echo "Press any key to exit..."
read -n 1 -s
fi