forked from tuffnatty/hbgi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·34 lines (29 loc) · 816 Bytes
/
build.sh
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
#!/bin/sh -e
if ! which hbmk2 > /dev/null; then
echo '! Error: hbmk2 missing from PATH'
exit 1
fi
if ! pkg-config glib-2.0 || \
! pkg-config gobject-introspection-1.0; then
echo '! Error: Required components missing: glib, gobject-introspection'
case "$(uname)" in
*_NT*)
echo '! Install using:'
echo ' pacman -S mingw-w64-{i686,x86_64}-{gtk2,glib,gobject-introspection}'
;;
esac
exit 1
fi
DEMOS="test demo/gtk2webkit demo/navigator demo/sourceview demo/webkit"
# static
hbmk2 gihb.hbp
hbmk2 gobject.hbp
hbmk2 gi.hbp
for F in $DEMOS; do
hbmk2 $F.prg -o${F}_s -gtcgi hbgi.hbc
done
# dynamic
hbmk2 -hbdyn -shared '{win}-lhbmaindllp' @gi.hbp @gobject.hbp @gihb.hbp -ohbgidyn
for F in $DEMOS; do
hbmk2 $F.prg -o${F}_d -gtcgi -env:HBGI_DYNAMIC=yes hbgi.hbc
done