diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8435f2a..77f2104 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/.justfile b/.justfile index 87ddd28..7d287d7 100644 --- a/.justfile +++ b/.justfile @@ -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: diff --git a/packaging/appimage/video2x.desktop b/packaging/appimage/video2x.desktop new file mode 100644 index 0000000..4394495 --- /dev/null +++ b/packaging/appimage/video2x.desktop @@ -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 + diff --git a/packaging/appimage/video2x.png b/packaging/appimage/video2x.png new file mode 100644 index 0000000..f7cd409 Binary files /dev/null and b/packaging/appimage/video2x.png differ