change way to pack an appimage

This commit is contained in:
leca 2024-05-06 20:44:15 +03:00
parent 407f052f12
commit 6f5c16bf2a
1 changed files with 0 additions and 38 deletions

View File

@ -1,38 +0,0 @@
#!/bin/bash
if ! command -v appimagetool &> /dev/null
then
echo "No appimage tool installed. Please, install it."
exit 1
fi
cargo build --release
#Copying binary
mkdir -p AppImage/usr/bin
mkdir -p AppImage/usr/share/glib-2.0/schemas
cp resources/gschemas.compiled AppImage/usr/share/glib-2.0/schemas/ # Copy settings
cp target/release/learn-hieroglyph AppImage/usr/bin
#Copying libraries
libraries=`ldd target/release/learn-hieroglyph | grep so \
| sed -e '/^[^\t]/ d' \
| sed -e 's/\t//' \
| sed -e 's/.*=..//' \
| sed -e 's/ (0.*)//' `
libraries_arr=($libraries)
#creating necessary directories
for library in ${libraries_arr[@]}
do
mkdir -p AppImage/`dirname $library`
done
#copying libraries
for library in ${libraries_arr[@]}
do
cp $library AppImage/`dirname $library`
done
chmod +x AppImage/AppRun
ARCH=x86_64 appimagetool AppImage learn-hieroglyph.AppImage