Skip to content

Commit 446eccf

Browse files
committed
turn AppRun into hook
1 parent ebc1c8f commit 446eccf

5 files changed

Lines changed: 64 additions & 65 deletions

File tree

AppDir/AppRun

Lines changed: 0 additions & 39 deletions
This file was deleted.

AppDir/bin/rofi-datadir.src.hook

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/false
2+
3+
_datadir=${XDG_DATA_HOME:-~/.local/share}
4+
_rofi_themes_dst=$_datadir/rofi/themes
5+
_rofi_themes_src=$APPDIR/share/rofi/themes
6+
XDG_DATA_DIRS=$_datadir:$XDG_DATA_DIRS:/usr/local/share:/usr/share
7+
export XDG_DATA_DIRS
8+
9+
if [ ! -d "$_rofi_themes_dst" ] && [ -d "$_rofi_themes_src" ]; then
10+
mkdir -p "$_rofi_themes_dst"
11+
cp -r "$_rofi_themes_src"/. "$_rofi_themes_dst"
12+
>&2 echo "Copied rofi themes to $_rofi_themes_dst"
13+
fi
14+

README.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,37 @@
1+
<div align="center">
2+
13
# rofi-AppImage 🐧
24

35
[![GitHub Downloads](https://img.shields.io/github/downloads/pkgforge-dev/rofi-AppImage/total?logo=github&label=GitHub%20Downloads)](https://github.com/pkgforge-dev/rofi-AppImage/releases/latest)
4-
[![CI Build Status](https://github.com//pkgforge-dev/rofi-AppImage/actions/workflows/blank.yml/badge.svg)](https://github.com/pkgforge-dev/rofi-AppImage/releases/latest)
6+
[![CI Build Status](https://github.com/pkgforge-dev/rofi-AppImage/actions/workflows/appimage.yml/badge.svg)](https://github.com/pkgforge-dev/rofi-AppImage/releases/latest)
7+
[![Latest Stable Release](https://img.shields.io/github/v/release/pkgforge-dev/rofi-AppImage)](https://github.com/pkgforge-dev/rofi-AppImage/releases/latest)
8+
9+
<p align="center">
10+
<img src="https://raw.githubusercontent.com/davatorium/rofi/refs/heads/next/data/rofi.png" width="128" />
11+
</p>
12+
513

6-
* [Latest Stable Release](https://github.com/pkgforge-dev/rofi-AppImage/releases/latest)
14+
| Latest Stable Release | Upstream URL |
15+
| :---: | :---: |
16+
| [Click here](https://github.com/pkgforge-dev/rofi-AppImage/releases/latest) | [Click here](https://github.com/davatorium/rofi) |
17+
18+
</div>
719

820
---
921

10-
AppImage made using [sharun](https://github.com/VHSgunzo/sharun), which makes it extremely easy to turn any binary into a portable package without using containers or similar tricks.
22+
AppImage made using [sharun](https://github.com/VHSgunzo/sharun) and its wrapper [quick-sharun](https://github.com/pkgforge-dev/Anylinux-AppImages/blob/main/useful-tools/quick-sharun.sh), which makes it extremely easy to turn any binary into a portable package reliably without using containers or similar tricks.
1123

12-
**This AppImage bundles everything and should work on any linux distro, even on musl based ones.**
24+
**This AppImage bundles everything and it should work on any Linux distro, including old and musl-based ones.**
1325

14-
It is possible that this appimage may fail to work with appimagelauncher, I recommend these alternatives instead:
26+
It is possible that this appimage may fail to work with appimagelauncher, I recommend these alternatives instead:
1527

1628
* [AM](https://github.com/ivan-hc/AM) `am -i rofi` or `appman -i rofi`
1729

1830
* [dbin](https://github.com/xplshn/dbin) `dbin install rofi.appimage`
1931

2032
* [soar](https://github.com/pkgforge/soar) `soar install rofi`
2133

22-
This appimage works without fuse2 as it can use fuse3 instead, it can also work without fuse at all thanks to the [uruntime](https://github.com/VHSgunzo/uruntime)
34+
This AppImage doesn't require FUSE to run at all, thanks to the [uruntime](https://github.com/VHSgunzo/uruntime).
2335

2436
<details>
2537
<summary><b><i>raison d'être</i></b></summary>
@@ -29,4 +41,5 @@ This appimage works without fuse2 as it can use fuse3 instead, it can also work
2941

3042
---
3143

32-
More at: [AnyLinux-AppImages](https://pkgforge-dev.github.io/Anylinux-AppImages/)
44+
More at: [AnyLinux-AppImages](https://pkgforge-dev.github.io/Anylinux-AppImages/)
45+

get-dependencies.sh

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,17 @@
11
#!/bin/sh
22

3-
set -ex
4-
EXTRA_PACKAGES="https://raw.githubusercontent.com/pkgforge-dev/Anylinux-AppImages/refs/heads/main/useful-tools/get-debloated-pkgs.sh"
3+
set -eu
54

6-
echo "Installing build dependencies..."
5+
ARCH=$(uname -m)
6+
7+
echo "Installing package dependencies..."
78
echo "---------------------------------------------------------------"
89
pacman -Syu --noconfirm \
9-
base-devel \
10-
bison \
11-
cairo \
1210
check \
1311
cppcheck \
14-
flex \
15-
gdk-pixbuf2 \
16-
git \
1712
gvfs \
18-
librsvg \
19-
libxcb \
20-
libxkbcommon \
21-
libxkbcommon-x11 \
2213
meson \
2314
pango \
24-
patch \
2515
startup-notification \
2616
wget \
2717
xcb-util-cursor \
@@ -30,14 +20,11 @@ pacman -Syu --noconfirm \
3020
xcb-util-wm \
3121
xcb-util-xrm \
3222
xkeyboard-config \
33-
wayland-protocols \
34-
zsync
23+
wayland-protocols
3524

3625
echo "Installing debloated packages..."
3726
echo "---------------------------------------------------------------"
38-
wget --retry-connrefused --tries=30 "$EXTRA_PACKAGES" -O ./get-debloated-pkgs.sh
39-
chmod +x ./get-debloated-pkgs.sh
40-
./get-debloated-pkgs.sh --add-common --prefer-nano
27+
get-debloated-pkgs --add-common --prefer-nano
4128

4229
echo "Building rofi..."
4330
echo "---------------------------------------------------------------"

make-appimage.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/sh
2+
3+
set -eu
4+
5+
ARCH=$(uname -m)
6+
VERSION=$(pacman -Q PACKAGENAME | awk '{print $2; exit}') # example command to get version of application here
7+
export ARCH VERSION
8+
export OUTPATH=./dist
9+
export ADD_HOOKS="self-updater.bg.hook"
10+
export UPINFO="gh-releases-zsync|${GITHUB_REPOSITORY%/*}|${GITHUB_REPOSITORY#*/}|latest|*$ARCH.AppImage.zsync"
11+
export DESKTOP=/usr/share/applications/rofi.desktop
12+
export ICON=/usr/share/icons/hicolor/scalable/apps/rofi.svg
13+
export APPNAME=rofi
14+
export URUNTIME_PRELOAD=1
15+
16+
# Deploy dependencies
17+
quick-sharun /usr/bin/rofi*
18+
19+
# Turn AppDir into AppImage
20+
quick-sharun --make-appimage
21+
22+
# Test the app for 12 seconds, if the test fails due to the app
23+
# having issues running in the CI use --simple-test instead
24+
quick-sharun --test ./dist/*.AppImage

0 commit comments

Comments
 (0)