From 65f62e50a13885203cf66dbb166a4de95b2d45b7 Mon Sep 17 00:00:00 2001 From: asayed18 <33804215+asayed18@users.noreply.github.com> Date: Thu, 1 Oct 2026 03:07:06 +0200 Subject: [PATCH] Accept stock VLC.app without a video_filter folder VLC for macOS keeps every plugin directly in Contents/MacOS/plugins and scans it recursively, so video_filter only exists where icop was installed before. The installer required that folder and failed on every fresh VLC.app, including Homebrew's VLC 3.0.24 in the v0.1.7 release build. On macOS, accept Contents/MacOS/plugins/video_filter when its parent holds the VLC executable, decide on sudo by the folder the install creates it in, and let the existing mkdir -p create it. Verified against stock VLC 3.0.24 (Homebrew DMG): dry run, install (7 files) and uninstall; a non-VLC folder is still rejected. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 4 ++++ tools/install_icop_plugin.sh | 15 ++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c23e81..4721464 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,10 @@ first, and short hashes identify the commit that introduced each change. CoreML run one worker, and with one thread marqo needed ~120 ms per frame, so automatic strides fell behind real time (a 720p30 file ended up seconds late). `NSFW_ONNX_INTRA_OP_THREADS` overrides the value. +- The macOS installer accepts a stock VLC.app, whose plugins sit directly in + `Contents/MacOS/plugins` with no `video_filter` folder, and creates that + folder on install. It previously refused every VLC.app that icop had not + been installed into before, which failed the v0.1.7 release build. - Bump the version to 0.1.7 so the fixed macOS packages do not reuse the broken v0.1.6 draft. diff --git a/tools/install_icop_plugin.sh b/tools/install_icop_plugin.sh index dcf5c9c..a3bc5e5 100755 --- a/tools/install_icop_plugin.sh +++ b/tools/install_icop_plugin.sh @@ -190,12 +190,21 @@ $vlc_root/lib/$multiarch/vlc/plugins/video_filter" fi fi + # Stock VLC.app keeps every plugin directly in Contents/MacOS/plugins and + # scans it recursively, so video_filter only exists after a previous + # icop install; accept the plugins folder and let the install create it. printf '%s\n' "$candidates" | while IFS= read -r candidate; do [ -n "$candidate" ] || continue if [ -d "$candidate" ]; then printf '%s\n' "$candidate" break fi + if [ "$platform" = mac ] && + [ -d "$(dirname -- "$candidate")" ] && + [ -f "$(dirname -- "$candidate")/../VLC" ]; then + printf '%s\n' "$candidate" + break + fi done } @@ -412,7 +421,11 @@ if command -v pgrep >/dev/null 2>&1 && pgrep -x "$process_name" >/dev/null 2>&1; fi needs_sudo=0 -if [ ! -w "$plugin_directory" ]; then +# video_filter may not exist yet (see find_plugin_directory); judge by the +# folder the install will create it in. +writable_directory=$plugin_directory +[ -d "$writable_directory" ] || writable_directory=$(dirname -- "$plugin_directory") +if [ ! -w "$writable_directory" ]; then command -v sudo >/dev/null 2>&1 || { rm -f "$payload_list" die "plugin directory is not writable and sudo is unavailable: $plugin_directory"