Move Development instructions to separate readme file

This commit is contained in:
Igor Pecovnik
2025-12-23 12:22:35 +01:00
committed by Igor
parent 9ca05f821b
commit 0a1996355f
2 changed files with 133 additions and 141 deletions

115
DEVELOPMENT.md Normal file
View File

@@ -0,0 +1,115 @@
## Development
### Prerequisites
- **Node.js 20+** — [nodejs.org](https://nodejs.org)
- **Rust 1.77+** — [rustup.rs](https://rustup.rs)
- **Platform tools** — Xcode (macOS), Visual Studio Build Tools (Windows), build-essential (Linux)
### Quick Start
```bash
git clone https://github.com/armbian/imager.git armbian-imager
cd armbian-imager
npm install
npm run tauri:dev
```
### Scripts
```bash
npm run dev # Frontend only (Vite)
npm run tauri:dev # Full app with hot reload
npm run build # Build frontend for production
npm run tauri:build # Build distributable
npm run tauri:build:dev # Build with debug symbols
npm run lint # ESLint
npm run clean # Clean all build artifacts
```
### Build Scripts
```bash
./scripts/build-macos.sh [--clean] [--dev] # macOS ARM64 + x64
./scripts/build-linux.sh [--clean] [--dev] # Linux x64 + ARM64
./scripts/build-all.sh [--clean] [--dev] # All platforms
```
## Tech Stack
| Layer | Technology | Why |
|-------|------------|-----|
| **UI** | React 19 + TypeScript | Type-safe, component-based UI |
| **Bundler** | Vite | Lightning-fast HMR and builds |
| **Framework** | Tauri 2 | Native performance, tiny bundle |
| **Backend** | Rust | Memory-safe, blazing fast I/O |
| **Async** | Tokio | Efficient concurrent operations |
| **i18n** | i18next | 15 language translations |
### Why Tauri over Electron?
| Metric | Armbian Imager (Tauri) | Typical Electron App |
|--------|------------------------|---------------------|
| App Size | ~15 MB | 150-200 MB |
| RAM Usage | ~50 MB | 200-400 MB |
| Startup | < 1 second | 2-5 seconds |
| Native Feel | ✅ Uses system webview | ❌ Bundles Chromium |
## Project Structure
<details>
<summary>Click to expand</summary>
```
armbian-imager/
├── src/ # React Frontend
│ ├── components/ # UI Components
│ │ ├── flash/ # Flash progress components
│ │ ├── layout/ # Header, HomePage
│ │ ├── modals/ # Board, Image, Device, Manufacturer modals
│ │ └── shared/ # Reusable components (UpdateModal, ErrorDisplay, etc.)
│ ├── hooks/ # React Hooks (Tauri IPC, async data)
│ ├── config/ # Badges, manufacturers, OS info
│ ├── locales/ # i18n translations (15 languages)
│ ├── styles/ # Modular CSS
│ ├── types/ # TypeScript interfaces
│ ├── utils/ # Utility functions
│ └── assets/ # Images, logos, OS icons
├── src-tauri/ # Rust Backend
│ ├── src/
│ │ ├── commands/ # Tauri IPC handlers
│ │ ├── config/ # Application configuration and constants
│ │ ├── devices/ # Platform device detection
│ │ ├── flash/ # Platform flash (macOS, Linux, Windows)
│ │ ├── images/ # Image management and filtering
│ │ ├── logging/ # Session logging
│ │ ├── paste/ # Log upload to paste.armbian.com
│ │ ├── utils/ # Shared utility functions
│ │ ├── download.rs # HTTP streaming downloads
│ │ └── decompress.rs # Decompression (XZ, GZ, ZSTD)
│ └── icons/ # App icons (all platforms)
├── scripts/ # Build scripts
└── .github/workflows/ # CI/CD
```
</details>
## Data Sources
| Data | Source |
|------|--------|
| Board List & Images | [github.armbian.com/armbian-images.json](https://github.armbian.com/armbian-images.json) |
| Board Photos | [cache.armbian.com/images/272/{slug}.png](https://cache.armbian.com/images/) |
| Vendor Logos | [cache.armbian.com/images/vendors/272/{vendor}.png](https://cache.armbian.com/images/vendors/272/) |
| MOTD Tips | [raw.githubusercontent.com/armbian/os/main/motd.json](https://raw.githubusercontent.com/armbian/os/main/motd.json) |
| Log Upload | [paste.armbian.com](https://paste.armbian.com) |
## Acknowledgments
- [Raspberry Pi Imager](https://github.com/raspberrypi/rpi-imager) — The inspiration for this project
- [Tauri](https://tauri.app/) — The framework that makes native apps accessible
- [i18next](https://www.i18next.com/) — Internationalization framework
- [Lucide](https://lucide.dev/) — Beautiful icons
- [Armbian Community](https://forum.armbian.com) — For years of amazing work on SBC support

159
README.md
View File

@@ -33,45 +33,34 @@
## Download
<p align="center">
Prebuilt binaries are available for all supported platforms.
| <img src="https://cdn.jsdelivr.net/npm/simple-icons@v11/icons/apple.svg" width="40"> | <img src="https://cdn.jsdelivr.net/npm/simple-icons@v11/icons/windows11.svg" width="40"> | <img src="https://cdn.jsdelivr.net/npm/simple-icons@v11/icons/linux.svg" width="40"> |
| <a href="https://github.com/armbian/imager/releases"><img src="https://cdn.jsdelivr.net/npm/simple-icons@v11/icons/apple.svg" width="24"><br><strong>macOS</strong></a> | <a href="https://github.com/armbian/imager/releases"><img src="https://cdn.jsdelivr.net/npm/simple-icons@v11/icons/windows11.svg" width="24"><br><strong>Windows</strong></a> | <a href="https://github.com/armbian/imager/releases"><img src="https://cdn.jsdelivr.net/npm/simple-icons@v11/icons/linux.svg" width="24"><br><strong>Linux</strong></a> |
|:---:|:---:|:---:|
| **macOS** | **Windows** | **Linux** |
| [Intel & Apple Silicon](https://github.com/armbian/imager/releases) | [x64 & ARM64](https://github.com/armbian/imager/releases) | [x64 & ARM64](https://github.com/armbian/imager/releases) |
| `.dmg` / `.app.zip` | `.exe` / `.msi` | `.deb` / `.AppImage` |
| Intel & Apple Silicon | x64 & ARM64 | x64 & ARM64 |
| <code>.dmg</code> / <code>.app.zip</code> | <code>.exe</code> / <code>.msi</code> | <code>.deb</code> / <code>.AppImage</code> |
</p>
**macOS: First Launch**
### macOS: First Launch
macOS may show a warning because the app is not signed with an Apple Developer certificate. To open it:
1. Try to open the app (it will be blocked)
2. Go to **System Settings****Privacy & Security**
3. Scroll down and click **Open Anyway** next to "Armbian Imager was blocked"
4. Click **Open** in the confirmation dialog
This only needs to be done once.
On first launch, macOS may block the application because it is not signed. If this happens, open **System Settings → Privacy & Security** and click **Open Anyway** next to *Armbian Imager was blocked*. This only needs to be done once.
## How It Works
1. **Select Manufacturer** — Choose from 70+ SBC manufacturers or load a custom image
2. **Select Board** — Pick your board with real photos from armbian.com
3. **Select Image** — Choose desktop/server, kernel variant, stable/nightly
1. **Select Manufacturer** — Choose from 70+ supported SBC manufacturers or load a custom image
2. **Select Board** — Pick your board using real photos and metadata from armbian.com
3. **Select Image** — Choose desktop or server, kernel variant, and stable or nightly builds
4. **Flash** — Download, decompress, write, and verify automatically
## Platform Support
| Platform | Architecture | Status | Notes |
|----------|-------------|--------|-------|
| macOS | Intel x64 | ✅ | Full support |
| macOS | Apple Silicon | ✅ | Native ARM64 + Touch ID |
| Windows | x64 | ✅ | Run as Administrator |
| Windows | ARM64 | ✅ | Native ARM64 build, run as Administrator |
| Linux | x64 | ✅ | UDisks2 + pkexec for privileges |
| Linux | ARM64 | ✅ | Native ARM64 build |
| Platform | Architecture | Notes |
|----------|-------------|-------|
| macOS | Intel x64 | Full support |
| macOS | Apple Silicon | Native ARM64 build, Touch ID support |
| Windows | x64 | Requires Administrator privileges |
| Windows | ARM64 | Native ARM64 build, requires Administrator privileges |
| Linux | x64 | Uses UDisks2 and pkexec for elevated privileges |
| Linux | ARM64 | Native ARM64 build |
### Supported Languages
@@ -79,119 +68,7 @@ English, Italian, German, French, Spanish, Portuguese, Dutch, Polish, Russian, C
## Development
### Prerequisites
- **Node.js 20+** — [nodejs.org](https://nodejs.org)
- **Rust 1.77+** — [rustup.rs](https://rustup.rs)
- **Platform tools** — Xcode (macOS), Visual Studio Build Tools (Windows), build-essential (Linux)
### Quick Start
```bash
git clone https://github.com/armbian/imager.git armbian-imager
cd armbian-imager
npm install
npm run tauri:dev
```
### Scripts
```bash
npm run dev # Frontend only (Vite)
npm run tauri:dev # Full app with hot reload
npm run build # Build frontend for production
npm run tauri:build # Build distributable
npm run tauri:build:dev # Build with debug symbols
npm run lint # ESLint
npm run clean # Clean all build artifacts
```
### Build Scripts
```bash
./scripts/build-macos.sh [--clean] [--dev] # macOS ARM64 + x64
./scripts/build-linux.sh [--clean] [--dev] # Linux x64 + ARM64
./scripts/build-all.sh [--clean] [--dev] # All platforms
```
## Tech Stack
| Layer | Technology | Why |
|-------|------------|-----|
| **UI** | React 19 + TypeScript | Type-safe, component-based UI |
| **Bundler** | Vite | Lightning-fast HMR and builds |
| **Framework** | Tauri 2 | Native performance, tiny bundle |
| **Backend** | Rust | Memory-safe, blazing fast I/O |
| **Async** | Tokio | Efficient concurrent operations |
| **i18n** | i18next | 15 language translations |
### Why Tauri over Electron?
| Metric | Armbian Imager (Tauri) | Typical Electron App |
|--------|------------------------|---------------------|
| App Size | ~15 MB | 150-200 MB |
| RAM Usage | ~50 MB | 200-400 MB |
| Startup | < 1 second | 2-5 seconds |
| Native Feel | ✅ Uses system webview | ❌ Bundles Chromium |
## Project Structure
<details>
<summary>Click to expand</summary>
```
armbian-imager/
├── src/ # React Frontend
│ ├── components/ # UI Components
│ │ ├── flash/ # Flash progress components
│ │ ├── layout/ # Header, HomePage
│ │ ├── modals/ # Board, Image, Device, Manufacturer modals
│ │ └── shared/ # Reusable components (UpdateModal, ErrorDisplay, etc.)
│ ├── hooks/ # React Hooks (Tauri IPC, async data)
│ ├── config/ # Badges, manufacturers, OS info
│ ├── locales/ # i18n translations (15 languages)
│ ├── styles/ # Modular CSS
│ ├── types/ # TypeScript interfaces
│ ├── utils/ # Utility functions
│ └── assets/ # Images, logos, OS icons
├── src-tauri/ # Rust Backend
│ ├── src/
│ │ ├── commands/ # Tauri IPC handlers
│ │ ├── config/ # Application configuration and constants
│ │ ├── devices/ # Platform device detection
│ │ ├── flash/ # Platform flash (macOS, Linux, Windows)
│ │ ├── images/ # Image management and filtering
│ │ ├── logging/ # Session logging
│ │ ├── paste/ # Log upload to paste.armbian.com
│ │ ├── utils/ # Shared utility functions
│ │ ├── download.rs # HTTP streaming downloads
│ │ └── decompress.rs # Decompression (XZ, GZ, ZSTD)
│ └── icons/ # App icons (all platforms)
├── scripts/ # Build scripts
└── .github/workflows/ # CI/CD
```
</details>
## Data Sources
| Data | Source |
|------|--------|
| Board List & Images | [github.armbian.com/armbian-images.json](https://github.armbian.com/armbian-images.json) |
| Board Photos | [cache.armbian.com/images/272/{slug}.png](https://cache.armbian.com/images/) |
| Vendor Logos | [cache.armbian.com/images/vendors/272/{vendor}.png](https://cache.armbian.com/images/vendors/272/) |
| MOTD Tips | [raw.githubusercontent.com/armbian/os/main/motd.json](https://raw.githubusercontent.com/armbian/os/main/motd.json) |
| Log Upload | [paste.armbian.com](https://paste.armbian.com) |
## Acknowledgments
- [Raspberry Pi Imager](https://github.com/raspberrypi/rpi-imager) — The inspiration for this project
- [Tauri](https://tauri.app/) — The framework that makes native apps accessible
- [i18next](https://www.i18next.com/) — Internationalization framework
- [Lucide](https://lucide.dev/) — Beautiful icons
- [Armbian Community](https://forum.armbian.com) — For years of amazing work on SBC support
Development setup, build instructions, and project structure are documented in [DEVELOPMENT.md](DEVELOPMENT.md).
---