Skip to content

Commit 32cebe7

Browse files
committed
ci: create linux appimage
1 parent 85859ec commit 32cebe7

File tree

1 file changed

+22
-31
lines changed

1 file changed

+22
-31
lines changed

.github/workflows/build.yml

Lines changed: 22 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
apt install -y git curl zip libtool automake autoconf autopoint make \
9595
gettext pkg-config subversion cmake cvs zip bzip2 patchelf \
9696
p7zip-full wget dos2unix ragel yasm g++ protobuf-compiler \
97-
m4 ant build-essential libtool-bin libavformat-dev \
97+
m4 ant build-essential libtool-bin libavformat-dev fuse fuse3 \
9898
libswresample-dev libavutil-dev libpostproc-dev libswscale-dev \
9999
wayland-protocols qtbase5-private-dev libarchive-dev libmpg123-dev \
100100
libnfs-dev libqt5svg5-dev flex bison curl qtdeclarative5-dev \
@@ -103,45 +103,36 @@ jobs:
103103
104104
chmod -R 777 /project && git config --global --add safe.directory '*'
105105
106-
cd /project && mkdir vlc-install
106+
cd /project
107107
108108
./bootstrap &&\
109-
./configure --prefix="$PWD/vlc-install" --disable-qt &&\
109+
./configure --prefix="/usr" &&\
110110
make -j"$(nproc)" &&\
111-
make install
112-
113-
cd vlc-install
114-
115-
find "./bin" -maxdepth 1 -type f | while read -r exe; do
116-
echo "Patching rpath in: $exe"
117-
patchelf --set-rpath '$ORIGIN/../lib:$ORIGIN' "$exe" || :
118-
done
119-
120-
find "./lib" -maxdepth 1 -type f | while read -r exe; do
121-
echo "Patching rpath in: $exe"
122-
patchelf --set-rpath '$ORIGIN/../lib:$ORIGIN' "$exe" || :
123-
done
124-
125-
find "./lib/vlc" -maxdepth 1 -type f | while read -r exe; do
126-
echo "Patching rpath in: $exe"
127-
patchelf --set-rpath '$ORIGIN/../../lib:$ORIGIN' "$exe" || :
128-
done
129-
130-
find "./lib/vlc/plugins" -type f | while read -r exe; do
131-
echo "Patching rpath in: $exe"
132-
patchelf --set-rpath '$ORIGIN/../../../../lib:$ORIGIN' "$exe" || :
133-
done
134-
135-
zip -r vlc-linux-${{ matrix.arch }}.zip *
136-
mv vlc-linux-${{ matrix.arch }}.zip ../
137-
chmod 777 ../vlc-linux-${{ matrix.arch }}.zip
111+
make -j"$(nproc)" DESTDIR=$(pwd)/build/ install
112+
113+
rm /project/build/usr/lib/vlc/plugins/plugins.dat
114+
115+
find /project/build/usr/lib/vlc/ -maxdepth 1 -name "lib*.so*" -exec patchelf --set-rpath '$ORIGIN/../' {} \;
116+
find /project/build/usr/lib/vlc/plugins/ -name "lib*.so*" -exec patchelf --set-rpath '$ORIGIN/../../:$ORIGIN/../../../' {} \;
117+
118+
curl -LO 'https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage' &&\
119+
120+
chmod a+x linuxdeployqt-continuous-x86_64.AppImage
121+
122+
# linuxdeployqt workaround
123+
mkdir -p /project/build/usr/share/doc/libc6 &&\
124+
touch /project/build/usr/share/doc/libc6/copyright
125+
126+
./linuxdeployqt-continuous-x86_64.AppImage /project/build/usr/share/applications/vlc.desktop -appimage -unsupported-allow-new-glibc -bundle-non-qt-libs -exclude-libs=libfreetype.so.6
127+
128+
mv VLC_media_player-*.AppImage vlc-linux-${{ matrix.arch }}.appimage && chmod 777 vlc-linux-${{ matrix.arch }}.appimage
138129
139130
- name: Upload binaries
140131
uses: simplex-chat/action-gh-release@v2
141132
with:
142133
append_body: true
143134
fail_on_unmatched_files: true
144-
files: ./vlc-linux-${{ matrix.arch }}.zip
135+
files: ./vlc-linux-${{ matrix.arch }}.appimage
145136
env:
146137
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
147138

0 commit comments

Comments
 (0)