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"