forked from saschaludwig/OnAirScreen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (29 loc) · 1.24 KB
/
Makefile
File metadata and controls
34 lines (29 loc) · 1.24 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
all : mainscreen.py settings.py resources_rc.py
mainscreen.py : mainscreen.ui
pyuic6 mainscreen.ui -o mainscreen.py
@echo "import resources_rc # noqa: F401" | cat - mainscreen.py > temp && mv temp mainscreen.py || true
settings.py : settings.ui
pyuic6 settings.ui -o settings.py
@echo "import resources_rc # noqa: F401" | cat - settings.py > temp && mv temp settings.py || true
resources_rc.py : resources.qrc
@if command -v rcc >/dev/null 2>&1; then \
rcc -g python -o resources_rc.py resources.qrc && \
sed -i '' 's/from PySide6/from PyQt6/g' resources_rc.py; \
else \
rcc_path=""; \
if [ -d /usr/local/Cellar/qt ]; then \
rcc_path=$$(find -L /usr/local/Cellar/qt -name rcc -type f 2>/dev/null | head -1); \
fi; \
if [ -z "$$rcc_path" ] && [ -d /opt/homebrew/Cellar/qt ]; then \
rcc_path=$$(find -L /opt/homebrew/Cellar/qt -name rcc -type f 2>/dev/null | head -1); \
fi; \
if [ -n "$$rcc_path" ]; then \
$$rcc_path -g python -o resources_rc.py resources.qrc && \
sed -i '' 's/from PySide6/from PyQt6/g' resources_rc.py; \
else \
echo "Warning: rcc tool not found. Using existing resources_rc.py if available."; \
fi; \
fi
clean cleandir:
rm -rf $(CLEANFILES)
CLEANFILES = mainscreen.py settings.py resources_rc.py *.pyc