Rename app to HSRename; use HSRename.png as icon; update build script and README
Made-with: Cursor
This commit is contained in:
+19
-12
@@ -1,11 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build Bulk Renamer as an AppImage.
|
||||
# Build HSRename as an AppImage.
|
||||
# Requires: pip install -r requirements.txt -r requirements-build.txt
|
||||
# Optional: appimagetool from https://github.com/AppImage/AppImageKit/releases (for building the final .AppImage)
|
||||
# Optional: appimagetool from https://github.com/AppImage/appimagetool/releases (for building the final .AppImage)
|
||||
# Uses HSRename.png in the project folder as the app icon.
|
||||
|
||||
set -e
|
||||
cd "$(dirname "$0")"
|
||||
APP_NAME="BulkRenamer"
|
||||
APP_NAME="HSRename"
|
||||
APPDIR="${APP_NAME}.AppDir"
|
||||
EXE_NAME="$APP_NAME"
|
||||
|
||||
@@ -28,23 +29,29 @@ rm -rf "$APPDIR"
|
||||
mkdir -p "$APPDIR/usr/bin"
|
||||
cp -a "dist/$EXE_NAME" "$APPDIR/usr/bin/"
|
||||
|
||||
cat > "$APPDIR/AppRun" << 'EOF'
|
||||
cat > "$APPDIR/AppRun" << EOF
|
||||
#!/bin/sh
|
||||
SELF=$(readlink -f "$0")
|
||||
HERE=${SELF%/*}
|
||||
exec "$HERE/usr/bin/BulkRenamer/BulkRenamer" "$@"
|
||||
SELF=\$(readlink -f "\$0")
|
||||
HERE=\${SELF%/*}
|
||||
exec "\$HERE/usr/bin/$EXE_NAME/$EXE_NAME" "\$@"
|
||||
EOF
|
||||
chmod +x "$APPDIR/AppRun"
|
||||
|
||||
cat > "$APPDIR/bulk-renamer.desktop" << 'EOF'
|
||||
cat > "$APPDIR/hsrename.desktop" << 'EOF'
|
||||
[Desktop Entry]
|
||||
Name=Bulk Renamer
|
||||
Name=HSRename
|
||||
Comment=Mass rename files with preview and flexible rules
|
||||
Exec=BulkRenamer
|
||||
Icon=bulk-renamer
|
||||
Exec=HSRename
|
||||
Icon=HSRename
|
||||
Type=Application
|
||||
Categories=Utility;FileTools;
|
||||
EOF
|
||||
# Use project icon as app icon and logo
|
||||
if [[ -f HSRename.png ]]; then
|
||||
cp HSRename.png "$APPDIR/HSRename.png"
|
||||
else
|
||||
echo "Warning: HSRename.png not found; appimagetool may fail or use no icon."
|
||||
fi
|
||||
|
||||
echo "=== Building AppImage (requires appimagetool) ==="
|
||||
if command -v appimagetool &>/dev/null; then
|
||||
@@ -55,5 +62,5 @@ else
|
||||
echo "AppDir is ready at $APPDIR/"
|
||||
echo "To create the .AppImage, install appimagetool and run:"
|
||||
echo " appimagetool $APPDIR ${APP_NAME}.AppImage"
|
||||
echo " # Get it from: https://github.com/AppImage/AppImageKit/releases"
|
||||
echo " # Get it from: https://github.com/AppImage/appimagetool/releases"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user