1
1
mirror of https://github.com/neosubhamoy/neodlp-website.git synced 2026-02-04 12:22:21 +05:30

(feat): added macos curl-bash installer command and improved curl-bash installer

This commit is contained in:
2025-05-24 20:54:20 +05:30
Verified
parent 47944282dc
commit bfa96c40a0
5 changed files with 101 additions and 9 deletions

View File

@@ -5,8 +5,16 @@ OWNER="neosubhamoy"
REPO="neodlp" REPO="neodlp"
DOWNLOAD_DIR=~/Downloads DOWNLOAD_DIR=~/Downloads
# Detect system architecture # Check if NeoDLP is already installed
echo "### === NeoDLP MacOS Curl-Bash Installer === ###"
echo "🔃 Checking system requirements..." echo "🔃 Checking system requirements..."
if [ -d "/Applications/NeoDLP.app" ]; then
echo "❗ NeoDLP is already installed at /Applications/NeoDLP.app"
echo "🛑 Installation aborted."
exit 0
fi
# Detect system architecture
ARCH=$(uname -m) ARCH=$(uname -m)
if [[ "$ARCH" == "arm64" ]]; then if [[ "$ARCH" == "arm64" ]]; then
@@ -17,6 +25,7 @@ elif [[ "$ARCH" == "x86_64" ]]; then
echo "🧠 Detected Intel-based Mac (x86_64)" echo "🧠 Detected Intel-based Mac (x86_64)"
else else
echo "❌ Unsupported architecture: $ARCH" echo "❌ Unsupported architecture: $ARCH"
echo "🛑 Installation aborted."
exit 1 exit 1
fi fi
@@ -27,7 +36,7 @@ TAG=$(curl -s https://api.github.com/repos/$OWNER/$REPO/releases/latest | grep '
URL="https://github.com/$OWNER/$REPO/releases/download/$TAG/$ASSET_NAME" URL="https://github.com/$OWNER/$REPO/releases/download/$TAG/$ASSET_NAME"
# Download the release asset # Download the release asset
echo "📥 Downloading $ASSET_NAME from $TAG..." echo "⬇️ Downloading $ASSET_NAME from tag $TAG..."
curl -L -o "$DOWNLOAD_DIR/$ASSET_NAME" "$URL" curl -L -o "$DOWNLOAD_DIR/$ASSET_NAME" "$URL"
# Extract the archive # Extract the archive
@@ -39,4 +48,8 @@ APP_NAME="NeoDLP.app"
echo "📦 Moving $APP_NAME to /Applications directory (sudo required)" echo "📦 Moving $APP_NAME to /Applications directory (sudo required)"
sudo mv "$APP_NAME" /Applications/ sudo mv "$APP_NAME" /Applications/
# Clean up the downloaded archive
echo "🧹 Cleaning up..."
rm "$DOWNLOAD_DIR/$ASSET_NAME"
echo "✅ Installed NeoDLP successfully!" echo "✅ Installed NeoDLP successfully!"

View File

@@ -1,7 +1,8 @@
import { type LatestRelease } from "@/types/release"; import { type LatestRelease } from "@/types/release";
import { SlidingButton } from "@/components/ui/sliding-button"; import { SlidingButton } from "@/components/ui/sliding-button";
import { Download } from "lucide-react"; import { Download, TriangleAlert } from "lucide-react";
import { CommandSnippet } from "@/components/ui/command-snippet"; import { CommandSnippet } from "@/components/ui/command-snippet";
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
export default function AllDownloadsSection({ release }: { release: LatestRelease }) { export default function AllDownloadsSection({ release }: { release: LatestRelease }) {
return ( return (
@@ -12,7 +13,7 @@ export default function AllDownloadsSection({ release }: { release: LatestReleas
<p className="mt-4 text-xl font-semibold">Latest version (v{release.version})</p> <p className="mt-4 text-xl font-semibold">Latest version (v{release.version})</p>
<p className="text-sm text-muted-foreground">Released at: {new Date(release.pub_date).toLocaleString()} - <a className="hover:underline" href="https://github.com/neosubhamoy/neodlp/releases/latest" target="_blank"> Read Changelog</a></p> <p className="text-sm text-muted-foreground">Released at: {new Date(release.pub_date).toLocaleString()} - <a className="hover:underline" href="https://github.com/neosubhamoy/neodlp/releases/latest" target="_blank"> Read Changelog</a></p>
</div> </div>
<div className="flex flex-col items-center justify-center text-center gap-2"> <div className="flex flex-col items-center justify-center text-center gap-10">
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 justify-center items-center gap-4 mt-10"> <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 justify-center items-center gap-4 mt-10">
<SlidingButton <SlidingButton
slidingContent={ slidingContent={
@@ -107,7 +108,7 @@ export default function AllDownloadsSection({ release }: { release: LatestReleas
</svg> </svg>
Download for MacOS Download for MacOS
</span> </span>
<span className="text-xs">(ARM64) DMG Installer</span> <span className="text-xs"> (ARM64) DMG Installer</span>
</SlidingButton> </SlidingButton>
<SlidingButton <SlidingButton
slidingContent={ slidingContent={
@@ -126,7 +127,7 @@ export default function AllDownloadsSection({ release }: { release: LatestReleas
</svg> </svg>
Download for MacOS Download for MacOS
</span> </span>
<span className="text-xs">(ARM64) APP Bundle</span> <span className="text-xs"> (ARM64) APP Bundle</span>
</SlidingButton> </SlidingButton>
<SlidingButton <SlidingButton
slidingContent={ slidingContent={
@@ -186,6 +187,15 @@ export default function AllDownloadsSection({ release }: { release: LatestReleas
<span className="text-xs">(x64) AUR Snapshot</span> <span className="text-xs">(x64) AUR Snapshot</span>
</SlidingButton> </SlidingButton>
</div> </div>
<div className="flex items-center justify-center text-start max-w-2xl px-4">
<Alert>
<TriangleAlert className="size-4 stroke-yellow-400" />
<AlertTitle>Experimental Binary Downloads!</AlertTitle>
<AlertDescription>
MacOS ARM64 binary downloads are experimental and may not open on Apple Silicon Macs if downloaded from browser (You will get 'Damaged File' error) it's because the binaries are not signed (signing MacOS binaries requires 99$/year Apple Developer Account subscription, which I can't afford RN!) and Apple Silicon Macs don't allow unsigned apps (downloaded from browser) to be installed on the system. If you want to use NeoDLP on your Apple Silicon Macs, you can simply use the command line Curl-Bash Installer (Recommended) given below -OR- <a className="underline" href="https://github.com/neosubhamoy/neodlp?tab=readme-ov-file#%EF%B8%8F-contributing--building-from-source" target="_blank">compile it from source</a>
</AlertDescription>
</Alert>
</div>
</div> </div>
<div className="flex flex-col items-center justify-center text-center gap-2 mt-10"> <div className="flex flex-col items-center justify-center text-center gap-2 mt-10">
<p className="mt-4 text-xl font-semibold">Install via Command Line</p> <p className="mt-4 text-xl font-semibold">Install via Command Line</p>
@@ -195,6 +205,9 @@ export default function AllDownloadsSection({ release }: { release: LatestReleas
<CommandSnippet title="Windows (WinGet)"> <CommandSnippet title="Windows (WinGet)">
winget install neodlp winget install neodlp
</CommandSnippet> </CommandSnippet>
<CommandSnippet title="MacOS (Curl-Bash Installer)">
curl -sSL https://neodlp.neosubhamoy.com/neodlp_macos_installer.sh | bash
</CommandSnippet>
<CommandSnippet title="Arch Linux (AUR)"> <CommandSnippet title="Arch Linux (AUR)">
yay -S neodlp yay -S neodlp
</CommandSnippet> </CommandSnippet>

View File

@@ -0,0 +1,66 @@
import * as React from "react"
import { cva, type VariantProps } from "class-variance-authority"
import { cn } from "@/lib/utils"
const alertVariants = cva(
"relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
{
variants: {
variant: {
default: "bg-card text-card-foreground",
destructive:
"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",
},
},
defaultVariants: {
variant: "default",
},
}
)
function Alert({
className,
variant,
...props
}: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>) {
return (
<div
data-slot="alert"
role="alert"
className={cn(alertVariants({ variant }), className)}
{...props}
/>
)
}
function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="alert-title"
className={cn(
"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
className
)}
{...props}
/>
)
}
function AlertDescription({
className,
...props
}: React.ComponentProps<"div">) {
return (
<div
data-slot="alert-description"
className={cn(
"text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
className
)}
{...props}
/>
)
}
export { Alert, AlertTitle, AlertDescription }

View File

@@ -22,7 +22,7 @@ export const CommandSnippet = ({
} }
return ( return (
<div className="flex flex-col rounded-lg border border-border overflow-hidden min-w-[20rem] md:min-w-[25rem]"> <div className="flex flex-col rounded-lg border border-border overflow-hidden w-[20rem] md:w-[30rem]">
<div className="flex items-center justify-between px-4 py-1 gap-2 bg-muted"> <div className="flex items-center justify-between px-4 py-1 gap-2 bg-muted">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<Terminal className="size-4" /> <Terminal className="size-4" />
@@ -33,7 +33,7 @@ export const CommandSnippet = ({
<span className="text-xs">Copy</span> <span className="text-xs">Copy</span>
</button> </button>
</div> </div>
<code className="flex px-4 py-2"> <code className="flex px-4 py-2 overflow-x-scroll text-nowrap">
<p className="">{children}</p> <p className="">{children}</p>
</code> </code>
</div> </div>

View File

@@ -159,7 +159,7 @@ export const ContainerScroll = ({
</svg> </svg>
Download for MacOS Download for MacOS
</span> </span>
<span className="text-xs">(ARM64) DMG Installer</span> <span className="text-xs"> (ARM64) DMG Installer</span>
</SlidingButton> </SlidingButton>
</> </>
)} )}