Adds aarch64 support to the build appimage script
This commit is contained in:
parent
1217903703
commit
538c676828
1 changed files with 27 additions and 8 deletions
|
|
@ -4,7 +4,6 @@ set -e
|
||||||
|
|
||||||
APP_NAME="Passport-C-Media-Player"
|
APP_NAME="Passport-C-Media-Player"
|
||||||
APP_VERSION="0.1"
|
APP_VERSION="0.1"
|
||||||
OUTPUT_NAME="${APP_NAME}-${APP_VERSION}-x86_64.AppImage"
|
|
||||||
|
|
||||||
# Colors for output
|
# Colors for output
|
||||||
RED='\033[0;31m'
|
RED='\033[0;31m'
|
||||||
|
|
@ -12,9 +11,29 @@ GREEN='\033[0;32m'
|
||||||
YELLOW='\033[1;33m'
|
YELLOW='\033[1;33m'
|
||||||
NC='\033[0m' # No Color
|
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/
|
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
|
# Check if binary exists
|
||||||
if [ ! -f "passport-c-media-player" ]; then
|
if [ ! -f "passport-c-media-player" ]; then
|
||||||
|
|
@ -71,15 +90,15 @@ ln -sf usr/bin/passport-c-media-player AppRun
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# Download linuxdeploy if not present
|
# Download linuxdeploy if not present
|
||||||
if [ ! -f "linuxdeploy-x86_64.AppImage" ]; then
|
if [ ! -f "${LINUXDEPLOY_BIN}" ]; then
|
||||||
echo -e "${GREEN}Downloading linuxdeploy...${NC}"
|
echo -e "${GREEN}Downloading linuxdeploy for ${ARCH}...${NC}"
|
||||||
wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
|
wget -q "${LINUXDEPLOY_URL}" -O "${LINUXDEPLOY_BIN}"
|
||||||
chmod +x linuxdeploy-x86_64.AppImage
|
chmod +x "${LINUXDEPLOY_BIN}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Build AppImage
|
# Build AppImage
|
||||||
echo -e "${GREEN}Creating AppImage...${NC}"
|
echo -e "${GREEN}Creating AppImage for ${ARCH}...${NC}"
|
||||||
./linuxdeploy-x86_64.AppImage \
|
./"${LINUXDEPLOY_BIN}" \
|
||||||
--appdir AppDir \
|
--appdir AppDir \
|
||||||
--output appimage \
|
--output appimage \
|
||||||
-d AppDir/usr/share/applications/passport-c-media-player.desktop \
|
-d AppDir/usr/share/applications/passport-c-media-player.desktop \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue