-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.command
More file actions
executable file
·55 lines (44 loc) · 1.34 KB
/
install.command
File metadata and controls
executable file
·55 lines (44 loc) · 1.34 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
#!/bin/bash
# OView Installer — double-click this file to install OView
echo "==========================="
echo " OView Installer"
echo "==========================="
echo ""
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
APP_PATH="$SCRIPT_DIR/OView.app"
if [ ! -d "$APP_PATH" ]; then
# Check common locations
for dir in ~/Downloads ~/Desktop; do
if [ -d "$dir/OView.app" ]; then
APP_PATH="$dir/OView.app"
break
fi
done
fi
if [ ! -d "$APP_PATH" ]; then
echo "ERROR: OView.app not found."
echo "Make sure OView.app is in the same folder as this script."
echo ""
read -p "Press Enter to close..."
exit 1
fi
echo "Found: $APP_PATH"
echo ""
# Remove macOS quarantine
echo "Removing quarantine flag..."
xattr -cr "$APP_PATH"
# Reset Screen Recording permission for clean start
echo "Resetting Screen Recording permission..."
tccutil reset ScreenCapture com.oview.app 2>/dev/null
# Copy to Applications
echo "Copying to /Applications..."
cp -R "$APP_PATH" /Applications/OView.app 2>/dev/null
xattr -cr /Applications/OView.app 2>/dev/null
echo ""
echo "Done! Launching OView..."
echo ""
echo "IMPORTANT: When prompted, grant Screen Recording permission,"
echo "then quit and reopen OView."
echo ""
open /Applications/OView.app 2>/dev/null || open "$APP_PATH"
read -p "Press Enter to close..."