-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpackage
executable file
·60 lines (45 loc) · 1.25 KB
/
package
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/sh
add()
{
echo "adding $1"
if [ -e "/usr/lib/x86_64-linux-gnu/$1" ]; then
src="/usr/lib/x86_64-linux-gnu"
elif [ -e "/usr/lib/x86_64-linux-gnu/pulseaudio/$1" ]; then
src="/usr/lib/x86_64-linux-gnu/pulseaudio"
elif [ -e "/usr/lib64/$1" ]; then
src="/usr/lib64"
fi
if [ $src != $out ]; then
cp "$src/$1" "$out/$1"
fi
dependencies=$(readelf -d "$src/$1" | grep NEEDED | sed -En "s/[^\[]*\[([^]]*)\S*/\1/gp")
for dependency in $dependencies
do
if [ ! -f "$out/$dependency" ]; then
add $dependency
fi
done
}
out=$(pwd)
src=$(pwd)
cp BUILD/PokittoEmu ./pokittoemu
add pokittoemu
rm libc.so*
rm libpthread.so*
rm librt.so*
rm libstdc++.so*
chmod +x pokittoemu
mkdir PokittoEmu
mkdir PokittoEmu/usr
mkdir PokittoEmu/usr/bin
mkdir PokittoEmu/usr/lib
cp PokittoEmu.desktop PokittoEmu/
cp icon.png PokittoEmu/pokittoemu.png
mv pokittoemu PokittoEmu/usr/bin
mv file.bin PokittoEmu/usr/bin
mv *.so* PokittoEmu/usr/lib
wget https://github.com/AppImage/AppImageKit/releases/download/13/AppRun-x86_64 -O PokittoEmu/AppRun
chmod +x PokittoEmu/AppRun
wget https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage -O appimagetool
chmod +x appimagetool
./appimagetool PokittoEmu