Make AppImage

This commit is contained in:
Tomkoid 2022-10-24 19:19:42 +02:00
parent 284e236d3c
commit 8b05bf05d0
No known key found for this signature in database
GPG key ID: D4403E79602EE85B
7 changed files with 34 additions and 1 deletions

6
.gitignore vendored
View file

@ -4,6 +4,12 @@ target/
# Auto generated lock files by compiler
Cargo.lock
# Generated AppImages
*.AppImage
# Binaries in AppImage /usr/bin
packages/Blokator.AppDir/usr/bin/blokator
# Pacman auto generated files
*.pkg.tar.zst
*.pkg.tar.zst.sig

15
build-appimage.sh Executable file
View file

@ -0,0 +1,15 @@
# Prepare
if [ ! -f "packages/Blokator.AppDir/usr" ]
then
mkdir -p packages/Blokator.AppDir/usr/bin
fi
# Build Blokator
cargo build --release
# Copy the binary into packages/Blokator.AppDir/usr/bin/blokator
cp target/release/blokator packages/Blokator.AppDir/usr/bin/blokator
# Build the AppImage using appimagetool
ARCH=x86_64 appimagetool packages/Blokator.AppDir

View file

@ -0,0 +1 @@
blokator.png

View file

@ -0,0 +1,5 @@
#!/bin/sh
HERE="$(dirname "$(readlink -f "${0}")")"
EXEC="${HERE}/usr/bin/blokator"
exec $EXEC "$@"

View file

@ -0,0 +1,6 @@
[Desktop Entry]
Name=Blokator
Exec=blokator %u
Icon=blokator
Type=Application
Categories=Utility

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

View file

@ -11,4 +11,4 @@ then
fi
sed -i "s/$1/$2/g" Cargo.toml
sed -i "s/$1/$2/g" archlinux-pkgbuild/PKGBUILD
sed -i "s/$1/$2/g" packages/archlinux/PKGBUILD