Switch from building a onefile executable to a onedir executable and app bundle.
The onefile executable is less efficient because it needs to extract resources
into a temp directory on every run, and it will no longer be supported as part
of an app bundle in future versions of pyinstaller.
Skip installing config and inference files under /usr, they will be referenced
from within the app bundle.
Use a plist when calling pkgbuild to avoid the macOS installer "relocating"
the app bundle to arbitrary locations, which breaks the "ramalama" symlink.
Signed-off-by: Mike Bonnet <mikeb@redhat.com>
Fixes #812
This commit adds a mechanism to create self-contained macOS installer
packages (.pkg) that bundle Python and all dependencies, eliminating
the need for users to install Python separately.
**New Features:**
1. **PyInstaller Spec File** (ramalama.spec)
- Configures PyInstaller to create standalone executable
- Bundles all ramalama modules and dependencies
- Includes configuration files, man pages, and shell completions
- Creates macOS app bundle structure
2. **Build Script** (scripts/build_macos_pkg.sh)
- Automated build process for macOS .pkg installer
- Uses PyInstaller to create standalone binary
- Packages everything into macOS installer format
- Includes post-install script for PATH configuration
- Generates installer with welcome/readme/conclusion screens
3. **GitHub Actions Workflow** (.github/workflows/build-macos-installer.yml)
- Automatically builds macOS installer on release
- Runs on macOS runners with proper dependencies
- Uploads installer as release asset
- Generates SHA256 checksums for verification
- Can be triggered manually for testing
4. **Documentation** (docs/MACOS_INSTALL.md)
- Comprehensive installation guide for macOS users
- Multiple installation methods documented
- Troubleshooting section
- Prerequisites and system requirements
- Uninstallation instructions
5. **README Update**
- Added macOS installer as primary installation method
- Links to detailed installation guide
**Benefits:**
- No Python installation required for end users
- Single-click installation experience
- Includes all dependencies in one package
- Follows macOS packaging best practices
- Automatic PATH configuration
- Professional installer UI with instructions
**Installation:**
Users can now download RamaLama-VERSION-macOS-Installer.pkg from
GitHub Releases and install with a simple double-click or:
sudo installer -pkg RamaLama-*-macOS-Installer.pkg -target /
The installer places files in /usr/local/ following macOS conventions.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>