build(appimage): add AppImage build script

Signed-off-by: k4yt3x <i@k4yt3x.com>
This commit is contained in:
k4yt3x 2025-01-10 00:00:00 +00:00
parent 68796e630e
commit 8b630cf0c7
No known key found for this signature in database
4 changed files with 112 additions and 1 deletions

View File

@ -82,7 +82,7 @@ jobs:
shell: pwsh
run: |
$ffmpegVersion = "7.1"
$ncnnVersion = "20240820"
$ncnnVersion = "20241226"
git submodule update --init --recursive
@ -122,3 +122,58 @@ jobs:
image: video2x
tags: latest
pushImage: false
appimage:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
git submodule update --init --recursive
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential cmake clang pkg-config ninja-build curl file fuse \
libavcodec-dev \
libavdevice-dev \
libavfilter-dev \
libavformat-dev \
libavutil-dev \
libswscale-dev \
libvulkan-dev \
glslang-tools \
libomp-dev \
libboost-program-options1.83-dev \
libboost-program-options1.83.0 \
libspdlog-dev
- name: Build Video2X
run: |
cmake -G Ninja -B build -S . \
-DVIDEO2X_USE_EXTERNAL_NCNN=OFF \
-DNCNN_BUILD_SHARED_LIBS=ON \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_BUILD_TYPE=Release \
-DNCNN_AVX512=OFF \
-DCMAKE_INSTALL_PREFIX=AppDir/usr
cmake --build build --config Release --target install --parallel
- name: Build AppImage
run: |
sudo curl -Lo /usr/local/bin/linuxdeploy \
https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
sudo chmod +x /usr/local/bin/linuxdeploy
LD_LIBRARY_PATH=AppDir/usr/lib linuxdeploy \
--appdir AppDir \
--executable AppDir/usr/bin/video2x \
--exclude-library "libvulkan.so.1" \
--desktop-file packaging/appimage/video2x.desktop \
--icon-file packaging/appimage/video2x.png \
--output appimage
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Video2X-x86_64.AppImage
path: Video2X-x86_64.AppImage

View File

@ -155,6 +155,52 @@ ubuntu2204:
cp packaging/debian/control.ubuntu2204 video2x-linux-ubuntu-amd64/DEBIAN/control
dpkg-deb --build video2x-linux-ubuntu-amd64
[unix]
[group('build')]
appimage:
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential cmake clang pkg-config ninja-build curl file fuse \
libavcodec-dev \
libavdevice-dev \
libavfilter-dev \
libavformat-dev \
libavutil-dev \
libswscale-dev \
libvulkan-dev \
glslang-tools \
libomp-dev \
libboost-program-options1.83-dev \
libboost-program-options1.83.0 \
libspdlog-dev
cmake -G Ninja -B build -S . \
-DVIDEO2X_USE_EXTERNAL_NCNN=OFF \
-DNCNN_BUILD_SHARED_LIBS=ON \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_BUILD_TYPE=Release \
-DNCNN_AVX512=OFF \
-DCMAKE_INSTALL_PREFIX=AppDir/usr
cmake --build build --config Release --target install --parallel
rm -rf AppDir/usr/share/video2x/models/rife/rife \
AppDir/usr/share/video2x/models/rife/rife-HD \
AppDir/usr/share/video2x/models/rife/rife-UHD \
AppDir/usr/share/video2x/models/rife/rife-anime \
AppDir/usr/share/video2x/models/rife/rife-v2 \
AppDir/usr/share/video2x/models/rife/rife-v2.3 \
AppDir/usr/share/video2x/models/rife/rife-v2.4 \
AppDir/usr/share/video2x/models/rife/rife-v3.0 \
AppDir/usr/share/video2x/models/rife/rife-v3.1
curl -Lo /usr/local/bin/linuxdeploy \
https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
chmod +x /usr/local/bin/linuxdeploy
LD_LIBRARY_PATH=AppDir/usr/lib linuxdeploy \
--appdir AppDir \
--executable AppDir/usr/bin/video2x \
--exclude-library "libvulkan.so.1" \
--desktop-file packaging/appimage/video2x.desktop \
--icon-file packaging/appimage/video2x.png \
--output appimage
[unix]
[group('misc')]
clean:

View File

@ -0,0 +1,10 @@
[Desktop Entry]
Name=Video2X
Comment=A machine learning-based video super resolution and frame interpolation framework
TryExec=video2x
Exec=video2x
Icon=video2x
Type=Application
Terminal=true
Categories=AudioVideo;Video;Qt

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB