diff --git a/.claude/settings.local.json b/.claude/settings.local.json new file mode 100644 index 0000000..5707c58 --- /dev/null +++ b/.claude/settings.local.json @@ -0,0 +1,7 @@ +{ + "permissions": { + "allow": [ + "Bash(git add:*)" + ] + } +} diff --git a/.github/workflows/release-desktop.yml b/.github/workflows/release-desktop.yml new file mode 100644 index 0000000..3532d97 --- /dev/null +++ b/.github/workflows/release-desktop.yml @@ -0,0 +1,143 @@ +name: Release Desktop Apps + +on: + push: + tags: + - 'desktop-v*' # Trigger on tags like desktop-v1.0.0 + workflow_dispatch: + inputs: + version: + description: 'Version number (e.g., 1.0.0)' + required: true + +jobs: + create-release: + runs-on: ubuntu-latest + outputs: + upload_url: ${{ steps.create_release.outputs.upload_url }} + version: ${{ steps.get_version.outputs.version }} + steps: + - name: Get version + id: get_version + run: | + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + echo "version=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT + else + echo "version=${GITHUB_REF#refs/tags/desktop-v}" >> $GITHUB_OUTPUT + fi + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: desktop-v${{ steps.get_version.outputs.version }} + release_name: AeThex OS Desktop v${{ steps.get_version.outputs.version }} + draft: false + prerelease: false + body: | + # AeThex OS Desktop v${{ steps.get_version.outputs.version }} + + ## Downloads + - **Windows**: Download the `.msi` installer + - **macOS**: Download the `.dmg` file + - **Linux**: Download the `.AppImage`, `.deb`, or `.rpm` file + + ## What's New + - Desktop application release + - Cross-platform support (Windows, macOS, Linux) + - Native performance with Tauri + + ## Installation + - **Windows**: Run the MSI installer + - **macOS**: Open the DMG and drag to Applications + - **Linux**: Make AppImage executable with `chmod +x` and run, or install DEB/RPM + + build-desktop: + needs: create-release + strategy: + fail-fast: false + matrix: + include: + - platform: 'macos-latest' + args: '--target universal-apple-darwin' + - platform: 'ubuntu-22.04' + args: '' + - platform: 'windows-latest' + args: '' + + runs-on: ${{ matrix.platform }} + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install Rust stable + uses: dtolnay/rust-toolchain@stable + + - name: Install dependencies (Ubuntu only) + if: matrix.platform == 'ubuntu-22.04' + run: | + sudo apt-get update + sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev \ + libappindicator3-dev librsvg2-dev patchelf + + - name: Install frontend dependencies + run: npm install + + - name: Install Tauri dependencies + working-directory: shell/aethex-shell + run: npm install + + - name: Build Tauri app + working-directory: shell/aethex-shell + run: npm run tauri build -- ${{ matrix.args }} + + - name: Upload Windows MSI + if: matrix.platform == 'windows-latest' + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ needs.create-release.outputs.upload_url }} + asset_path: ./shell/aethex-shell/src-tauri/target/release/bundle/msi/aethex-os_${{ needs.create-release.outputs.version }}_x64_en-US.msi + asset_name: AeThex-OS-${{ needs.create-release.outputs.version }}-Windows-x64.msi + asset_content_type: application/x-msi + + - name: Upload macOS DMG + if: matrix.platform == 'macos-latest' + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ needs.create-release.outputs.upload_url }} + asset_path: ./shell/aethex-shell/src-tauri/target/universal-apple-darwin/release/bundle/dmg/AeThex OS_${{ needs.create-release.outputs.version }}_universal.dmg + asset_name: AeThex-OS-${{ needs.create-release.outputs.version }}-macOS-universal.dmg + asset_content_type: application/x-apple-diskimage + + - name: Upload Linux AppImage + if: matrix.platform == 'ubuntu-22.04' + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ needs.create-release.outputs.upload_url }} + asset_path: ./shell/aethex-shell/src-tauri/target/release/bundle/appimage/aethex-os_${{ needs.create-release.outputs.version }}_amd64.AppImage + asset_name: AeThex-OS-${{ needs.create-release.outputs.version }}-Linux-x86_64.AppImage + asset_content_type: application/x-executable + + - name: Upload Linux DEB + if: matrix.platform == 'ubuntu-22.04' + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ needs.create-release.outputs.upload_url }} + asset_path: ./shell/aethex-shell/src-tauri/target/release/bundle/deb/aethex-os_${{ needs.create-release.outputs.version }}_amd64.deb + asset_name: AeThex-OS-${{ needs.create-release.outputs.version }}-Linux-amd64.deb + asset_content_type: application/vnd.debian.binary-package diff --git a/README.md b/README.md index 372649a..cf75dc2 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,15 @@ - 📱 **Mobile Application** - Capacitor-based app (Android/iOS) - 🐧 **Linux Distribution** - Bootable OS replacing traditional operating systems +## 📥 Downloads + +### Desktop Application +- **[Download for Windows, macOS, or Linux](https://github.com/AeThex-Corporation/AeThex-OS/releases/latest)** - Latest desktop releases +- **[All Releases](https://github.com/AeThex-Corporation/AeThex-OS/releases)** - View all versions + +### Web Application +- **[Use Online](https://aethex.app)** - No installation required + ## 🚀 Quick Start Choose your deployment mode: diff --git a/client/src/App.tsx b/client/src/App.tsx index ced5f61..d4ed982 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -18,6 +18,7 @@ import Login from "@/pages/login"; import Admin from "@/pages/admin"; import Pitch from "@/pages/pitch"; import Builds from "@/pages/builds"; +import Downloads from "@/pages/downloads"; import AdminArchitects from "@/pages/admin-architects"; import AdminProjects from "@/pages/admin-projects"; import AdminCredentials from "@/pages/admin-credentials"; @@ -90,6 +91,7 @@ function Router() { {() => } + {() => } diff --git a/client/src/pages/downloads.tsx b/client/src/pages/downloads.tsx new file mode 100644 index 0000000..d9cc726 --- /dev/null +++ b/client/src/pages/downloads.tsx @@ -0,0 +1,233 @@ +import { Download, Monitor, Apple, Code, Package } from "lucide-react"; +import { useEffect, useState } from "react"; + +interface Release { + tag_name: string; + name: string; + published_at: string; + assets: Array<{ + name: string; + browser_download_url: string; + size: number; + }>; +} + +export default function Downloads() { + const [latestRelease, setLatestRelease] = useState(null); + const [loading, setLoading] = useState(true); + + useEffect(() => { + fetch('https://api.github.com/repos/AeThex-Corporation/AeThex-OS/releases') + .then(res => res.json()) + .then(releases => { + // Find the latest desktop release (tagged with desktop-v*) + const desktopRelease = releases.find((r: Release) => + r.tag_name.startsWith('desktop-v') + ); + setLatestRelease(desktopRelease || null); + setLoading(false); + }) + .catch(err => { + console.error('Failed to fetch releases:', err); + setLoading(false); + }); + }, []); + + const getAssetByPlatform = (platform: string) => { + if (!latestRelease) return null; + return latestRelease.assets.find(asset => + asset.name.toLowerCase().includes(platform.toLowerCase()) + ); + }; + + const formatBytes = (bytes: number) => { + if (bytes === 0) return '0 Bytes'; + const k = 1024; + const sizes = ['Bytes', 'KB', 'MB', 'GB']; + const i = Math.floor(Math.log(bytes) / Math.log(k)); + return Math.round(bytes / Math.pow(k, i) * 100) / 100 + ' ' + sizes[i]; + }; + + return ( +
+
+ {/* Header */} +
+

