forked from gb-mobile/pokecrystal-mobile-eng
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
74 lines (65 loc) · 1.42 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/bash
# Install necessary tools
dpkg -s bison &> /dev/null
if [ $? -eq 0 ]; then
echo "bison is installed!"
else
sudo apt-get install -y bison
fi
dpkg -s pkg-config &> /dev/null
if [ $? -eq 0 ]; then
echo "pkg-config is installed!"
else
sudo apt-get install -y pkg-config
fi
dpkg -s libpng-dev &> /dev/null
if [ $? -eq 0 ]; then
echo "libpng-dev is installed!"
else
sudo apt-get install -y libpng-dev
fi
dpkg -s g++ &> /dev/null
if [ $? -eq 0 ]; then
echo "g++ is installed!"
else
sudo apt-get install -y g++
fi
dpkg -s make &> /dev/null
if [ $? -eq 0 ]; then
echo "make is installed!"
else
sudo apt-get install -y make
fi
dpkg -s gcc &> /dev/null
if [ $? -eq 0 ]; then
echo "gcc is installed!"
else
sudo apt-get install -y gcc
fi
dpkg -s git &> /dev/null
if [ $? -eq 0 ]; then
echo "git is installed!"
else
sudo apt-get install -y git
fi
# Get RGBDS-0.6.1
if [ -d "rgbds" ]; then
echo "rgbds already exists! Removing..."
sudo rm -R rgbds
fi
echo "Getting the latest RGBDS compatible version!"
curl -Lo rgbds-0.6.1.tar.gz https://github.com/gbdev/rgbds/releases/download/v0.6.1/rgbds-0.6.1.tar.gz
tar xvfz rgbds-0.6.1.tar.gz
rm rgbds-0.6.1.tar.gz
echo "Building rgbds..."
cd rgbds
make clean
make
cd ..
# Build the Rom
echo "Building pokecrystal..."
make clean
make RGBDS=rgbds/
if [ ! -f "pokecrystal.gbc" ]; then
echo "Something goes wrong during the process."
fi