Skip to content

Commit c048386

Browse files
authored
use wrapper scripts (#17)
1 parent 2806e60 commit c048386

File tree

2 files changed

+21
-73
lines changed

2 files changed

+21
-73
lines changed

LATEST_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
31.1.1-1
1+
31.1.2-1

obs-appimage.sh

Lines changed: 20 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -2,86 +2,36 @@
22

33
set -eux
44

5-
PACKAGE=obs-studio
6-
DESKTOP=com.obsproject.Studio.desktop
7-
ICON=com.obsproject.Studio.png
8-
95
ARCH="$(uname -m)"
10-
VERSION="$(pacman -Q $PACKAGE | awk 'NR==1 {print $2; exit}')"
11-
echo "$VERSION" > ~/version
12-
13-
UPINFO="gh-releases-zsync|$(echo $GITHUB_REPOSITORY | tr '/' '|')|latest|*$ARCH.AppImage.zsync"
14-
SHARUN="https://github.com/VHSgunzo/sharun/releases/latest/download/sharun-$ARCH-aio"
15-
URUNTIME="https://github.com/VHSgunzo/uruntime/releases/latest/download/uruntime-appimage-dwarfs-$ARCH"
16-
URUNTIME_LITE="https://github.com/VHSgunzo/uruntime/releases/latest/download/uruntime-appimage-dwarfs-lite-$ARCH"
6+
URUNTIME="https://raw.githubusercontent.com/pkgforge-dev/Anylinux-AppImages/refs/heads/main/useful-tools/uruntime2appimage.sh"
7+
SHARUN="https://raw.githubusercontent.com/pkgforge-dev/Anylinux-AppImages/refs/heads/main/useful-tools/quick-sharun.sh"
178

18-
# Prepare AppDir
19-
mkdir -p ./AppDir/share
20-
cd ./AppDir
9+
VERSION="$(pacman -Q obs-studio | awk 'NR==1 {print $2; exit}')"
10+
[ -n "$VERSION" ] && echo "$VERSION" > ~/version
2111

22-
cp -r /usr/share/obs ./share
23-
cp -r /usr/share/locale ./share
24-
find ./share/locale -type f ! -name '*glib*' ! -name '*v4l*' ! -name '*obs*' -delete
25-
cp /usr/share/applications/"$DESKTOP" ./
26-
cp /usr/share/icons/hicolor/256x256/apps/"$ICON" ./
27-
cp /usr/share/icons/hicolor/256x256/apps/"$ICON" ./.DirIcon
28-
ln -s ./ ./usr
12+
export ADD_HOOKS="self-updater.bg.hook"
13+
export OUTNAME=OBS-Studio-"$VERSION"-anylinux-"$ARCH".AppImage
14+
export UPINFO="gh-releases-zsync|${GITHUB_REPOSITORY%/*}|${GITHUB_REPOSITORY#*/}|latest|*$ARCH.AppImage.zsync"
15+
export DESKTOP=/usr/share/applications/com.obsproject.Studio.desktop
16+
export ICON=/usr/share/icons/hicolor/256x256/apps/com.obsproject.Studio.png
17+
export DEPLOY_LOCALE=1
18+
export DEPLOY_OPENGL=1
19+
export DEPLOY_PIPEWIRE=1
2920

3021
# ADD LIBRARIES
31-
wget --retry-connrefused --tries=30 "$SHARUN" -O ./sharun-aio
32-
chmod +x ./sharun-aio
33-
xvfb-run -a -- \
34-
./sharun-aio l -p -v -e -k -s \
35-
/usr/bin/obs* \
36-
/usr/lib/libobs* \
37-
/usr/lib/obs-plugins/* \
38-
/usr/lib/obs-scripting/* \
39-
/usr/lib/lib*GL*.so* \
40-
/usr/lib/dri/* \
41-
/usr/lib/vdpau/* \
42-
/usr/lib/libcurl.so* \
43-
/usr/lib/libavutil.so* \
44-
/usr/lib/libavformat.so* \
45-
/usr/lib/libavcodec.so* \
46-
/usr/lib/libswscale.so* \
47-
/usr/lib/libXt.so* \
48-
/usr/lib/qt6/plugins/iconengines/* \
49-
/usr/lib/qt6/plugins/imageformats/* \
50-
/usr/lib/qt6/plugins/platform*/* \
51-
/usr/lib/qt6/plugins/styles/* \
52-
/usr/lib/qt6/plugins/xcbglintegrations/* \
53-
/usr/lib/qt6/plugins/wayland-*/* \
54-
/usr/lib/alsa-lib/* \
55-
/usr/lib/pipewire-0.3/* \
56-
/usr/lib/spa-0.2/*/*
57-
rm -f ./sharun-aio
58-
cp -vn /usr/lib/obs-scripting/* ./shared/lib/obs-scripting
59-
60-
# Prepare sharun
61-
ln ./sharun ./AppRun
62-
./sharun -g
22+
wget --retry-connrefused --tries=30 "$SHARUN" -O ./quick-sharun
23+
chmod +x ./quick-sharun
24+
./quick-sharun /usr/bin/obs* /usr/lib/libobs* /usr/lib/obs-*/*
6325

6426
# MAKE APPIMAGE WITH URUNTIME
65-
cd ..
66-
wget --retry-connrefused --tries=30 "$URUNTIME" -O ./uruntime
67-
wget --retry-connrefused --tries=30 "$URUNTIME_LITE" -O ./uruntime-lite
68-
chmod +x ./uruntime*
69-
70-
# Add udpate info to runtime
71-
echo "Adding update information \"$UPINFO\" to runtime..."
72-
./uruntime-lite --appimage-addupdinfo "$UPINFO"
73-
74-
echo "Generating AppImage..."
75-
./uruntime --appimage-mkdwarfs -f \
76-
--set-owner 0 --set-group 0 \
77-
--no-history --no-create-timestamp \
78-
--compression zstd:level=22 -S26 -B8 \
79-
--header uruntime-lite \
80-
-i ./AppDir -o ./OBS-Studio-"$VERSION"-anylinux-"$ARCH".AppImage
27+
wget --retry-connrefused --tries=30 "$URUNTIME" -O ./uruntime2appimage
28+
chmod +x ./uruntime2appimage
29+
./uruntime2appimage
8130

8231
# make appbundle
8332
UPINFO="$(echo "$UPINFO" | sed 's#.AppImage.zsync#*.AppBundle.zsync#g')"
84-
wget -O ./pelf "https://github.com/xplshn/pelf/releases/latest/download/pelf_$ARCH"
33+
wget --retry-connrefused --tries=30 \
34+
"https://github.com/xplshn/pelf/releases/latest/download/pelf_$ARCH" -O ./pelf
8535
chmod +x ./pelf
8636
echo "Generating [dwfs]AppBundle..."
8737
./pelf --add-appdir ./AppDir \
@@ -91,7 +41,5 @@ echo "Generating [dwfs]AppBundle..."
9141
--add-updinfo "$UPINFO" \
9242
--compression "-C zstd:level=22 -S26 -B8" \
9343
--output-to "OBS-Studio-$VERSION-anylinux-$ARCH.dwfs.AppBundle"
94-
95-
zsyncmake ./*.AppImage -u ./*.AppImage
9644
zsyncmake ./*.AppBundle -u ./*.AppBundle
9745
echo "All Done!"

0 commit comments

Comments
 (0)