Repository navigation
Expand file tree
/
Copy pathInstall-Str4tus.command
More file actions
executable file
·136 lines (113 loc) · 5.39 KB
/
Copy pathInstall-Str4tus.command
File metadata and controls
executable file
·136 lines (113 loc) · 5.39 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#!/bin/bash
#############################################
# STR4TUS Browser - Installer #
# © 2025 Sourceless™ #
#############################################
clear
echo ""
echo "╔═══════════════════════════════════════════════════════════╗"
echo "║ ║"
echo "║ 🚀 STR4TUS Browser Installer ║"
echo "║ The Sovereign Gateway to the Free Web ║"
echo "║ ║"
echo "╚═══════════════════════════════════════════════════════════╝"
echo ""
# Get the directory where this script is located
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
APP_NAME="Str4tus Browser.app"
APP_PATH=""
# Search for app in multiple locations
echo "🔍 Searching for application..."
if [ -d "$SCRIPT_DIR/$APP_NAME" ]; then
APP_PATH="$SCRIPT_DIR/$APP_NAME"
elif [ -d "$SCRIPT_DIR/../$APP_NAME" ]; then
APP_PATH="$SCRIPT_DIR/../$APP_NAME"
elif [ -d "$HOME/Downloads/$APP_NAME" ]; then
APP_PATH="$HOME/Downloads/$APP_NAME"
elif [ -d "$HOME/Downloads/Str4tus-Distribution/$APP_NAME" ]; then
APP_PATH="$HOME/Downloads/Str4tus-Distribution/$APP_NAME"
elif [ -d "/Applications/$APP_NAME" ]; then
APP_PATH="/Applications/$APP_NAME"
fi
if [ -z "$APP_PATH" ] || [ ! -d "$APP_PATH" ]; then
echo ""
echo "❌ ERROR: Cannot find $APP_NAME"
echo ""
echo "Please make sure:"
echo "1. You extracted the ZIP file first"
echo "2. This script is in the same folder as $APP_NAME"
echo ""
read -p "Press Enter to exit..."
exit 1
fi
echo "✅ Found: $APP_PATH"
echo ""
# Remove ALL quarantine and extended attributes
echo "🔓 Removing macOS security restrictions..."
echo " (This may take a moment...)"
echo ""
# Method 1: Remove quarantine attribute
xattr -d com.apple.quarantine "$APP_PATH" 2>/dev/null
# Method 2: Remove ALL extended attributes recursively
xattr -cr "$APP_PATH" 2>/dev/null
# Method 3: Also remove from all contents inside
find "$APP_PATH" -type f -exec xattr -c {} \; 2>/dev/null
find "$APP_PATH" -type d -exec xattr -c {} \; 2>/dev/null
# Method 4: Specifically target common problematic files
xattr -d com.apple.quarantine "$APP_PATH/Contents/MacOS/"* 2>/dev/null
xattr -cr "$APP_PATH/Contents/MacOS/"* 2>/dev/null
xattr -cr "$APP_PATH/Contents/Frameworks/"* 2>/dev/null
echo "✅ Security restrictions removed!"
echo ""
# Ask if user wants to install to Applications
read -p "📁 Install to Applications folder? (recommended) [Y/n]: " install_choice
if [[ "$install_choice" != "n" && "$install_choice" != "N" ]]; then
echo ""
echo "📥 Installing to Applications..."
# Remove old version if exists
if [ -d "/Applications/$APP_NAME" ]; then
echo " Removing old version..."
rm -rf "/Applications/$APP_NAME" 2>/dev/null
fi
# Copy to Applications
cp -R "$APP_PATH" "/Applications/" 2>/dev/null
if [ $? -eq 0 ]; then
echo "✅ Installed to /Applications/"
APP_PATH="/Applications/$APP_NAME"
# Remove quarantine from installed app too
xattr -cr "$APP_PATH" 2>/dev/null
find "$APP_PATH" -exec xattr -c {} \; 2>/dev/null
else
echo "⚠️ Could not copy to Applications"
echo " Will launch from current location..."
fi
fi
echo ""
echo "🚀 Launching STR4TUS Browser..."
sleep 1
# Open the application
open "$APP_PATH"
# Check if it opened successfully
sleep 2
if pgrep -x "Str4tus Browser" > /dev/null; then
echo ""
echo "╔═══════════════════════════════════════════════════════════╗"
echo "║ ║"
echo "║ ✅ SUCCESS! STR4TUS Browser is running! ║"
echo "║ ║"
echo "╚═══════════════════════════════════════════════════════════╝"
else
echo ""
echo "╔═══════════════════════════════════════════════════════════╗"
echo "║ ║"
echo "║ ⚠️ If the app didn't open, try this: ║"
echo "║ ║"
echo "║ 1. Go to System Settings → Privacy & Security ║"
echo "║ 2. Scroll down to find 'Str4tus Browser' ║"
echo "║ 3. Click 'Open Anyway' ║"
echo "║ ║"
echo "╚═══════════════════════════════════════════════════════════╝"
fi
echo ""
echo "This window will close in 10 seconds..."
sleep 10