-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_macos.sh
More file actions
executable file
·61 lines (52 loc) · 2.54 KB
/
setup_macos.sh
File metadata and controls
executable file
·61 lines (52 loc) · 2.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
# eBrowser v2.0 — macOS Build Script
# Builds with Apple's security hardening (Hardened Runtime + Library Validation)
set -e
echo "╔══════════════════════════════════════════════════════════════╗"
echo "║ eBrowser v2.0 — macOS Build ║"
echo "╚══════════════════════════════════════════════════════════════╝"
echo ""
# Check dependencies
command -v cmake >/dev/null 2>&1 || { echo "Installing cmake..."; brew install cmake; }
command -v sdl2-config >/dev/null 2>&1 || { echo "Installing SDL2..."; brew install sdl2; }
# Create include symlink for case-sensitive APFS
ln -sf ebrowser include/eBrowser 2>/dev/null || true
echo "[1/4] Configuring with security hardening..."
cmake -B build \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=ON \
-DeBrowser_BUILD_STANDALONE=ON \
-DCMAKE_C_FLAGS="-O2 -Wall -Wextra -fstack-protector-strong -D_FORTIFY_SOURCE=2 -fPIE" \
-DCMAKE_EXE_LINKER_FLAGS="-pie" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0
echo ""
echo "[2/4] Building..."
cmake --build build --parallel $(sysctl -n hw.ncpu)
echo ""
echo "[3/4] Running tests..."
cd build
ctest --output-on-failure \
-R "test_memory_safety|test_sandbox|test_firewall|test_anti_fingerprint|test_extension|test_privacy|test_tab_manager|test_bookmark"
echo ""
echo "[4/4] Running benchmark..."
cd tests
./benchmark 2>/dev/null
echo ""
./load_test_combined 2>/dev/null
echo ""
echo "╔══════════════════════════════════════════════════════════════╗"
echo "║ Build complete! Binaries in build/ ║"
echo "╚══════════════════════════════════════════════════════════════╝"
# Show binary info
echo ""
echo "=== Binary Security Info ==="
if [ -f ../eBrowser ]; then
codesign -dvvv ../eBrowser 2>&1 | head -5 || true
otool -l ../eBrowser | grep -A2 "LC_CODE_SIGNATURE\|PIE\|RESTRICT" || true
fi
echo ""
ls -lh benchmark load_test_combined
echo ""
echo "To run the browser: ./build/eBrowser"
echo "To run benchmark: ./build/tests/benchmark"
echo "To run load test: ./build/tests/load_test_combined"