Skip to content

Commit ce1ef67

Browse files
authored
Update rofi-appimage.sh
1 parent 57917ec commit ce1ef67

File tree

1 file changed

+21
-12
lines changed

1 file changed

+21
-12
lines changed

rofi-appimage.sh

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
#!/bin/sh
22

3-
set -eux
4-
5-
export ARCH="$(uname -m)"
6-
export APPIMAGE_EXTRACT_AND_RUN=1
7-
export URUNTIME_PRELOAD=1
3+
set -ex
84

5+
ARCH="$(uname -m)"
96
UPINFO="gh-releases-zsync|$(echo "$GITHUB_REPOSITORY" | tr '/' '|')|latest|*$ARCH.AppImage.zsync"
107
SHARUN="https://github.com/VHSgunzo/sharun/releases/latest/download/sharun-$ARCH-aio"
11-
APPIMAGETOOL="https://github.com/pkgforge-dev/appimagetool-uruntime/releases/download/continuous/appimagetool-$ARCH.AppImage"
8+
URUNTIME="https://github.com/VHSgunzo/uruntime/releases/latest/download/uruntime-appimage-dwarfs-$ARCH"
9+
URUNTIME_LITE="https://github.com/VHSgunzo/uruntime/releases/latest/download/uruntime-appimage-dwarfs-lite-$ARCH"
1210

1311
# CREATE DIRECTORIES
1412
mkdir ./AppDir && (
@@ -77,16 +75,27 @@ mkdir ./AppDir && (
7775
./sharun -g
7876
)
7977

80-
export VERSION="$(./AppDir/AppRun -v | awk '{print $2; exit}')"
78+
VERSION="$(./AppDir/AppRun -v | awk '{print $2; exit}')"
8179
echo "$VERSION" > ~/version
8280

83-
# MAKE APPIMAGE WITH FUSE3 COMPATIBLE APPIMAGETOOL
84-
wget --retry-connrefused --tries=30 "$APPIMAGETOOL" -O ./appimagetool
85-
chmod +x ./appimagetool
81+
# turn appdir into appimage
82+
wget --retry-connrefused --tries=30 "$URUNTIME" -O ./uruntime
83+
wget --retry-connrefused --tries=30 "$URUNTIME_LITE" -O ./uruntime-lite
84+
chmod +x ./uruntime*
85+
86+
# Add udpate info to runtime
87+
echo "Adding update information \"$UPINFO\" to runtime..."
88+
./uruntime-lite --appimage-addupdinfo "$UPINFO"
8689

8790
echo "Generating AppImage..."
88-
./appimagetool -n -u "$UPINFO" \
89-
"$PWD"/AppDir "$PWD"/rofi-"$VERSION"-anylinux-"$ARCH".AppImage
91+
./uruntime \
92+
--appimage-mkdwarfs -f \
93+
--set-owner 0 --set-group 0 \
94+
--no-history --no-create-timestamp \
95+
--compression zstd:level=22 -S26 -B8 \
96+
--header uruntime-lite \
97+
-i ./AppDir \
98+
-o ./rofi-"$VERSION"-anylinux-"$ARCH".AppImage
9099

91100
mkdir -p ./dist
92101
mv -v ./*.AppImage* ./dist

0 commit comments

Comments
 (0)