-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake
executable file
·52 lines (43 loc) · 1.64 KB
/
make
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
#!/bin/sh
# Config
THEMENAME=huelessos-plymouth
BUILDDIR=build
# Bootstrap & check dependencies
fail() { >&2 echo "failed: $@"; exit 1; }
cd "$(dirname "$0")" || fail cd
[ -d $BUILDDIR ] && fail already made
mkdir -vp $BUILDDIR
which convert >/dev/null 2>&1 || fail no convert
# Compiling
echo :: Compiling
g++ -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -pthread -I/usr/include/AL -lsfml-graphics -lsfml-window -lsfml-audio -lsfml-network -lsfml-system \
main.cpp anim.cpp -o anim || fail compiler
cd $BUILDDIR
../anim || fail exec
# Moving stuff
echo :: Moving stuff
cp -v ../empty* ../$THEMENAME.plymouth .
# Apply glow FX
echo :: Applying glowfx
for i in animation-*.png throbber-*.png; do
echo "postfx: $i"
convert $i \( $i -blur 0x8 -alpha on -channel alpha -evaluate set 50% \) -compose Plus -composite $i;
done
# Plymouth needs these files for the animation to play
echo :: Linking file for compatability
for i in bullet.png entry.png lock.png; do ln -sv empty.png $i; done
# Freeze at last frame and stutter out
echo :: Generating animation last frames
for i in 36 $(seq 31 34) $(seq 39 41) 44; do ln -sv animation-030.png animation-0$i.png; done
for i in 35 $(seq 37 38) $(seq 42 43) $(seq 45 49); do ln -sv empty-animation.png animation-0$i.png; done
# Optimizing pngs
echo :: Otimizing pngs
if which convert >/dev/null 2>&1; then
find -type f -name '*.png' -exec optipng {} \;
else >&2 echo warning: skipping, optipng not found
fi
# Correcting permission for install
echo :: Correcting permission
chmod 644 *
chmod 755 .
echo :: Done\!