forked from johnhoran/Laine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
48 lines (35 loc) · 1.37 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
#==================================================================
FILES=*.js metadata.json stylesheet.css
#==================================================================
po_files=$(basename $(notdir $(wildcard po/*.po)))
default_target: all
.PHONY: clean all zip install
clean:
rm -rf bin/ $(UUID).zip
all: clean
mkdir -p bin
@if [ -d src/schemas ]; then \
mkdir -p bin/schemas; \
glib-compile-schemas --targetdir=bin/schemas src/schemas/; \
fi
cp $(FILES:%=src/%) bin/
@for a in $(po_files); do\
mkdir -p bin/locale/$$a/LC_MESSAGES/; \
msgfmt po/$$a.po -o bin/locale/$$a/LC_MESSAGES/$(UUID).mo; \
done
zip: all
cd bin ; zip -rq $(UUID).zip *
mv bin/$(UUID).zip .
zip -gq [email protected] license
install: all
mkdir -p ~/.local/share/gnome-shell/extensions/$(UUID)
cp -R bin/* ~/.local/share/gnome-shell/extensions/$(UUID)
#really useful to be able to reload the theme or gnome shell from the cli
reload_theme:
gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval 'Main.reloadThemeResource(); Main.loadTheme();'
#not sure what happens if called from wayland though...
restart:
gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval 'Meta.restart(_("Restarting"));'
pot:
xgettext -k_ -kN_ -o po/messages.pot src/*.js