32 lines
1.1 KiB
Bash
Executable File
32 lines
1.1 KiB
Bash
Executable File
# check current arch and map it to either x86_64 or arm_aarch64
|
|
|
|
ARCH=$(uname -m)
|
|
if [ "$ARCH" == "x86_64" ]; then
|
|
ARCH="x86_64"
|
|
elif [ "$ARCH" == "aarch64" ]; then
|
|
ARCH="arm_aarch64"
|
|
else
|
|
echo "Unsupported architecture: $ARCH"
|
|
exit 1
|
|
fi
|
|
|
|
|
|
|
|
curl -sSfLO "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-static-$ARCH.AppImage"
|
|
curl -sSfLO "https://github.com/linuxdeploy/linuxdeploy-plugin-gtk/raw/master/linuxdeploy-plugin-gtk.sh"
|
|
chmod a+x linuxdeploy*
|
|
|
|
mkdir -p AppDir/usr/bin
|
|
cp Zelda64Recompiled AppDir/usr/bin/
|
|
cp -r assets/ AppDir/usr/bin/
|
|
cp icons/512.png AppDir/Zelda64Recompiled.png
|
|
cp .github/linux/Zelda64Recompiled.desktop AppDir/
|
|
|
|
"./linuxdeploy-static-$ARCH.AppImage" --appimage-extract
|
|
mv squashfs-root/ deploy
|
|
./deploy/AppRun --appdir=AppDir/ -d AppDir/Zelda64Recompiled.desktop -i AppDir/Zelda64Recompiled.png -e AppDir/usr/bin/Zelda64Recompiled --plugin gtk
|
|
sed -i 's/exec/#exec/g' AppDir/AppRun
|
|
echo 'cd "$this_dir"/usr/bin/' >> AppDir/AppRun
|
|
echo './Zelda64Recompiled' >> AppDir/AppRun
|
|
./deploy/usr/bin/linuxdeploy-plugin-appimage --appdir=AppDir
|