+ Download AeThex OS +

+

+ Get the desktop application for Windows, macOS, or Linux +

+ {latestRelease && ( +
+ Latest Version: {latestRelease.tag_name.replace('desktop-v', '')} • + Released {new Date(latestRelease.published_at).toLocaleDateString()} +
+ )} +
+ + {loading ? ( +
+
+

Loading releases...

+
+ ) : !latestRelease ? ( +
+ +

No Desktop Releases Yet

+

+ Desktop releases are coming soon. In the meantime, you can: +

+ +
+ ) : ( +
+ {/* Windows */} + } + platform="Windows" + description="MSI Installer for Windows 10/11" + asset={getAssetByPlatform('windows')} + formatBytes={formatBytes} + color="from-blue-600 to-blue-400" + /> + + {/* macOS */} + } + platform="macOS" + description="Universal DMG for Intel & Apple Silicon" + asset={getAssetByPlatform('macos')} + formatBytes={formatBytes} + color="from-slate-600 to-slate-400" + /> + + {/* Linux */} + } + platform="Linux" + description="AppImage & DEB packages" + asset={getAssetByPlatform('linux')} + formatBytes={formatBytes} + color="from-orange-600 to-orange-400" + /> +
+ )} + + {/* Additional Info */} +
+
+

+ + Installation Instructions +

+
+
+ Windows: Run the MSI installer and follow the prompts +
+
+ macOS: Open the DMG file and drag AeThex OS to Applications +
+
+ Linux (AppImage): Make executable with chmod +x and run +
+
+ Linux (DEB): Install with sudo dpkg -i filename.deb +
+
+
+ + +
+
+
+ ); +} + +function DownloadCard({ + icon, + platform, + description, + asset, + formatBytes, + color +}: { + icon: React.ReactNode; + platform: string; + description: string; + asset: any; + formatBytes: (bytes: number) => string; + color: string; +}) { + return ( +
+
+ {icon} +
+

{platform}

+

{description}

+ + {asset ? ( + <> +
+ {formatBytes(asset.size)} +
+ + + Download + + + ) : ( +
+ Not available yet +
+ )} +
+ ); +}