-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmenuforge-dep-installer
More file actions
executable file
·63 lines (51 loc) · 2.16 KB
/
Copy pathmenuforge-dep-installer
File metadata and controls
executable file
·63 lines (51 loc) · 2.16 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
#!/bin/bash
# MenuForge v1.2.0 Dependency Installer
# Powered by SahooShuvranshu & Crystal Studio Labs
if [ -z "$BASH_VERSION" ]; then
echo "Error: This script must be run with bash."
exit 1
fi
# ---------------------------------------------------------
# Dynamic Environment Bootstrapping
# Links the shared core library to identify hardware capabilities
# and distribution-specific package naming.
# ---------------------------------------------------------
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
LIB_PATH="$HOME/.local/bin/menuforge-lib.sh"
[ -f "$LIB_PATH" ] || LIB_PATH="$SCRIPT_DIR/menuforge-lib.sh"
[ -f "$LIB_PATH" ] || LIB_PATH="./menuforge-lib.sh"
if [ -f "$LIB_PATH" ]; then
source "$LIB_PATH"
else
echo "Architecture Failure: menuforge-lib.sh (core) not found."
exit 1
fi
# Validation: Verify TUI framework availability.
command -v gum &> /dev/null || error_exit "Runtime Failure: 'gum' (TUI framework) is required but missing."
banner "INFRASTRUCTURE DEPLOYMENT" "v1.2.0 | Developed by SahooShuvranshu & Crystal Studio Labs"
gum spin --spinner dot --title "Synchronizing Package Repositories..." -- sleep 1
gum style --bold "Initiating deployment of high-performance components:"
echo " - GameMode (Performance Layer)"
echo " - MangoHud (Telemetry Layer)"
echo " - Gamescope (Resolution Micro-Compositor)"
[ "$HAS_NVIDIA" = true ] && echo " - NVIDIA Prime Support (Hybrid Graphics Offloading)"
echo " - Wine (Compatibility Layer)"
echo ""
DEPS=$(get_deps)
if [ "$PKG_MANAGER" != "unknown" ]; then
echo "This process requires administrative privileges and may take time."
sudo -v || error_exit "Sudo authentication failed."
bash -c "$INSTALL_CMD $DEPS" || error_exit "Dependency installation failed."
else
gum style --foreground 3 " [!] Distro not officially supported for auto-install."
echo " Please install core dependencies manually: gamemode, mangohud, gamescope, wine"
echo ""
gum style --faint " Press any key to close this terminal..."
read -n 1
exit 0
fi
echo ""
gum style --foreground 10 --bold "✓ ALL COMPONENTS OPERATIONAL"
echo ""
gum style --faint "Press any key to exit helper..."
read -n 1