-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbundle_linux.sh
More file actions
executable file
·52 lines (39 loc) · 1.28 KB
/
Copy pathbundle_linux.sh
File metadata and controls
executable file
·52 lines (39 loc) · 1.28 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
#!/bin/bash
echo test
# update make and rebuild in release mode
echo ==================================================================
echo Rebuilding in release
echo ==================================================================
./genproj.sh
make -j9 config="release"
# make sure the bundleelf tool is built
echo
echo ==================================================================
echo Building bundleelf tool
echo ==================================================================
cd tak/tools/bundleelf && ./genproj.sh && cd -
make -C tak/tools/bundleelf
echo
echo ==================================================================
echo Creating the bundle
echo ==================================================================
BUNDLE_DIR=./bundle_linux
echo $BUNDLE_DIR
rm -rf $BUNDLE_DIR
mkdir -p $BUNDLE_DIR
pushd $BUNDLE_DIR
cp -R ../media .
mkdir bin
cp ../bin/pong3d bin
cd bin
../../tak/tools/bundleelf/bundleelf pong3d
cd ..
ELFLOADER=$(readelf -l ./bin/pong3d | grep "program interpreter" | cut -d':' -f2 | cut -d']' -f1 | cut -d' ' -f2)
ELFLOADERNAME=$(echo /lib64/ld-linux-x86-64.so.2 | sed 's/\/lib64\///')
cp $ELFLOADER bin/
rm bin/libGL.so.*
rm bin/libGLU.so.*
echo "./bin/$ELFLOADERNAME ./bin/pong3d" > run.sh
chmod +x run.sh
popd
tar czvf bundle_linux.tar.gz $BUNDLE_DIR