-
-
Notifications
You must be signed in to change notification settings - Fork 87
/
Makefile
67 lines (48 loc) · 1.63 KB
/
Makefile
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
61
62
63
64
65
66
67
NAME = blur-my-shell
UUID = $(NAME)@aunetx
VM_PATH = ~/Projects/shared/extensions
.PHONY: build install pot test-shell test-prefs remove clean
build: clean
mkdir -p build/
cd src && gnome-extensions pack -f \
--extra-source=../metadata.json \
--extra-source=../resources/icons \
--extra-source=../resources/ui \
--extra-source=./components \
--extra-source=./conveniences \
--extra-source=./effects \
--extra-source=./preferences \
--extra-source=./dbus \
--podir=../po \
--schema=../schemas/org.gnome.shell.extensions.$(NAME).gschema.xml \
-o ../build
install: build remove
gnome-extensions install -f build/$(UUID).shell-extension.zip
pot:
find resources/ui -iname "*.ui" -printf "%p\n" | sort | \
xargs xgettext --output=po/$(UUID).pot src/effects/effects.js \
--from-code=utf-8 --package-name=$(UUID)
rm po/LINGUAS
for l in $$(ls po/*.po); do \
basename $$l .po >> po/LINGUAS; \
done
cd po && \
for lang in $$(cat LINGUAS); do \
mv $${lang}.po $${lang}.po.old; \
msginit --no-translator --locale=$$lang --input $(UUID).pot -o $${lang}.po.new; \
msgmerge -N $${lang}.po.old $${lang}.po.new > $${lang}.po; \
rm $${lang}.po.old $${lang}.po.new; \
done
test-shell: install
env GNOME_SHELL_SLOWDOWN_FACTOR=2 \
MUTTER_DEBUG_DUMMY_MODE_SPECS=1500x1000 \
MUTTER_DEBUG_DUMMY_MONITOR_SCALES=1 \
dbus-run-session -- gnome-shell --nested --wayland
test-prefs: install
gnome-extensions prefs $(UUID)
test-vm: build
unzip build/$(UUID).shell-extension.zip -d $(VM_PATH)/$(UUID)
remove:
rm -rf $(HOME)/.local/share/gnome-shell/extensions/$(UUID)
clean:
rm -rf build/ po/*.mo