Adds aarch64 support to the build appimage script

This commit is contained in:
markmental 2026-03-29 18:28:58 -04:00
commit 538c676828

View file

@ -4,7 +4,6 @@ set -e
APP_NAME="Passport-C-Media-Player"
APP_VERSION="0.1"
OUTPUT_NAME="${APP_NAME}-${APP_VERSION}-x86_64.AppImage"
# Colors for output
RED='\033[0;31m'
@ -12,9 +11,29 @@ GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
# Detect architecture
ARCH=$(uname -m)
case $ARCH in
x86_64)
LINUXDEPLOY_URL="https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
LINUXDEPLOY_BIN="linuxdeploy-x86_64.AppImage"
;;
aarch64|arm64)
LINUXDEPLOY_URL="https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20250213-2/linuxdeploy-aarch64.AppImage"
LINUXDEPLOY_BIN="linuxdeploy-aarch64.AppImage"
;;
*)
echo -e "${RED}Error: Unsupported architecture: $ARCH${NC}"
echo -e "${RED}Supported architectures: x86_64, aarch64${NC}"
exit 1
;;
esac
OUTPUT_NAME="${APP_NAME}-${APP_VERSION}-${ARCH}.AppImage"
rm -rf AppDir/
echo -e "${GREEN}Building ${APP_NAME} AppImage...${NC}"
echo -e "${GREEN}Building ${APP_NAME} AppImage for ${ARCH}...${NC}"
# Check if binary exists
if [ ! -f "passport-c-media-player" ]; then
@ -71,15 +90,15 @@ ln -sf usr/bin/passport-c-media-player AppRun
cd ..
# Download linuxdeploy if not present
if [ ! -f "linuxdeploy-x86_64.AppImage" ]; then
echo -e "${GREEN}Downloading linuxdeploy...${NC}"
wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
chmod +x linuxdeploy-x86_64.AppImage
if [ ! -f "${LINUXDEPLOY_BIN}" ]; then
echo -e "${GREEN}Downloading linuxdeploy for ${ARCH}...${NC}"
wget -q "${LINUXDEPLOY_URL}" -O "${LINUXDEPLOY_BIN}"
chmod +x "${LINUXDEPLOY_BIN}"
fi
# Build AppImage
echo -e "${GREEN}Creating AppImage...${NC}"
./linuxdeploy-x86_64.AppImage \
echo -e "${GREEN}Creating AppImage for ${ARCH}...${NC}"
./"${LINUXDEPLOY_BIN}" \
--appdir AppDir \
--output appimage \
-d AppDir/usr/share/applications/passport-c-media-player.desktop \