From d71f2c45b91a7b2ceeac0d1f8841ffba9d7454a7 Mon Sep 17 00:00:00 2001 From: Subhamoy Biswas Date: Sun, 12 Oct 2025 20:20:16 +0530 Subject: [PATCH] refactor: added linux x64 appimage download option and improved curl-bash installers --- package.json | 2 +- public/linux_installer.sh | 57 +++++++++++++++++++-------- public/macos_installer.sh | 16 ++++---- src/components/AllDowloadsSection.tsx | 21 +++++++++- src/pages/download.astro | 4 ++ src/pages/index.astro | 4 ++ 6 files changed, 78 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index 15199e9..aa01c7a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "neodlp-website", "type": "module", - "version": "0.1.3", + "version": "0.1.5", "scripts": { "dev": "astro dev", "build": "astro build", diff --git a/public/linux_installer.sh b/public/linux_installer.sh index 689328c..e3c7f05 100644 --- a/public/linux_installer.sh +++ b/public/linux_installer.sh @@ -9,13 +9,7 @@ DOWNLOAD_DIR=~/Downloads echo "### === NeoDLP Installer (Linux) === ###" echo "๐Ÿ” Checking system requirements..." if command -v neodlp &> /dev/null; then - echo "โ— NeoDLP is already installed at $(which neodlp)" - read -p "โ“ Would you like to reinstall/update? (y/N): " -r REPLY - echo - if [[ ! $REPLY =~ ^[Yy]$ ]]; then - echo "๐Ÿ›‘ Installation aborted." - exit 0 - fi + echo "โš ๏ธ NeoDLP is already installed at $(which neodlp)" echo "๐Ÿ”„ Proceeding with reinstallation/update..." fi @@ -49,11 +43,31 @@ elif command -v dnf &> /dev/null; then PKG_MANAGER="dnf" INSTALL_CMD="sudo dnf install -y" echo "๐Ÿง Detected rhel/fedora based distro" + + # Enable RPM Fusion repos if not already enabled (for Fedora) + if [ -f /etc/fedora-release ]; then + echo "โ„น๏ธ Detected Fedora! Checking RPM Fusion repositories..." + + # Check if RPM Fusion repositories are enabled + if ! dnf repolist enabled | grep -q "rpmfusion-free" || ! dnf repolist enabled | grep -q "rpmfusion-nonfree"; then + echo "๐Ÿ“ฆ Enabling RPM Fusion free and nonfree repositories... (sudo required)" + sudo dnf install -y https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm + sudo dnf install -y https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm + + if [ $? -eq 0 ]; then + echo "โœ… RPM Fusion repositories enabled successfully" + else + echo "โš ๏ธ Failed to enable RPM Fusion repositories. continuing anyway..." + fi + else + echo "โœ… RPM Fusion repositories already enabled" + fi + fi elif command -v yum &> /dev/null; then ASSET_NAME="NeoDLP-${VERSION}-1.$([[ "$ASSET_ARCH" == "x64" ]] && echo "x86_64" || echo "aarch64").rpm" PKG_MANAGER="yum" INSTALL_CMD="sudo yum install -y" - echo "๐Ÿง Detected rhel/fedora based distro" + echo "๐Ÿง Detected older rhel based distro" elif command -v zypper &> /dev/null; then ASSET_NAME="NeoDLP-${VERSION}-1.$([[ "$ASSET_ARCH" == "x64" ]] && echo "x86_64" || echo "aarch64").rpm" PKG_MANAGER="zypper" @@ -64,9 +78,9 @@ elif command -v pacman &> /dev/null; then # Check if yay is installed if command -v yay &> /dev/null; then - echo "โœ… yay is already installed" + echo "โœ… YAY is already installed" else - echo "โ„น๏ธ yay not found, installing... (sudo required)" + echo "โ„น๏ธ YAY not found! installing... (sudo required)" # Install yay sudo pacman -S --needed --noconfirm git base-devel cd /tmp @@ -77,9 +91,9 @@ elif command -v pacman &> /dev/null; then rm -rf /tmp/yay if command -v yay &> /dev/null; then - echo "โœ… yay installed successfully" + echo "โœ… YAY installed successfully" else - echo "โŒ Failed to install yay" + echo "โŒ Failed to install YAY" echo "๐Ÿ›‘ Installation aborted." exit 1 fi @@ -87,10 +101,15 @@ elif command -v pacman &> /dev/null; then # Install NeoDLP from AUR using yay echo "๐Ÿ“ฆ Installing NeoDLP from AUR using yay..." - yay -S --noconfirm neodlp + yay -S --noconfirm --rebuild --nodiffmenu --cleanafter neodlp - echo "โœ… Installed NeoDLP successfully!" - exit 0 + if command -v neodlp &> /dev/null; then + echo "โœ… NeoDLP Installation successful!" + exit 0 + else + echo "โŒ NeoDLP Installation failed!" + exit 1 + fi else echo "โŒ Unsupported distro: no supported package manager found (apt, dnf, yum, zypper, pacman)" echo "๐Ÿ›‘ Installation aborted." @@ -112,4 +131,10 @@ $INSTALL_CMD "$DOWNLOAD_DIR/$ASSET_NAME" echo "๐Ÿงน Cleaning up..." rm "$DOWNLOAD_DIR/$ASSET_NAME" -echo "โœ… Installed NeoDLP successfully!" \ No newline at end of file +if command -v neodlp &> /dev/null; then + echo "โœ… NeoDLP Installation successful!" + exit 0 +else + echo "โŒ NeoDLP Installation failed!" + exit 1 +fi \ No newline at end of file diff --git a/public/macos_installer.sh b/public/macos_installer.sh index b851a51..08d501e 100644 --- a/public/macos_installer.sh +++ b/public/macos_installer.sh @@ -9,13 +9,7 @@ DOWNLOAD_DIR=~/Downloads echo "### === NeoDLP Installer (MacOS) === ###" echo "๐Ÿ” Checking system requirements..." if [ -d "/Applications/NeoDLP.app" ]; then - echo "โ— NeoDLP is already installed at /Applications/NeoDLP.app" - read -p "โ“ Would you like to reinstall/update? (y/N): " -r REPLY - echo - if [[ ! $REPLY =~ ^[Yy]$ ]]; then - echo "๐Ÿ›‘ Installation aborted." - exit 0 - fi + echo "โš ๏ธ NeoDLP is already installed at /Applications/NeoDLP.app" echo "๐Ÿ”„ Proceeding with reinstallation/update..." fi @@ -62,4 +56,10 @@ sudo mv "$APP_NAME" /Applications/ echo "๐Ÿงน Cleaning up..." rm "$DOWNLOAD_DIR/$ASSET_NAME" -echo "โœ… Installed NeoDLP successfully!" \ No newline at end of file +if [ -d "/Applications/$APP_NAME" ]; then + echo "โœ… NeoDLP Installation successful!" + exit 0 +else + echo "โŒ NeoDLP Installation failed!" + exit 1 +fi \ No newline at end of file diff --git a/src/components/AllDowloadsSection.tsx b/src/components/AllDowloadsSection.tsx index 617f4aa..0ba857d 100644 --- a/src/components/AllDowloadsSection.tsx +++ b/src/components/AllDowloadsSection.tsx @@ -16,7 +16,7 @@ export default function AllDownloadsSection({ release }: { release: LatestReleas

Released at: {new Date(release.pub_date).toLocaleString()} - โœจ Read Changelog

-
+
@@ -169,6 +169,25 @@ export default function AllDownloadsSection({ release }: { release: LatestReleas (x64) RPM Package + + + Download Now +
+ } + as="a" + href={release.platforms["linux-x86_64"].url} + target="_blank" + > + + + + + Download for Linux + + (x64) Appimage + diff --git a/src/pages/download.astro b/src/pages/download.astro index 359af10..3397184 100644 --- a/src/pages/download.astro +++ b/src/pages/download.astro @@ -19,6 +19,10 @@ let data = { "windows-x86_64": { signature: "", url: "https://github.com/neosubhamoy/neodlp/releases/download/v0.0.0/NeoDLP_0.0.0_x64-setup.exe" + }, + "linux-x86_64": { + signature: "", + url: "https://github.com/neosubhamoy/neodlp/releases/download/v0.0.0/NeoDLP_0.0.0_amd64.Appimage" } } }; diff --git a/src/pages/index.astro b/src/pages/index.astro index bf4e4c0..2e3c908 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -21,6 +21,10 @@ let data = { "windows-x86_64": { signature: "", url: "https://github.com/neosubhamoy/neodlp/releases/download/v0.0.0/NeoDLP_0.0.0_x64-setup.exe" + }, + "linux-x86_64": { + signature: "", + url: "https://github.com/neosubhamoy/neodlp/releases/download/v0.0.0/NeoDLP_0.0.0_amd64.Appimage" } } };