-
Notifications
You must be signed in to change notification settings - Fork 5
/
install.msys.png
60 lines (46 loc) · 1.09 KB
/
install.msys.png
File metadata and controls
60 lines (46 loc) · 1.09 KB
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
#!/bin/bash
FIND=/c/mingw/msys/1.0/bin/find.exe
XARGS=xargs
DEST="build"
BASE="`pwd`/$DEST/data"
echo "Copying..."
robocopy //s data data.tmp > /dev/null
rm -rf data.tmp/.git
if [ -f "packtiles2" ] ; then
PACKTILES="`pwd`/packtiles2"
else
echo "packtiles2 tool not found, please build the tools before running install.sh"
exit;
fi
mkdir $DEST/data
mkdir $DEST/data/areas
mkdir $DEST/data/map_entities
cd data.tmp/areas
cp -f global.lua "$BASE/areas"
# Pack tiles
echo packtiles
cd tiles
for f in * ; do
"$PACKTILES" ".png" $f
done
for f in `$FIND . -name "*_new.png"` ; do
mkdir -p "$BASE/areas/tiles/`dirname $f`"
mv -f $f "$BASE/areas/tiles/`echo $f | sed -e 's/_new.png/.png/'`"
done
cd ..
for f in *.area
do
echo "Processing $f..."
robocopy //s $f "$BASE/areas/$f" > /dev/null
done
cd ..
DIRS="battle fonts map_entities misc_graphics mini_games music scripts sfx shaders skeletons text videos"
for f in $DIRS ; do echo copy $f; robocopy //s $f "$BASE/$f" > /dev/null ; done
cd ..
DERP=`pwd`
cd "$BASE"
../../tools/mkcpa.sh ../data.cpa
cd ..
rm -rf data
cd "$DERP"
rm -rf data.tmp