Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
0d7313d
feat: wip linux
f0e Apr 9, 2025
4ff53a3
feat: wip linux workflow
f0e Apr 9, 2025
162a80b
feat: download svpflow on linux
f0e Apr 9, 2025
cd974fd
feat: install ffmpeg shared
f0e Apr 9, 2025
40fdd54
feat: support tar.xz
f0e Apr 9, 2025
c0df66e
fix: sudo
f0e Apr 9, 2025
f8a88ed
fix: ffmpeg download
f0e Apr 9, 2025
2a4af6e
fix: add ffmpeg shared to path
f0e Apr 9, 2025
c57a043
fix: try add it all to root idk
f0e Apr 9, 2025
6ed1287
fix: add to usr local properly
f0e Apr 9, 2025
dfb00af
fix: install libxxhash
f0e Apr 9, 2025
c2dab0a
fix: install nasm
f0e Apr 9, 2025
427a28f
fix: install fftw3
f0e Apr 9, 2025
2a92037
fix: uninstall llvm 17
f0e Apr 9, 2025
b00be90
feat: use akarin fork with newer llvm support
f0e Apr 9, 2025
2e836ea
fix: mac llvm 19 akarin build
f0e Apr 9, 2025
8040a71
fix: llvm version on linux
f0e Apr 9, 2025
b11117a
fix: that forks llvm19 support is fake news just use 16
f0e Apr 9, 2025
2eb8ea0
fix: remove default llvm
f0e Apr 9, 2025
a50c4f7
wip: appimage
f0e Apr 9, 2025
cbf58e0
feat: appimage files
f0e Apr 9, 2025
940e775
chore: remove doc
f0e Apr 9, 2025
e5ab585
feat: appimage script
f0e Apr 9, 2025
f2780aa
fix: download svpflow to the right place
f0e Apr 9, 2025
446d782
feat: appimage script cont
f0e Apr 9, 2025
26f652a
feat: appimage cont
f0e Apr 9, 2025
51ead2a
fix: linux
f0e Apr 9, 2025
e1a80d0
fix: linux workflow
f0e Apr 9, 2025
c66c5bb
fix: dont break when linuxdeploy doesnt exist
f0e Apr 9, 2025
1156add
fix: fixes
f0e Apr 9, 2025
3ebe4d1
fix: try fix libvapoursynth.so not found
f0e Apr 9, 2025
9e41f41
fix: binary paths
f0e Apr 9, 2025
209fdad
refactor: cleanup
f0e Apr 9, 2025
44c0d9b
fix: try move binaries to bin
f0e Apr 10, 2025
97455b6
fix: try fix paths
f0e Apr 10, 2025
afaf262
fix: linux paths
f0e Apr 10, 2025
9468849
fix: copy ffmpeg libs since it isnt static on linux
f0e Apr 10, 2025
69f2672
fix: use lib path for ffmpeg video file check too
f0e Apr 10, 2025
2d5462c
feat: don't try to install stuff mac runners already have installed b…
f0e Apr 10, 2025
4794f31
fix: python path stuff
f0e Apr 11, 2025
b2bb7a2
fix: fixes
f0e Apr 11, 2025
499f296
chore: this isnt needed
f0e Apr 11, 2025
8c18546
tmp: comment cause its fedora specific
f0e Apr 11, 2025
aa66800
tmp
f0e Apr 11, 2025
f4fc5af
test
f0e Apr 12, 2025
5cba4d0
revert: test
f0e Apr 13, 2025
e96c048
test: try uninstall python first
f0e Apr 13, 2025
7e3afc5
testing
f0e Apr 13, 2025
0d1b7ba
fix: python path fixes
f0e Apr 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 43 additions & 30 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
- name: Collect dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install python3 ffmpeg libass zimg imagemagick autoconf automake libtool pkg-config gcc ffmpeg llvm@12 meson xxhash vapoursynth fftw dylibbundler
brew install ffmpeg libass zimg imagemagick autoconf automake libtool ffmpeg llvm@19 meson xxhash vapoursynth fftw dylibbundler
cd ci
bash build-dependencies-macos.sh

Expand All @@ -82,12 +82,14 @@ jobs:
wget -q https://raw.githubusercontent.com/styler00dollar/VapourSynth-RIFE-ncnn-Vulkan/master/models/rife-v4.26_ensembleFalse/flownet.param
cd ../../

