Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions AppDir/usr/share/applications/msupcm.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[Desktop Entry]
Type=Application
Name=MSUPCM
Exec=msupcm
Icon=msupcm
Categories=AudioVideo;Utility;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,30 @@ then simply run
make
```

from the top-level repo directory.
from the top-level repo directory.

### AppImage

It is also possible to build a portable **AppImage** of `msupcm++`.
This bundles the binary together with its dependencies into a single executable file
that can be run on most modern Linux distributions without installing libraries manually.

From the top-level repo directory, run:

```
chmod +x make-appimage.sh
./make-appimage.sh
```

After the build finishes, an AppImage will be created in the same directory,
for example:

```
MSUPCMPLUSPLUS-x86_64.AppImage
```

You can run it directly:

```
./MSUPCMPLUSPLUS-x86_64.AppImage tracks.json
```
64 changes: 64 additions & 0 deletions make-appimage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#!/bin/bash
set -e

APP=msupcm
VERSION=v1.0RC3

# 1. Compile normally with your main Makefile
make -C msupcm++ clean || true
make

# 2. Prepare AppDir
rm -rf AppDir
mkdir -p AppDir/usr/bin
mkdir -p AppDir/usr/share/applications
mkdir -p AppDir/usr/share/icons/hicolor

# Copy binary
cp msupcm++/msupcm AppDir/usr/bin/

# Create .desktop file
cat > AppDir/usr/share/applications/$APP.desktop <<EOF
[Desktop Entry]
Type=Application
Name=MSUPCMPLUSPLUS
Exec=msupcm
Icon=msupcm
Categories=AudioVideo;Utility;
EOF

# Copy icons from res/ if they exist, otherwise generate placeholder
ICON_SRC_DIR=res/icons/hicolor

if [ -d "$ICON_SRC_DIR" ]; then
echo "Copying icons..."
for SIZE_PATH in "$ICON_SRC_DIR"/*; do
SIZE=$(basename "$SIZE_PATH")
SRC_APPS_DIR="$SIZE_PATH/apps"
DST_APPS_DIR="AppDir/usr/share/icons/hicolor/$SIZE/apps"
mkdir -p "$DST_APPS_DIR"
for ICON_FILE in "$SRC_APPS_DIR"/*.png; do
[ -f "$ICON_FILE" ] && cp "$ICON_FILE" "$DST_APPS_DIR/"
done
done
fi

# Generate placeholders if 256x256 does not exist
PLACEHOLDER_256="AppDir/usr/share/icons/hicolor/256x256/apps/msupcm.png"
if [ ! -f "$PLACEHOLDER_256" ]; then
echo "Generating 256x256 placeholder icon..."
mkdir -p "$(dirname "$PLACEHOLDER_256")"
convert -size 256x256 xc:lightgray -gravity center \
-pointsize 48 -draw "text 0,0 'MSU'" "$PLACEHOLDER_256"
fi

# 3. Package into AppImage
wget -c https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
chmod +x linuxdeploy-x86_64.AppImage

./linuxdeploy-x86_64.AppImage \
--appdir AppDir \
--desktop-file AppDir/usr/share/applications/$APP.desktop \
--icon-file AppDir/usr/share/icons/hicolor/256x256/apps/msupcm.png \
--output appimage

Empty file.
Binary file added res/icons/hicolor/256x256/apps/msupcm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Empty file.