Prerequisites
Before building, ensure you have the following installed:Go
Version 1.21 or higher
Make
GNU Make (included on most systems)
FFmpeg
Required for video conversion
ImageMagick
Required for image conversion
Quick Start
Clone the Repository
Install Dependencies
Build the Binary
Make Targets Reference
The Makefile provides comprehensive build automation. Runmake help to see all available targets.
Build Commands
make build
make build
Build the production binary with version information.Output:
./build/media-converterFeatures:- Includes version, commit hash, and build time
- Optimized for distribution
- Creates build directory automatically
make build-local
make build-local
Build for local development without version info.Output:
./media-converterFeatures:- Faster builds (no linker flags)
- Places binary in project root
- Ideal for rapid iteration
make install
make install
Install the binary to Output:
$GOPATH/bin.$GOPATH/bin/media-converterFeatures:- Makes binary available system-wide
- Includes version information
- Requires
$GOPATH/binin your$PATH
make dev
make dev
Quick development build workflow.Runs:
clean → deps → build-localUse case: Start fresh development buildmake all
make all
Complete build pipeline.Runs:
clean → deps → test → buildUse case: Full validation before releaseCross-Compilation
Camera Workflow supports building for multiple platforms:Standard Cross-Compile
media-converter-darwin-amd64(macOS Intel)media-converter-darwin-arm64(macOS Apple Silicon)media-converter-linux-amd64(Linux x64)media-converter-linux-arm64(Linux ARM64)media-converter-windows-amd64.exe(Windows x64)
./build/
Release Binaries
media-converter-macos-intel(macOS Intel x64)media-converter-macos-apple-silicon(macOS M1/M2/M3/M4)media-converter-linux-amd64(Linux x64)media-converter-linux-arm64(Linux ARM64)media-converter-windows-amd64.exe(Windows x64)
Release Preparation
- Clean build artifacts
- Download dependencies
- Run full test suite
- Build release binaries
Testing Commands
Code Quality
make fmt
make fmt
Format Go code using Formats all
go fmt..go files in the project.make vet
make vet
Run Go vet to find suspicious code.Checks for common mistakes and potential issues.
make lint
make lint
Run all linting tools.Runs:
fmt → vetCleanup
./build/directory./media-converterbinarycoverage.outandcoverage.html- Go build cache
Running the Application
- Builds local binary
- Runs with
--dry-run --helpflags
Raycast Extension
The monorepo includes a Raycast extension for macOS:Raycast Build Commands
Raycast Development Workflow
Raycast binaries are built with specific version metadata and embedded into the extension bundle.
Build Variables
The Makefile uses the following build variables:Custom Version
You can override version information:Linker Flags
Production builds embed version information using linker flags:Build Troubleshooting
Go Module Errors
Go Module Errors
If you encounter module errors:
FFmpeg/ImageMagick Not Found
FFmpeg/ImageMagick Not Found
Install required dependencies:macOS:Ubuntu/Debian:Arch Linux:
Cross-Compilation Fails
Cross-Compilation Fails
Ensure you have the Go toolchain for target platforms:
Permission Denied
Permission Denied
If build output fails with permission errors:
Docker Build (Future)
Docker support is planned:Next Steps
Testing
Learn how to run tests and check coverage
Architecture
Understand the system architecture
Contributing
Contribute to the project