Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hrydgard
GitHub Repository: hrydgard/ppsspp
Path: blob/master/scripts/makeappimage_64-bit.sh
3657 views
1
#!/bin/sh
2
3
set -ex
4
5
ARCH="$(uname -m)"
6
LIB4BN="https://raw.githubusercontent.com/VHSgunzo/sharun/refs/heads/main/lib4bin"
7
URUNTIME="https://github.com/VHSgunzo/uruntime/releases/latest/download/uruntime-appimage-dwarfs-$ARCH"
8
UPINFO="gh-releases-zsync|$(echo "$GITHUB_REPOSITORY" | tr '/' '|')|latest|*$ARCH.AppImage.zsync"
9
VERSION=${1:-test}
10
11
SYS_LIB_DIR="/usr/lib"
12
if [ -d /usr/lib/"$ARCH"-linux-gnu ]; then
13
SYS_LIB_DIR=/usr/lib/"$ARCH"-linux-gnu
14
fi
15
16
# Prepare AppDir
17
mkdir -p ./AppDir/bin
18
cd ./AppDir
19
20
cp -v ../SDL/PPSSPPSDL.desktop ./
21
cp -v ../icons/hicolor/256x256/apps/ppsspp.png ./
22
cp -v ../icons/hicolor/256x256/apps/ppsspp.png ./.DirIcon
23
24
# ADD LIBRARIES
25
wget "$LIB4BN" -O ./lib4bin
26
chmod +x ./lib4bin
27
xvfb-run -a -- ./lib4bin -p -v -e -s -k \
28
../build/PPSSPPSDL \
29
"$SYS_LIB_DIR"/libSDL* \
30
"$SYS_LIB_DIR"/libEGL* \
31
"$SYS_LIB_DIR"/libGL* \
32
"$SYS_LIB_DIR"/libvulkan* \
33
"$SYS_LIB_DIR"/dri/* \
34
"$SYS_LIB_DIR"/libXss.so* \
35
"$SYS_LIB_DIR"/pulseaudio/* \
36
"$SYS_LIB_DIR"/pipewire-0.3/* \
37
"$SYS_LIB_DIR"/spa-0.2/*/*
38
39
# copy assets dir needs to be next to the binary
40
cp -vr ../build/assets ./bin
41
42
# Prepare sharun
43
echo "Preparing sharun..."
44
ln -s ./bin/PPSSPPSDL ./AppRun
45
./sharun -g
46
47
# Make AppImage with uruntime
48
cd ..
49
wget "$URUNTIME" -O ./uruntime
50
chmod +x ./uruntime
51
52
#Add udpate info to runtime
53
echo "Adding update information \"$UPINFO\" to runtime..."
54
./uruntime --appimage-addupdinfo "$UPINFO"
55
56
echo "Generating AppImage..."
57
./uruntime --appimage-mkdwarfs -f \
58
--set-owner 0 --set-group 0 \
59
--no-history --no-create-timestamp \
60
--compression zstd:level=22 -S26 -B8 \
61
--header uruntime \
62
-i ./AppDir -o PPSSPP-"$VERSION"-anylinux-"$ARCH".AppImage
63
64
echo "Generating zsync file..."
65
zsyncmake ./*.AppImage -u ./*.AppImage
66
67
echo "All Done!"
68
69