-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Celeste
executable file
·93 lines (82 loc) · 2.81 KB
/
Celeste
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/usr/bin/env bash
cd "${0%/*}"
if [ -n "$XDG_DATA_HOME" ]; then
APPSDIR="$XDG_DATA_HOME/applications"
else
APPSDIR="$HOME/.local/share/applications"
fi
type mono 2>/dev/null >&2 || {
echo "Mono is missing, it will be installed"
sudo apt update
sudo apt install -y gnupg ca-certificates
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
sudo apt install -y mono-complete
}
[ -f "/usr/lib/aarch64-linux-gnu/liblua5.3.so" ] || {
echo "liblua is missing, it will be installed"
sudo apt update
sudo apt install -y liblua5.3 libcurl3
}
[ -e "lib-arm64/liblua53.so" ] || {
ln -s /usr/lib/aarch64-linux-gnu/liblua5.3.so lib-arm64/liblua53.so
}
[ -e "lib-arm64/libfmod.so.13" ] || {
ln -s libfmod.so.13.6 lib-arm64/libfmod.so.13
ln -s libfmodstudio.so.13.6 lib-arm64/libfmodstudio.so.13
}
[ -f ~/.config/Olympus/config.json -o -d ~/.olympus ] || {
echo "Olympus is missing, it will be installed"
sudo apt update
sudo apt install -y wget
celeste_path="$(pwd)"
pushd /tmp
wget -O Olympus.zip https://github.com/pixelomer/Celeste-ARM64/releases/download/2021.09.07/Olympus.zip
unzip Olympus.zip
mv Olympus ~/.olympus
rm Olympus.zip
popd
pushd ~/.olympus
sed 's/read/answer\=y\;\#/g' < ./install.sh > install-nocheck.sh
chmod +x install-nocheck.sh
./install-nocheck.sh
popd
mkdir -p ~/.config/Olympus
cat > ~/.config/Olympus/config.json <<EOF
{
"installs":[{
"type":"manual",
"name":"Celeste",
"path":"${celeste_path}"
}]
}
EOF
popd
}
cat > "${APPSDIR}/Celeste.desktop" <<EOF
[Desktop Entry]
Type=Application
Version=1.0
Name=Celeste
Comment=Celeste
Exec=$(pwd)/Celeste
Icon=$(pwd)/Celeste.png
Terminal=false
Categories=Game;Application;
EOF
update-desktop-database "${APPSDIR}"
rm -f System*.dll mscorlib.dll Mono.Posix.dll Mono.Security.dll monoconfig monomachineconfig
cat > Celeste.exe.config <<'EOF'
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="fmod" os="linux" target="lib-arm64/libfmod.so.13"/>
<dllmap dll="fmodstudio" os="linux" target="lib-arm64/libfmodstudio.so.13">
<dllentry dll="lib-arm64/fmod_fix.so" name="FMOD_Studio_EventInstance_SetParameterValue" target="_FMOD_Studio_EventInstance_SetParameterValue"/>
<dllentry dll="lib-arm64/fmod_fix.so" name="FMOD_Studio_System_Create" target="_FMOD_Studio_System_Create"/>
<dllentry dll="lib-arm64/libfmodstudio.so.13" name="FMOD_Studio_System_GetLowLevelSystem" target="FMOD_Studio_System_GetCoreSystem"/>
<dllentry dll="lib-arm64/libfmodstudio.so.13" name="FMOD_Studio_EventInstance_TriggerCue" target="FMOD_Studio_EventInstance_KeyOff"/>
</dllmap>
</configuration>
EOF
LD_LIBRARY_PATH="$(pwd)/lib-arm64" mono Celeste.exe