1
1
mirror of https://github.com/neosubhamoy/neodlp-website.git synced 2026-02-04 10:02:22 +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"
DOWNLOAD_DIR=~/Downloads
# Detect system architecture
# Check if NeoDLP is already installed
echo "### === NeoDLP MacOS Curl-Bash Installer === ###"
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)
if [[ "$ARCH" == "arm64" ]]; then
@@ -17,6 +25,7 @@ elif [[ "$ARCH" == "x86_64" ]]; then
echo "🧠 Detected Intel-based Mac (x86_64)"
else
echo "❌ Unsupported architecture: $ARCH"
echo "🛑 Installation aborted."
exit 1
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"
# 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"
# Extract the archive
@@ -39,4 +48,8 @@ APP_NAME="NeoDLP.app"
echo "📦 Moving $APP_NAME to /Applications directory (sudo required)"
sudo mv "$APP_NAME" /Applications/
# Clean up the downloaded archive
echo "🧹 Cleaning up..."
rm "$DOWNLOAD_DIR/$ASSET_NAME"
echo "✅ Installed NeoDLP successfully!"

View File

@@ -1,7 +1,8 @@
import { type LatestRelease } from "@/types/release";
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 { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
export default function AllDownloadsSection({ release }: { release: LatestRelease }) {
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="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 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">
<SlidingButton
slidingContent={
@@ -107,7 +108,7 @@ export default function AllDownloadsSection({ release }: { release: LatestReleas
</svg>
Download for MacOS
</span>
<span className="text-xs">(ARM64) DMG Installer</span>
<span className="text-xs"> (ARM64) DMG Installer</span>
</SlidingButton>
<SlidingButton
slidingContent={
@@ -126,7 +127,7 @@ export default function AllDownloadsSection({ release }: { release: LatestReleas
</svg>
Download for MacOS
</span>
<span className="text-xs">(ARM64) APP Bundle</span>
<span className="text-xs"> (ARM64) APP Bundle</span>
</SlidingButton>
<SlidingButton
slidingContent={
@@ -186,6 +187,15 @@ export default function AllDownloadsSection({ release }: { release: LatestReleas
<span className="text-xs">(x64) AUR Snapshot</span>
</SlidingButton>
</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 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>
@@ -195,6 +205,9 @@ export default function AllDownloadsSection({ release }: { release: LatestReleas
<CommandSnippet title="Windows (WinGet)">
winget install neodlp
</CommandSnippet>
<CommandSnippet title="MacOS (Curl-Bash Installer)">
curl -sSL https://neodlp.neosubhamoy.com/neodlp_macos_installer.sh | bash
</CommandSnippet>
<CommandSnippet title="Arch Linux (AUR)">
yay -S neodlp
</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 (
<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 gap-2">
<Terminal className="size-4" />
@@ -33,7 +33,7 @@ export const CommandSnippet = ({
<span className="text-xs">Copy</span>
</button>
</div>
<code className="flex px-4 py-2">
<code className="flex px-4 py-2 overflow-x-scroll text-nowrap">
<p className="">{children}</p>
</code>
</div>

View File

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