/+junk/SAPG

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/%2Bjunk/SAPG
1 by Gustav Hartvigsson
* Initial code
1
#!/usr/bin/env bash
2
3
VALAC=valac
4
CC=gcc
5
6
GLIB_LIB=`pkg-config --libs glib-2.0 gio-2.0`
7
GLIB_FlAGS=`pkg-config --cflags glib-2.0 gio-2.0`
8
9
GTK_LIBS=`pkg-config --libs gtk+-3.0`
10
GTK_FlAGS=`pkg-config --cflags gtk+-3.0`
11
6 by Gustav Hartvigsson
* Added AppState object to track the state of (the) play(er).
12
GST_LIBS=`pkg-config --libs gstreamer-1.0`
13
GST_FLAGS=`pkg-config --cflags gstreamer-1.0`
14
1 by Gustav Hartvigsson
* Initial code
15
###################
16
# Build resources #
17
###################
18
./build-resources.sh
19
20
#################
21
# Build program #
22
#################
23
24
# Check if ./bin exists
25
if [ ! -d ./bin/ ]
26
then
27
  mkdir ./bin
28
fi
29
30
# Build the resources.
31
$CC $GLIB_FlAGS -c src/sapg-res.c -o bin/sapg-res.o
32
33
# Build the main program.
34
$VALAC --target-glib=2.38 \
6 by Gustav Hartvigsson
* Added AppState object to track the state of (the) play(er).
35
       --pkg=gstreamer-1.0 \
1 by Gustav Hartvigsson
* Initial code
36
       --pkg=Gio-2.0 \
37
       --pkg=gtk+-3.0 \
38
       --gresources=sapg.gresource.xml\
39
       src/main.vala \
40
       -X -DGETTEXT_PACKAGE=\"SAPG\"\
41
       -c -o bin/main.o
42
43
# bug in valac means it does not get compiled to the correct place. >_<
44
mv main.vala.o bin/main.o
45
46
# Link everything.
6 by Gustav Hartvigsson
* Added AppState object to track the state of (the) play(er).
47
$CC  bin/main.o bin/sapg-res.o $GTK_LIBS $GLIB_LIB $GST_LIBS -o bin/SAPG
1 by Gustav Hartvigsson
* Initial code
48
49
# clean up.
50
rm bin/main.o bin/sapg-res.o