-
Notifications
You must be signed in to change notification settings - Fork 29
/
setup.sh
executable file
·56 lines (47 loc) · 1.25 KB
/
setup.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#! /bin/sh
echo "Welcome to the setup script for gsKit."
echo "This script will attempt to automatically detect the presence of LIBPNG, LIBJPEG, LIBTIFF and ZLIB, and will set up all required environmental variables."
echo "If your libraries are not stored in $PS2SDK/ports, please specify the location of the libraries manually."
## Determine GNU Make command.
if command -v gmake >/dev/null; then
GNUMAKE=gmake
else
GNUMAKE=make
fi
echo "Performing pre-install cleanup."
$GNUMAKE clean --silent
echo "Libraries:"
if [ -f "$PS2SDK/ports/include/jpeglib.h" ];
then
echo -e "\tLIBJPEG detected."
export LIBJPEG=$PS2SDK/ports
else
echo -e "\tLIBJPEG not detected."
fi
if [ -f "$PS2SDK/ports/include/png.h" ];
then
echo -e "\tLIBPNG detected."
export LIBPNG=$PS2SDK/ports
else
echo -e "\tLIBPNG not detected."
fi
if [ -f "$PS2SDK/ports/include/zlib.h" ];
then
echo -e "\tZLIB detected."
export ZLIB=$PS2SDK/ports
else
echo -e "\tZLIB not detected."
fi
if [ -f "$PS2SDK/ports/include/tiff.h" ];
then
echo -e "\tLIBTIFF detected."
export LIBTIFF=$PS2SDK/ports
else
echo -e "\tLIBTIFF not detected."
fi
echo "Building gsKit."
$GNUMAKE --silent
echo "Installing gsKit."
$GNUMAKE install --silent
echo "Performing post-install cleanup."
$GNUMAKE clean --silent