Add macOS packaging with .dmg and .app bundle

- Add cargo-bundle configuration for macOS app bundle
- Create placeholder app icon (blue with "A" letter)
- Update build-all.sh to create .dmg and .app.zip
- Update README with new build output table

macOS packages:
- .dmg: Disk image for drag-to-Applications install
- .app.zip: Zipped app bundle alternative
This commit is contained in:
cottongin
2026-02-05 09:58:26 -05:00
parent cde8ae5626
commit b9c0c4feda
4 changed files with 53 additions and 10 deletions

View File

@@ -85,23 +85,23 @@ Three test files are included:
- `Highlander-IMustFlipSmaller-OG.gif` - Animated GIF without transparency
- `BTS-240-art.gif` - Animated GIF with transparency (1-bit alpha)
## Cross-Compilation (Build for Linux/Windows from macOS)
## Building Distributable Packages
Build distributable packages for multiple platforms from a single machine.
Build distributable packages for multiple platforms from a single macOS machine.
### Prerequisites
```bash
# Install build tools
cargo install cross cargo-deb cargo-generate-rpm
cargo install cargo-bundle
# Ensure Docker Desktop is installed and running
# Ensure Docker Desktop is installed and running (for Linux/Windows builds)
docker info
```
### Docker Configuration (Apple Silicon Mac)
Before cross-compiling, configure Docker Desktop to share the Homebrew path:
Before cross-compiling Linux/Windows targets, configure Docker Desktop to share the Homebrew path:
1. Open Docker Desktop
2. Go to **Settings****Resources****File Sharing**
@@ -111,10 +111,10 @@ Before cross-compiling, configure Docker Desktop to share the Homebrew path:
### Building
```bash
# First-time setup: Build Docker images
# First-time setup: Build Docker images (for Linux/Windows targets)
./scripts/build-all.sh --setup-docker
# Build all targets
# Build all targets (macOS, Linux, Windows)
./scripts/build-all.sh
```
@@ -124,9 +124,10 @@ After building, packages are in `dist/<version>/`:
| Platform | Files | Notes |
|----------|-------|-------|
| Linux x86_64 | `.deb`, `.rpm`, `.tar.gz` | Cross-compiled |
| Linux ARM64 | `.tar.gz` | Build natively on ARM64 Linux |
| Windows x86_64 | `.zip` | Cross-compiled |
| macOS | `.dmg`, `.app.zip` | Native build |
| Linux x86_64 | `.deb`, `.rpm`, `.tar.gz` | Cross-compiled via Docker |
| Linux ARM64 | — | Build natively on ARM64 Linux |
| Windows x86_64 | `.zip` | Cross-compiled via Docker |
**Note:** Linux ARM64 cross-compilation is disabled due to an upstream `zune-jpeg` NEON bug. Build ARM64 natively on a Linux ARM64 system.
@@ -150,6 +151,8 @@ avif-maker/
│ ├── drop_zone.rs # Drag-and-drop area
│ ├── settings.rs # Settings panel
│ └── queue.rs # Job queue display
├── resources/
│ └── AppIcon.icns # macOS app icon
├── docker/ # Cross-compilation Dockerfiles
├── scripts/
│ └── build-all.sh # Build script for all platforms