diff --git a/Makefile b/Makefile index dd2d9d9..f097023 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ BIN := passport-c-media-player CPPFLAGS += -I./src $(SDL_CFLAGS) $(FFMPEG_CFLAGS) LDLIBS += $(SDL_LIBS) $(FFMPEG_LIBS) -lm -.PHONY: all run clean +.PHONY: all run clean appimage all: $(BIN) @@ -36,3 +36,6 @@ run: $(BIN) clean: rm -f $(OBJ) $(BIN) + +appimage: $(BIN) + ./build-appimage.sh diff --git a/build-appimage.sh b/build-appimage.sh new file mode 100755 index 0000000..2adb949 --- /dev/null +++ b/build-appimage.sh @@ -0,0 +1,85 @@ +#!/bin/bash + +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' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +NC='\033[0m' # No Color + +echo -e "${GREEN}Building ${APP_NAME} AppImage...${NC}" + +# Check if binary exists +if [ ! -f "passport-c-media-player" ]; then + echo -e "${YELLOW}Binary not found. Building first...${NC}" + make clean + make +fi + +# Create AppDir structure +echo -e "${GREEN}Setting up AppDir...${NC}" +mkdir -p AppDir/usr/bin +mkdir -p AppDir/usr/share/applications +mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps + +# Copy binary +cp passport-c-media-player AppDir/usr/bin/ +chmod +x AppDir/usr/bin/passport-c-media-player + +# Copy desktop file +cp AppDir/usr/share/applications/passport-c-media-player.desktop AppDir/ + +# Copy and convert icon +echo -e "${GREEN}Setting up icon...${NC}" +if [ -f "logo.png" ]; then + cp logo.png AppDir/usr/share/icons/hicolor/256x256/apps/passport-c-media-player.png + cp logo.png AppDir/passport-c-media-player.png +else + echo -e "${RED}Warning: logo.png not found!${NC}" +fi + +# Create AppRun symlink +cd AppDir +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 +fi + +# Download ffmpeg plugin if not present +if [ ! -f "linuxdeploy-plugin-ffmpeg.sh" ]; then + echo -e "${GREEN}Downloading ffmpeg plugin...${NC}" + wget -q https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-ffmpeg/master/linuxdeploy-plugin-ffmpeg.sh + chmod +x linuxdeploy-plugin-ffmpeg.sh +fi + +# Build AppImage +echo -e "${GREEN}Creating AppImage...${NC}" +./linuxdeploy-x86_64.AppImage \ + --appdir AppDir \ + --plugin ffmpeg \ + --output appimage \ + -d AppDir/usr/share/applications/passport-c-media-player.desktop \ + -i AppDir/usr/share/icons/hicolor/256x256/apps/passport-c-media-player.png + +# Rename output file +if [ -f "Passport_C_Media_Player-x86_64.AppImage" ]; then + mv "Passport_C_Media_Player-x86_64.AppImage" "${OUTPUT_NAME}" +fi + +if [ -f "${OUTPUT_NAME}" ]; then + echo -e "${GREEN}Success! Created ${OUTPUT_NAME}${NC}" + ls -lh "${OUTPUT_NAME}" +else + echo -e "${RED}Error: AppImage creation failed!${NC}" + exit 1 +fi \ No newline at end of file diff --git a/logo.png b/logo.png new file mode 100644 index 0000000..b87e8a8 Binary files /dev/null and b/logo.png differ diff --git a/passport_spectrum.png b/passport_spectrum.png new file mode 100644 index 0000000..37371e8 Binary files /dev/null and b/passport_spectrum.png differ diff --git a/screenshotguide.png b/screenshotguide.png new file mode 100644 index 0000000..4ed963b Binary files /dev/null and b/screenshotguide.png differ diff --git a/screenshotvideo.png b/screenshotvideo.png new file mode 100644 index 0000000..7af0963 Binary files /dev/null and b/screenshotvideo.png differ