-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
48 lines (37 loc) · 1013 Bytes
/
Copy pathmain.py
File metadata and controls
48 lines (37 loc) · 1013 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
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env python3
"""
ConvertImagesToWebP - MacAlpha v0.1
Main entry point for the macOS GUI application.
"""
import sys
from pathlib import Path
# Ensure the app directory is in the path
APP_DIR = Path(__file__).parent.resolve()
sys.path.insert(0, str(APP_DIR))
# Check dependencies before importing
def check_dependencies():
"""Check and report missing dependencies."""
missing = []
try:
import customtkinter
except ImportError:
missing.append("customtkinter")
try:
from PIL import Image
except ImportError:
missing.append("Pillow")
try:
import piexif
except ImportError:
missing.append("piexif")
if missing:
print("❌ Missing dependencies:")
for pkg in missing:
print(f" - {pkg}")
print("\nInstall with:")
print(f" pip install {' '.join(missing)}")
sys.exit(1)
if __name__ == "__main__":
check_dependencies()
from gui.app import main
main()