-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrider.sh
More file actions
119 lines (95 loc) · 3.14 KB
/
Copy pathrider.sh
File metadata and controls
119 lines (95 loc) · 3.14 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
#!/usr/bin/env bash
set -Eeuo pipefail
DESKTOP_DIR="$HOME/Desktop"
DOTNET_ROOT="/usr/share/dotnet"
STARTUP_SCRIPT="/NOMone/startup.sh"
RIDER_VERSION="2026.1.3"
info() { echo -e "\n[INFO] $1"; }
ok() { echo "[ OK ] $1"; }
warn() { echo "[WARN] $1"; }
########################################
# Install Dependencies
########################################
info "Installing .NET Dependencies..."
sudo apt install -y \
libc6 \
libgcc-s1 \
libstdc++6 \
zlib1g \
libicu72 \
libssl3 \
libkrb5-3
########################################
# Install .NET
########################################
info "Fetching installer..."
info "https://dot.net/v1/dotnet-install.sh"
curl -fsSL "https://dot.net/v1/dotnet-install.sh" -o dotnet-install.sh
chmod +x dotnet-install.sh
info "Installing .NET 8 SDK..."
sudo mkdir -p "$DOTNET_ROOT"
sudo ./dotnet-install.sh \
--channel 8.0 \
--install-dir "$DOTNET_ROOT"
info "Creating symlink..."
sudo ln -sf "$DOTNET_ROOT/dotnet" "/usr/local/bin/dotnet"
########################################
# Cleanup
########################################
info "Cleaning up..."
rm -f dotnet-install.sh
#Workaround for .Net GC Heap error on proot environment
if [ -f "$STARTUP_SCRIPT" ]; then
if ! grep -q '^export DOTNET_GCHeapHardLimit=' "$STARTUP_SCRIPT"; then
if grep -q '^# Launch desktop,' "$STARTUP_SCRIPT"; then
sed -i '/^# Launch desktop,/i export DOTNET_GCHeapHardLimit=1C0000000\n' "$STARTUP_SCRIPT"
info "Added DOTNET_GCHeapHardLimit to $STARTUP_SCRIPT"
else
warn "Could not patch $STARTUP_SCRIPT: Launch desktop marker not found"
fi
else
info "DOTNET_GCHeapHardLimit already configured"
fi
fi
export DOTNET_GCHeapHardLimit=1C0000000
echo
dotnet --info
########################################
# Install Rider
########################################
info "Fetching package..."
info "https://download.jetbrains.com/rider/JetBrains.Rider-$RIDER_VERSION-aarch64.tar.gz"
curl -fL# "https://download.jetbrains.com/rider/JetBrains.Rider-$RIDER_VERSION-aarch64.tar.gz" -o rider.tar.gz
info "Installing Jetbrains Rider..."
sudo tar -xzf rider.tar.gz -C /opt
sudo mv "/opt/JetBrains Rider-$RIDER_VERSION" "/opt/JetBrains Rider"
sudo ln -sf "/opt/JetBrains Rider/bin/rider.sh" "/usr/local/bin/rider"
########################################
# Create Desktop Entry
########################################
info "Creating desktop entry..."
mkdir -p "$HOME/.local/share/applications"
cat > "$HOME/.local/share/applications/jetbrains-rider.desktop" <<EOF
[Desktop Entry]
Version=1.0
Type=Application
Name=JetBrains Rider
Comment=.NET IDE
Exec="/opt/JetBrains Rider/bin/rider"
Icon=/opt/JetBrains Rider/bin/rider.svg
Terminal=false
Categories=Development;IDE;
StartupNotify=true
StartupWMClass=jetbrains-rider
EOF
chmod 644 "$HOME/.local/share/applications/jetbrains-rider.desktop"
ln -sf "$HOME/.local/share/applications/jetbrains-rider.desktop" \
"$DESKTOP_DIR/JetBrains Rider.desktop"
########################################
# Cleanup
########################################
info "Cleaning up..."
rm -f rider.tar.gz
rm -f rider.sh
echo
echo "Completed!"