forked from risvh/miniOneLifeCompile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
getDependencies.sh
executable file
·79 lines (71 loc) · 1.64 KB
/
getDependencies.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
75
76
77
78
79
#!/bin/bash
set -ex
cd "$(dirname "${0}")/.."
sudo apt-get update
sudo apt-get install -y \
rsync \
wget \
unzip \
git \
imagemagick \
xclip \
libglu1-mesa-dev \
libgl1-mesa-dev \
libsdl1.2-dev \
mingw-w64 \
build-essential \
mkdir -p dependencies
cd dependencies
# Getting SDL
if [ ! -d SDL* ]; then
pushd .
wget https://www.libsdl.org/release/SDL-1.2.15.tar.gz -O- | tar xfz -
cd SDL*
./configure \
--bindir=/usr/i686-w64-mingw32/bin \
--libdir=/usr/i686-w64-mingw32/lib \
--includedir=/usr/i686-w64-mingw32/include \
--host=i686-w64-mingw32 \
--prefix=/usr/i686-w64-mingw32 \
CPPFLAGS="-I/usr/i686-w64-mingw32/include" \
LDFLAGS="-L/usr/i686-w64-mingw32/lib"
make
sudo make install
popd
fi
# Getting zlib
if [ ! -d zlib* ]; then
pushd .
wget http://zlib.net/fossils/zlib-1.2.12.tar.gz -O- | tar xfz -
cd zlib*
host="i686-w64-mingw32"
prefixdir="/usr/i686-w64-mingw32"
sudo make -f win32/Makefile.gcc \
BINARY_PATH=$prefixdir/bin \
INCLUDE_PATH=$prefixdir/include \
LIBRARY_PATH=$prefixdir/lib \
SHARED_MODE=1 \
PREFIX=$host- \
install
popd
fi
# Getting libpng
if [ ! -d l*png* ]; then
pushd .
wget http://downloads.sourceforge.net/project/libpng/libpng16/1.6.37/libpng-1.6.37.tar.gz -O- | tar xfz -
cd l*png*
./configure \
--host=i686-w64-mingw32 \
--prefix=/usr/i686-w64-mingw32 \
CPPFLAGS="-I/usr/i686-w64-mingw32/include" \
LDFLAGS="-L/usr/i686-w64-mingw32/lib"
make
sudo make install
popd
fi
# Getting discord_game_sdk
if [ ! -d discord_game_sdk ]; then
wget https://dl-game-sdk.discordapp.net/3.2.1/discord_game_sdk.zip
unzip -d discord_game_sdk discord_game_sdk.zip
rm discord_game_sdk.zip
fi