-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathTexturePackerBuild.sh
executable file
·47 lines (42 loc) · 1.41 KB
/
TexturePackerBuild.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
#!/bin/bash
##
# Test of Sparse checkout of TexturePack folder
#git clone --depth=1 "https://github.com/xbmc/xbmc.git" xbmc
# cd xbmc
ROOT_DIR="./"
REQUIRED_LIBS="libgif-dev libjpeg-dev liblzo2-dev"
if [ -d "/usr/include/libpng12" ] ; then
REQUIRED_LIBS="${REQUIRED_LIBS} libpng12-dev"
else
# REQUIRED_LIBS="${REQUIRED_LIBS} libpng16-dev"
# 2022: Package was renamed
REQUIRED_LIBS="${REQUIRED_LIBS} libpng-dev"
fi
cd "${ROOT_DIR}" && mkdir TexturePackerBuild; cd TexturePackerBuild
if [ ! -d ".git" ] ; then
echo "Checkout TexturePacker source..."
git init
git config core.sparseCheckout true
git remote add xbmc "https://github.com/xbmc/xbmc.git"
echo "tools/depends/native/TexturePacker" >> .git/info/sparse-checkout
echo "xbmc/guilib" >> .git/info/sparse-checkout
echo "xbmc/utils" >> .git/info/sparse-checkout
echo "xbmc/linux" >> .git/info/sparse-checkout
git pull --depth=1 xbmc master
fi
echo "Install libs..."
echo -e "Required dev packges for header files: \n" \
"${REQUIRED_LIBS} \n\nInstall? y/N"
read INSTALL_LIBS
if [ "x${INSTALL_LIBS}" = "xy" -o "x${INSTALL_LIBS}" = "xY" ] ; then
sudo apt-get install ${REQUIRED_LIBS}
fi
echo "Building..."
mkdir -p tools/depends/native/TexturePacker/native
cd tools/depends/native/TexturePacker/native \
&& cp -a ../src/* . \
&& ./autogen.sh \
&& ./configure \
&& make \
&& cp TexturePacker ../../../../../../. \
&& echo "Done"