diff --git a/scripts/cef/copy-libs.sh b/scripts/cef/copy-libs.sh index e044e1133..d3a7f3dea 100755 --- a/scripts/cef/copy-libs.sh +++ b/scripts/cef/copy-libs.sh @@ -12,15 +12,6 @@ PROFILE="${1:-debug}" ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" DEST="${2:-$ROOT/src-tauri/target/$PROFILE}" -CEF_DIR="$( - find "$ROOT/src-tauri/target/$PROFILE/build" \ - -type d -name cef_linux_x86_64 -print -quit 2>/dev/null || true -)" -if [ -z "$CEF_DIR" ]; then - echo "❌ CEF dist not found under target/$PROFILE/build — build with --features cef first." >&2 - exit 1 -fi - CEF_VERSION="$(awk ' /^\[\[package\]\]$/ { in_cef=0 } /^name = "cef"$/ { in_cef=1 } @@ -36,6 +27,18 @@ if [ -z "$CEF_VERSION" ]; then fi CEF_MAJOR="${CEF_VERSION%%.*}" +CEF_DIR="" +while IFS= read -r candidate; do + if grep -q "^#define CEF_VERSION_MAJOR $CEF_MAJOR$" "$candidate/include/cef_version.h" 2>/dev/null; then + CEF_DIR="$candidate" + break + fi +done < <(find "$ROOT/src-tauri/target/$PROFILE/build" -type d -name cef_linux_x86_64 2>/dev/null) +if [ -z "$CEF_DIR" ]; then + echo "❌ CEF $CEF_MAJOR dist not found under target/$PROFILE/build — build with --features cef first." >&2 + exit 1 +fi + CEF_LIB="$CEF_DIR/libcef.so" if [ ! -f "$CEF_LIB" ]; then echo "❌ libcef.so not found in $CEF_DIR." >&2 diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 570f200e5..1b20ed318 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -6957,7 +6957,7 @@ dependencies = [ [[package]] name = "tauri-runtime-cef" version = "0.1.0" -source = "git+https://github.com/SableClient/tauri-runtime-cef?branch=main#92d67142bf830fd983905da65a60a44665eee52d" +source = "git+https://github.com/SableClient/tauri-runtime-cef?branch=main#c0d9ff8ecf0eac8504c1947932274e7fe7d9fb8c" dependencies = [ "base64 0.22.1", "cef", diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 32206257c..34d6e6d07 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -131,7 +131,7 @@ fn main() { .cloned() .collect(); - if permission_kinds.is_empty() { + if permission_kinds.is_empty() || permission_kinds.len() != request.kinds.len() { return responder.deny(DenyReason::NoPolicy); }