Skip to content
This repository has been archived by the owner on Dec 29, 2023. It is now read-only.

Commit

Permalink
Attempt to fix libapprun hooks to load ld_linux and libc for scrcpy
Browse files Browse the repository at this point in the history
  • Loading branch information
srevinsaju committed Sep 9, 2020
1 parent 9831d38 commit 3e0e4e8
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 21 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/continuous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,18 @@ jobs:
wget -c $(curl -sL https://api.github.com/repos/srevinsaju/scrcpy-appimage/releases/latest | jq -r '.assets[].browser_download_url')
chmod +x scrcpy*.AppImage
./scrcpy*.AppImage --appimage-extract
mv squashfs-root scrcpy
mkdir squashfs-root
mv scrcpy squashfs-root/.
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x appimagetool-x86_64.AppImage
ARCH=x86_64 ./appimagetool*.AppImage -n guiscrcpy.AppDir
./guiscrcpy*.AppImage --appimage-extract
cd squashfs-root
cd squashfs-root/scrcpy
wget https://github.com/AppImageCrafters/AppRun/releases/download/v1.1.2/AppRun-amd64 -O AppRun && chmod +x AppRun
wget https://github.com/AppImageCrafters/AppRun/releases/download/v1.1.2/libapprun_hooks-amd64.so -O libapprun_hooks.so && chmod +x libapprun_hooks.so
cd ..
rm squashfs-root/scrcpy.desktop
rm squashfs-root/scrcpy.png
cp pyappimage/.env.template squashfs-root/.env
cd ../..
cp pyappimage/.env.template squashfs-root/scrcpy/.env
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x appimagetool-x86_64.AppImage
./appimagetool*.AppImage squashfs-root -n -u 'gh-releases-zsync|srevinsaju|guiscrcpy|continuous|guiscrcpy*.AppImage.zsync' guiscrcpy-$(git describe --tags --match '[0-9]*')-$(uname -m).AppImage
Expand Down
18 changes: 7 additions & 11 deletions pyappimage/.env.template
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
APPIMAGE_UUID=a369f900-1b93-4164-9285-f26fdad1dfba

SYSTEM_INTERP=/lib64/ld-linux-x86-64.so.2
APPDIR_INTERP=$APPDIR/usr/lib/ld-linux-x86-64.so.2
APPDIR_INTERP=$APPDIR/scrcpy/usr/lib/ld-linux-x86-64.so.2
RUNTIME_INTERP=/tmp/appimage-a369f900-1b93-4164-9285-f26fdad1dfba-ld-linux.so.2

GUISCRCPY_SCRCPY=${APPDIR}/usr/bin/scrcpy
GUISCRCPY_ADB=${APPDIR}/usr/bin/adb
SCRCPY_SERVER_PATH=${APPDIR}/usr/local/share/scrcpy/scrcpy-server
ADB=${APPDIR}/usr/bin/adb
GUISCRCPY_APPIMAGE=True
QT_API=pyside2
SCRCPY_SERVER_PATH=${APPDIR}/scrcpy/usr/local/share/scrcpy/scrcpy-server
ADB=${APPDIR}/scrcpy/usr/bin/adb

EXEC_PATH=$APPDIR/guiscrcpy/guiscrcpy
EXEC_PATH=$APPDIR/scrcpy/usr/bin/scrcpy
EXEC_ARGS=$@

APPDIR_LIBRARY_PATH=$APPDIR/usr/lib:$APPDIR/guiscrcpy
LIBC_LIBRARY_PATH=$APPDIR/usr/lib
APPDIR_LIBRARY_PATH=$APPDIR/scrcpy/usr/lib
LIBC_LIBRARY_PATH=$APPDIR/scrcpy/usr/lib
APPDIR_LIBC_VERSION=2.35
LD_PRELOAD=$APPDIR/libapprun_hooks.so
LD_PRELOAD=$APPDIR/scrcpy/libapprun_hooks.so

10 changes: 5 additions & 5 deletions pyappimage/pyappimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ data:
$CWD/pyappimage/hooks/VERSION: $APPIMAGE/guiscrcpy/

environment:
GUISCRCPY_SCRCPY: ${APPDIR}/usr/bin/scrcpy
GUISCRCPY_ADB: ${APPDIR}/usr/bin/adb
SCRCPY_SERVER_PATH: ${APPDIR}/usr/local/share/scrcpy/scrcpy-server
ADB: ${APPDIR}/usr/bin/adb
QT_API: pyside2
GUISCRCPY_SCRCPY: ${APPDIR}/scrcpy/AppRun
GUISCRCPY_ADB: ${APPDIR}/scrcpy/usr/bin/adb
SCRCPY_SERVER_PATH: ${APPDIR}/scrcpy/usr/local/share/scrcpy/scrcpy-server
ADB: ${APPDIR}/scrcpy/usr/bin/adb
GUISCRCPY_APPIMAGE: True
PATH: ${APPDIR}/usr/bin:${PATH}

ignore-binaries:
- libstdc++*
Expand Down

0 comments on commit 3e0e4e8

Please sign in to comment.