- name: Install LLVM and Clang
if: runner.os != 'Windows' && runner.os != 'Linux' # Skip on Windows and Linux
uses: KyleMayes/install-llvm-action@v2
with:
env: true
version: 17
- name: Collect dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get remove llvm*
sudo apt-get remove --purge -y 'python3-*' || true
sudo apt-get install -y libzimg-dev meson libxxhash-dev nasm libfftw3-dev llvm-16
cd ci
bash build-dependencies-linux.sh

- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
Expand Down Expand Up @@ -122,6 +124,36 @@ jobs:
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg

- name: Copy installer requirements (Windows)
if: runner.os == 'Windows'
shell: bash
run: |
cp -r ci/out/* installer/dependencies/lib

curl -L https://aka.ms/vs/17/release/vc_redist.x64.exe -o installer/redist/vc_redist.x64.exe

cp bin/${{ matrix.build-type }}/*.exe installer/resources

- name: Build installer (Windows)
if: runner.os == 'Windows'
uses: Minionguyjpro/Inno-Setup-Action@v1.2.2
with:
path: installer/setup.iss
options: /O+

- name: Rename Installer (Windows)
if: runner.os == 'Windows'
run: |
mv installer/output/blur-installer.exe installer/output/blur-Windows-Installer-x64.exe

- name: Create AppImage (Linux)
if: runner.os == 'Linux'
shell: bash
run: |
cd ci
bash build-appimage.sh "../bin/${{ matrix.build-type }}/blur" "../bin/${{ matrix.build-type }}/blur-cli"
cp Blur-*.AppImage Blur.AppImage

- name: Prepare Binaries
id: prep
shell: bash
Expand Down Expand Up @@ -206,33 +238,12 @@ jobs:

# Output for subsequent steps
echo "build_dir=$build_dir" >> $GITHUB_OUTPUT
echo "cli_binary=$cli_binary" >> $GITHUB_OUTPUT
echo "gui_binary=$gui_binary" >> $GITHUB_OUTPUT
echo "cli_path=$cli_path" >> $GITHUB_OUTPUT
echo "gui_path=$gui_path" >> $GITHUB_OUTPUT
echo "configuration=$configuration" >> $GITHUB_OUTPUT

- name: Copy installer requirements (Windows)
if: runner.os == 'Windows'
shell: bash
run: |
cp -r ci/out/* installer/dependencies/lib

curl -L https://aka.ms/vs/17/release/vc_redist.x64.exe -o installer/redist/vc_redist.x64.exe

cp ${{ steps.prep.outputs.build_dir }}/${{ steps.prep.outputs.gui_path }} installer/resources/blur.exe
cp ${{ steps.prep.outputs.build_dir }}/${{ steps.prep.outputs.cli_path }} installer/resources/blur-cli.exe

- name: Build installer (Windows)
if: runner.os == 'Windows'
uses: Minionguyjpro/Inno-Setup-Action@v1.2.2
with:
path: installer/setup.iss
options: /O+

- name: Rename Installer (Windows)
if: runner.os == 'Windows'
run: |
mv installer/output/blur-installer.exe installer/output/blur-Windows-Installer-x64.exe

- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
Expand All @@ -241,6 +252,7 @@ jobs:
${{ steps.prep.outputs.build_dir }}/${{ steps.prep.outputs.cli_path }}
${{ steps.prep.outputs.build_dir }}/${{ steps.prep.outputs.gui_path }}
${{ runner.os == 'Windows' && 'installer/output/blur-Windows-Installer-x64.exe' || '' }}
${{ runner.os == 'Linux' && 'ci/Blur.AppImage' || '' }}

- name: Release
uses: softprops/action-gh-release@v2
Expand All @@ -250,3 +262,4 @@ jobs:
${{ steps.prep.outputs.build_dir }}/${{ steps.prep.outputs.cli_path }}
${{ steps.prep.outputs.build_dir }}/${{ steps.prep.outputs.gui_path }}
${{ runner.os == 'Windows' && 'installer/output/blur-Windows-Installer-x64.exe' || '' }}
${{ runner.os == 'Linux' && 'ci/Blur.AppImage' || '' }}
2 changes: 2 additions & 0 deletions ci/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
build
download
out
appimage
*.AppImage
67 changes: 67 additions & 0 deletions ci/build-appimage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#!/bin/bash
set -e

rm -rf appimage/

# sudo cp -r out/python/bin/* /usr/local/bin
# sudo cp -r out/python/include/* /usr/local/include
# sudo cp -r out/python/lib/* /usr/local/lib

# create appdir structure
mkdir -p appimage/usr/bin/
mkdir -p appimage/usr/bin/ffmpeg/
mkdir -p appimage/usr/bin/vapoursynth/
mkdir -p appimage/usr/lib/
mkdir -p appimage/usr/share/applications/
mkdir -p appimage/usr/share/icons/hicolor/256x256/apps/

# download linuxdeploy tool
rm -f linuxdeploy-x86_64.AppImage
wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
chmod +x linuxdeploy-x86_64.AppImage

# copy binaries from arguments
for arg in "$@"; do
cp "$arg" appimage/usr/bin/
done

# copy desktop file and icon
cp ../resources/blur.desktop appimage/usr/share/applications/blur.desktop
cp ../resources/blur.png appimage/usr/share/icons/hicolor/256x256/apps/blur.png

# copy python bin & lib
cp out/python/bin/* appimage/usr/bin/
cp -r out/python/lib/* appimage/usr/lib/

# copy shared libraries
cp /usr/local/lib/libvapoursynth* appimage/usr/lib/
cp -r out/ffmpeg-shared/lib/* appimage/usr/lib/

# # this is also required for a vapoursynth plugin that i forget
# cp /usr/lib64/libfftw3* appimage/usr/lib

# copy vapoursynth plugins
mkdir appimage/usr/bin/vapoursynth-plugins/
cp out/vapoursynth-plugins/*.so appimage/usr/bin/vapoursynth-plugins/

# copy additional binaries
cp -r out/ffmpeg/* appimage/usr/bin/ffmpeg/
cp -r out/vapoursynth/* appimage/usr/bin/vapoursynth/

# copy vapoursynth scripts
mkdir -p appimage/usr/bin/lib/
old_dir=$PWD
cd ../src/vapoursynth/
find . -name "*.py" -exec cp --parents {} ../../ci/appimage/usr/bin/lib/ \;
cd $old_dir

# set executable permissions for all binaries
chmod +x appimage/usr/bin/*
chmod +x appimage/usr/bin/ffmpeg*
chmod +x appimage/usr/bin/vapoursynth*

# build the appimage
# export NO_STRIP=true # (fedora)

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
./linuxdeploy-x86_64.AppImage --appdir=appimage --output=appimage
176 changes: 176 additions & 0 deletions ci/build-dependencies-linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
#!/bin/bash
set -e

out_dir=out

echo "Building dependencies for Linux"

# clean outputs every run
rm -rf $out_dir
mkdir -p $out_dir

download_archive() {
local url="$1"
local dir_name="$2"
local out_path="$3"
local subfolder="$4"

original_dir=$(pwd)

mkdir -p download
cd download

if [ -d "$dir_name" ]; then
echo "$dir_name already exists. Skipping download."
cd "$dir_name"
else
mkdir -p "$dir_name" && cd "$dir_name"

echo "Downloading $dir_name"

if [[ "$url" == *.zip ]]; then
wget -q "$url" -O "$dir_name.zip"
unzip "$dir_name.zip"
rm "$dir_name.zip"
elif [[ "$url" == *.tar.xz ]]; then
wget -q "$url" -O "$dir_name.tar.xz"
tar -xf "$dir_name.tar.xz"
rm "$dir_name.tar.xz"
else
echo "Unsupported archive format: $url"
cd "$original_dir"
return 1
fi
fi

dest_path="$original_dir/$out_dir/$out_path"

echo "Copying files from $subfolder to $dest_path"

cp -r "${subfolder:=.}" "$dest_path"

cd "$original_dir"
}

build() {
local repo="$1"
local pull_args="$2"
local name="$3"
local build_cmd="$4"
local lib_path="$5"
local out_path="$6"

echo "--- Building $name ---"

mkdir -p build
cd build

if [ ! -d "$name" ]; then
echo "Cloning $name..."
# shellcheck disable=SC2086
git clone $pull_args "$repo" "$name"
cd "$name"
else
echo "Updating $name..."
cd "$name"
git pull
fi

eval "$build_cmd"

# copy built stuff
dest_path="../../$out_dir/$out_path"
mkdir -p "$dest_path"

if [[ -n "$lib_path" ]]; then
echo "Copying $name libraries to $dest_path"
find "$lib_path" -name "*.so" -exec cp {} "$dest_path" \;
else
echo "Skipping copy: lib_path is empty"
fi

cd ../..
}

# downloads
## ffmpeg (shared) (for building bestsource) (libavutil in apt is outdated)
download_archive \
"https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linux64-gpl-shared.tar.xz" \
"ffmpeg-shared" \
"ffmpeg-shared" \
"ffmpeg-master-latest-linux64-gpl-shared"

sudo cp -r "$out_dir/ffmpeg-shared/bin/"* /usr/local/bin/
sudo cp -r "$out_dir/ffmpeg-shared/lib/"* /usr/local/lib/
sudo cp -r "$out_dir/ffmpeg-shared/include/"* /usr/local/include/

mkdir -p $out_dir/ffmpeg
cp $out_dir/ffmpeg-shared/bin/ffmpeg $out_dir/ffmpeg

## svpflow
download_archive \
"https://web.archive.org/web/20190322064557/http://www.svp-team.com/files/gpl/svpflow-4.2.0.142.zip" \
"svpflow" \
"vapoursynth-plugins" \
"svpflow-4.2.0.142/lib-linux"

## python for vapoursynth
mkdir -p download/python
cd download/python

if [ ! -d "python" ]; then
wget -q https://github.com/astral-sh/python-build-standalone/releases/download/20250317/cpython-3.12.9+20250317-x86_64-unknown-linux-gnu-install_only.tar.gz -O python.tar.gz
mkdir -p python
tar -xzf python.tar.gz -C python --strip-components 1
rm python.tar.gz
fi

# copy python to output directory
python_dest_path="../../$out_dir/python"
mkdir -p "$python_dest_path"
cp -R python/* "$python_dest_path"

cd ../..

$out_dir/python/bin/pip install --upgrade pip
$out_dir/python/bin/pip install cython

# builds
## vapoursynth

PATH="$PWD/$out_dir/python/bin:$PATH"
PYTHON_PREFIX="$PWD/$out_dir/python"

build "https://github.com/vapoursynth/vapoursynth.git" "" "vapoursynth" "
./autogen.sh
PYTHON3_LIBS=\"-L$PYTHON_PREFIX/lib/python3.12 -L$PYTHON_PREFIX/lib -lpython3.12\" \
PYTHON3_CFLAGS=\"-I$PYTHON_PREFIX/include/python3.12\" \
./configure --with-python_prefix=\"$PYTHON_PREFIX\" --with-cython=\"$PYTHON_PREFIX/bin/cython\"
make
sudo make install
" "" "vapoursynth"

### copy vspipe
cp build/vapoursynth/.libs/vspipe $out_dir/vapoursynth

## bestsource
build "https://github.com/vapoursynth/bestsource.git" "--depth 1 --recurse-submodules --shallow-submodules --remote-submodules" "bestsource" "
meson setup build
ninja -C build
" "build" "vapoursynth-plugins"

## mvtools
build "https://github.com/dubhater/vapoursynth-mvtools.git" "" "mvtools" "
meson setup build
ninja -C build
" "build" "vapoursynth-plugins"

## akarin
rm -rf build/akarin
build "https://github.com/Jaded-Encoding-Thaumaturgy/akarin-vapoursynth-plugin.git" "" "akarin" "
git checkout 689cba74e7c71caf808b6feaaba0a32981c1956f
meson build
ninja -C build
" "build" "vapoursynth-plugins"

echo "done"
7 changes: 5 additions & 2 deletions ci/build-dependencies-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,14 @@ meson build
ninja -C build
" "build" "vapoursynth-plugins"

PATH="/opt/homebrew/opt/llvm@12/bin:$PATH"
PATH="/opt/homebrew/opt/llvm@19/bin:$PATH"

ZSTD_PREFIX=$(brew --prefix zstd)

## akarin
build "https://github.com/AkarinVS/vapoursynth-plugin.git" "--depth 1 --single-branch" "akarin" "
build "https://github.com/Jaded-Encoding-Thaumaturgy/akarin-vapoursynth-plugin.git" "" "akarin" "
meson build
sed -i.bak \"s|-lzstd|-L${ZSTD_PREFIX}/lib -lzstd|g\" build/build.ninja # fuck you
ninja -C build
" "build" "vapoursynth-plugins"

Expand Down
8 changes: 8 additions & 0 deletions resources/blur.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Desktop Entry]
Name=Blur
Comment=Blur Application
Exec=blur
Icon=blur
Type=Application
Categories=Utility;
Terminal=false
Binary file added resources/blur.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading