Swadhin Biswas Ci/improve release notes (#41) · 8/28/2026
04d550f
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
#!/bin/bash
# Universal installer for Linuxy
# Detects the operating system/distro and installs using the appropriate method
set -e
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m'
log_info() { echo -e "${BLUE}[INFO]${NC} $1"; }
log_ok() { echo -e "${GREEN}[OK]${NC} $1"; }
log_warn() { echo -e "${YELLOW}[WARN]${NC} $1"; }
log_error() { echo -e "${RED}[ERROR]${NC} $1"; }
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
detect_distro() {
if [ -f /etc/os-release ]; then
. /etc/os-release
DISTRO_ID="$ID"
DISTRO_ID_LIKE="$ID_LIKE"
DISTRO_NAME="$NAME"
elif [ -f /etc/debian_version ]; then
DISTRO_ID="debian"
DISTRO_ID_LIKE="debian"
DISTRO_NAME="Debian"
elif [ -f /etc/redhat-release ]; then
DISTRO_ID="rhel"
DISTRO_ID_LIKE="fedora"
DISTRO_NAME="RHEL"
elif command -v pacman &>/dev/null; then
DISTRO_ID="arch"
DISTRO_ID_LIKE="arch"
DISTRO_NAME="Arch Linux"
elif command -v apk &>/dev/null; then
DISTRO_ID="alpine"
DISTRO_ID_LIKE="alpine"
DISTRO_NAME="Alpine Linux"
elif command -v xbps-install &>/dev/null; then
DISTRO_ID="void"
DISTRO_ID_LIKE="void"
DISTRO_NAME="Void Linux"
elif command -v eopkg &>/dev/null; then
DISTRO_ID="solus"
DISTRO_ID_LIKE="solus"
DISTRO_NAME="Solus"
elif [ -f /etc/NIXOS ]; then
DISTRO_ID="nixos"
DISTRO_ID_LIKE="nixos"
DISTRO_NAME="NixOS"
elif uname -s | grep -qi darwin; then
DISTRO_ID="macos"
DISTRO_ID_LIKE="darwin"
DISTRO_NAME="macOS"
elif uname -s | grep -qi MINGW\|CYGWIN\|MSYS; then
DISTRO_ID="windows"
DISTRO_ID_LIKE="windows"
DISTRO_NAME="Windows"
else
DISTRO_ID="unknown"
DISTRO_ID_LIKE=""
DISTRO_NAME="Unknown"
fi
}
install_deps() {
log_info "Installing dependencies for $DISTRO_NAME..."
case "$DISTRO_ID" in
debian|ubuntu|pop|linuxmint|elementary|zorin)
sudo apt update
sudo apt install -y firejail xdg-utils libgtk-3-0 libwebkit2gtk-4.1-0 \
libayatana-appindicator3-1 libxdo3
;;
fedora|rhel|centos)
sudo dnf install -y firejail xdg-utils gtk3 webkit2gtk4.1 libappindicator-gtk3
;;
arch|manjaro|endeavouros|artix)
sudo pacman -S --needed firejail xdg-utils gtk3 webkit2gtk libappindicator-gtk3 xdo
;;
alpine)
sudo apk add firejail xdg-utils gtk+3.0 webkit2gtk-4.1 libappindicator-gtk3 libxdo
;;
void)
sudo xbps-install -S firejail xdg-utils gtk+3 webkit2gtk4.1 libappindicator-gtk3 libXdo
;;
solus)
sudo eopkg install firejail xdg-utils gtk3 webkit2gtk-4.1 libappindicator-gtk3 libxdo
;;
nixos)
log_warn "On NixOS, add linuxy to environment.systemPackages in your configuration.nix"
log_warn " inputs.linuxy.url = github:swadhinbiswas/linuxy;"
log_warn " or use: nix run github:swadhinbiswas/linuxy"
return 0
;;
opensuse*|suse)
sudo zypper install firejail xdg-utils gtk3 webkit2gtk4-1 typelib-1_0-AppIndicator3-0_1
;;
gentoo)
sudo emerge --ask app-admin/firejail x11-misc/xdg-utils x11-libs/gtk+:3 net-libs/webkit-gtk:4.1
;;
*)
log_error "Unknown distro. Please install dependencies manually."
log_info "Required: firejail, xdg-utils, gtk3, webkit2gtk, libappindicator"
exit 1
;;
esac
}
install_linuxy() {
log_info "Installing Linuxy..."
# Use built packages if available
local deb="$(find "$PROJECT_ROOT/src-tauri/target/release/bundle/deb/" -name '*.deb' 2>/dev/null | head -1)"
local rpm="$(find "$PROJECT_ROOT/src-tauri/target/release/bundle/rpm/" -name '*.rpm' 2>/dev/null | head -1)"
local appimage="$(find "$PROJECT_ROOT/src-tauri/target/release/bundle/appimage/" -name '*.AppImage' 2>/dev/null | head -1)"
local binary="$PROJECT_ROOT/src-tauri/target/release/linuxy"
case "$DISTRO_ID" in
debian|ubuntu|pop|linuxmint|elementary|zorin|kali|deepin|parrot)
if [ -n "$deb" ]; then
install_deb "$deb"
elif [ -f "$binary" ]; then
install_binary
else
log_error "No build artifacts found. Run 'scripts/build.sh' first."
exit 1
fi
;;
fedora|rhel|centos)
if [ -n "$rpm" ]; then
install_rpm "$rpm"
elif [ -f "$binary" ]; then
install_binary
else
log_error "No build artifacts found."
exit 1
fi
;;
arch|manjaro*|endeavouros|artix)
if [ -f "$binary" ]; then
install_binary
else
log_info "On Arch Linux, install linuxy from AUR: yay -S linuxy"
exit 0
fi
;;
alpine|void|solus|opensuse*|gentoo|slackware)
install_binary
;;
nixos)
log_info "On NixOS, use: nix profile install github:swadhinbiswas/linuxy"
exit 0
;;
macos)
local mac_bundle="$(find "$PROJECT_ROOT/src-tauri/target/release/bundle/dmg/" -name '*.dmg' 2>/dev/null | head -1)"
if [ -n "$mac_bundle" ]; then
hdiutil attach "$mac_bundle"
cp -R "/Volumes/Linuxy/Linuxy.app" /Applications/
hdiutil detach "/Volumes/Linuxy"
log_ok "Linuxy installed to /Applications/"
else
log_error "macOS bundle not found."
exit 1
fi
;;
windows)
local exe="$(find "$PROJECT_ROOT/src-tauri/target/release/bundle/nsis/" -name '*.exe' 2>/dev/null | head -1)"
if [ -n "$exe" ]; then
log_info "Run $exe to install Linuxy on Windows."
else
log_error "Windows installer not found."
exit 1
fi
;;
*)
if [ -n "$appimage" ]; then
install_appimage "$appimage"
elif [ -f "$binary" ]; then
install_binary
else
log_error "No install method available."
exit 1
fi
;;
esac
}
install_deb() {
local pkg="$1"
log_info "Installing DEB package..."
if command -v gdebi &>/dev/null; then
sudo gdebi -n "$pkg"
else
sudo dpkg -i "$pkg" && sudo apt install -f -y
fi
log_ok "Linuxy installed via DEB."
}
install_rpm() {
local pkg="$1"
log_info "Installing RPM package..."
if command -v dnf &>/dev/null; then
sudo dnf install -y "$pkg"
elif command -v zypper &>/dev/null; then
sudo zypper install --allow-unsigned-rpm "$pkg"
else
sudo rpm -i "$pkg"
fi
log_ok "Linuxy installed via RPM."
}
install_appimage() {
local path="$1"
local bin_dest="$HOME/.local/appimages"
local desktop_dest="$HOME/.local/share/applications"
mkdir -p "$bin_dest" "$desktop_dest"
cp "$path" "$bin_dest/linuxy.AppImage"
chmod +x "$bin_dest/linuxy.AppImage"
cat > "$desktop_dest/linuxy.desktop" << EOF
[Desktop Entry]
Type=Application
Name=Linuxy
Comment=One-click Linux Application Manager
Exec="$bin_dest/linuxy.AppImage" %U
Icon=linuxy
Categories=Utility;System;
Terminal=false
EOF
# Integrate with system
if command -v update-desktop-database &>/dev/null; then
update-desktop-database "$HOME/.local/share/applications" 2>/dev/null || true
fi
log_ok "Linuxy AppImage installed to $bin_dest/linuxy.AppImage"
log_info "You can run it from your application menu or directly: $bin_dest/linuxy.AppImage"
}
install_binary() {
local src="$PROJECT_ROOT/src-tauri/target/release/linuxy"
log_info "Installing binary to /usr/local/bin..."
sudo install -Dm755 "$src" "/usr/local/bin/linuxy"
sudo install -Dm644 "$PROJECT_ROOT/src-tauri/debian/desktop-template.desktop" "/usr/share/applications/linuxy.desktop"
for size in 32 128 256 512; do
icon="$PROJECT_ROOT/src-tauri/icons/${size}x${size}.png"
if [ -f "$icon" ]; then
sudo install -Dm644 "$icon" "/usr/share/icons/hicolor/${size}x${size}/apps/linuxy.png"
fi
done
if [ -f "$PROJECT_ROOT/src-tauri/icons/icon.png" ]; then
sudo install -Dm644 "$PROJECT_ROOT/src-tauri/icons/icon.png" "/usr/share/icons/hicolor/512x512/apps/linuxy.png"
fi
if command -v update-desktop-database &>/dev/null; then
sudo update-desktop-database /usr/share/applications 2>/dev/null || true
fi
log_ok "Linuxy installed to /usr/local/bin/linuxy"
}
uninstall_linuxy() {
log_info "Removing Linuxy..."
sudo rm -f /usr/local/bin/linuxy
sudo rm -f /usr/share/applications/linuxy.desktop
for size in 32 128 256 512; do
sudo rm -f "/usr/share/icons/hicolor/${size}x${size}/apps/linuxy.png"
done
sudo rm -f "/usr/share/icons/hicolor/512x512/apps/linuxy.png"
rm -f "$HOME/.local/appimages/linuxy.AppImage"
rm -f "$HOME/.local/share/applications/linuxy.desktop"
rm -f "$HOME/.local/share/applications/linuxy.AppImage"
if command -v update-desktop-database &>/dev/null; then
sudo update-desktop-database /usr/share/applications 2>/dev/null || true
update-desktop-database "$HOME/.local/share/applications" 2>/dev/null || true
fi
log_ok "Linuxy removed."
}
main() {
echo ""
echo " Linuxy Universal Installer"
echo " ========================="
echo ""
detect_distro
log_info "Detected: $DISTRO_NAME ($DISTRO_ID)"
case "$1" in
deps|dependencies|--deps)
install_deps
log_ok "Dependencies installed."
exit 0
;;
uninstall|remove|--remove)
uninstall_linuxy
exit 0
;;
help|--help|-h)
echo "Usage: $0 [command]"
echo ""
echo "Commands:"
echo " (no command) Install Linuxy on detected OS"
echo " deps Install runtime dependencies only"
echo " uninstall Remove Linuxy from system"
echo " help Show this help"
exit 0
;;
esac
install_deps
install_linuxy
echo ""
log_ok "Installation complete! Run 'linuxy' to start."
}
main "$@"