mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-29 21:32:44 -08:00
fix: use Alloy CEF media permissions
This commit is contained in:
3 files changed
+14
-11
No files matched your search
@@ -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
|
||||
|
||||
Generated
+1
-1
@@ -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",
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user