You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
floorp-appimage/package.sh

54 lines
1.8 KiB

#!/bin/sh -ex
VERSION="11.8.1"
LINK="https://github.com/Floorp-Projects/Floorp/releases/download/v$VERSION/floorp-$VERSION.linux-x86_64.tar.bz2"
APPDIR="Floorp.Appdir"
mkdir -p build
cd build || exit
echo '===# Creating AppDir #==='
rm -rf "$APPDIR"
mkdir -p "$APPDIR"
echo '===# Donwloading Archive #==='
wget -nc $LINK
rm -rf floorp
tar xf floorp*.tar.bz2
echo '===# Copying Files to AppDir #==='
# AppRun
cp ../AppRun "$APPDIR"
chmod a+x "$APPDIR"/AppRun
# Desktop Entry
cp ../Floorp.desktop "$APPDIR"
# AppImage Icons
find floorp -name default128.png -exec cp {} "$APPDIR"/floorp.png ';'
ln -srfv "$APPDIR"/floorp.png "$APPDIR"/.DirIcon
# Other Icons
mkdir -p "$APPDIR"/usr/share/icons/hicolor/16x16/apps
mkdir -p "$APPDIR"/usr/share/icons/hicolor/32x32/apps
mkdir -p "$APPDIR"/usr/share/icons/hicolor/48x48/apps
mkdir -p "$APPDIR"/usr/share/icons/hicolor/64x64/apps
mkdir -p "$APPDIR"/usr/share/icons/hicolor/128x128/apps
find floorp -name default16.png -exec cp {} "$APPDIR"/usr/share/icons/hicolor/16x16/apps/floorp.png ';'
find floorp -name default32.png -exec cp {} "$APPDIR"/usr/share/icons/hicolor/32x32/apps/floorp.png ';'
find floorp -name default48.png -exec cp {} "$APPDIR"/usr/share/icons/hicolor/48x48/apps/floorp.png ';'
find floorp -name default64.png -exec cp {} "$APPDIR"/usr/share/icons/hicolor/64x64/apps/floorp.png ';'
find floorp -name default128.png -exec cp {} "$APPDIR"/usr/share/icons/hicolor/128x128/apps/floorp.png ';'
# Binaries
cp -r floorp/* "$APPDIR"
echo '===# Getting Appimagetool #==='
wget -nc "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-$(uname -m).AppImage" -O appimagetool || true
chmod +x appimagetool
echo '===# Generating AppImage #==='
./appimagetool --no-appstream --comp gzip "$APPDIR" "Floorp-$VERSION-x86_64.AppImage"
chmod +x "Floorp-$VERSION-x86_64.AppImage"