Table of Contents
- Building VideoTools
- Quick Start (All Platforms)
- Platform-Specific Details
- Advanced: Manual Platform-Specific Builds
- Build Options
- Troubleshooting
- "go: command not found"
- "CGO_ENABLED must be set"
- "ffmpeg not found" (Linux/macOS)
- Windows: "x86_64-w64-mingw32-gcc not found"
- macOS: "ld: library not found"
- Build Artifacts
- Development Builds
- CI/CD
Building VideoTools
VideoTools uses a universal build script that automatically detects your platform and builds accordingly.
Quick Start (All Platforms)
./scripts/linux/build.sh
That's it! The script will:
- Detect your platform (Linux/macOS/Windows)
- Build the appropriate executable
- On Windows: Offer to download FFmpeg automatically
Build artifacts and metadata:
- Output packages are written to
dist/<os>/<channel>/. - The build script writes
build.jsonalongside the zip artifact. - Set
VT_BUILD_CHANNEL=stableto produce stable artifacts; default isdev. - Stable builds are pushed to GitHub via the
githubremote (SSH).
Platform-Specific Details
Linux
Prerequisites:
- Go 1.21+
- FFmpeg (system package)
- CGO build dependencies
Install FFmpeg:
# Fedora/RHEL
sudo dnf install ffmpeg
# Ubuntu/Debian
sudo apt install ffmpeg
# Arch Linux
sudo pacman -S ffmpeg
Build:
./scripts/linux/build.sh
Output: VideoTools (native executable)
Run:
./VideoTools
macOS
Prerequisites:
- Go 1.21+
- FFmpeg (via Homebrew)
- Xcode Command Line Tools
Install FFmpeg:
brew install ffmpeg
Build:
./scripts/linux/build.sh
Output: VideoTools (native executable)
Run:
./VideoTools
Windows
Prerequisites:
- Go 1.21+
- MinGW-w64 (for CGO)
- Git Bash or similar (to run shell scripts)
Build:
./scripts/linux/build.sh
The script will:
- Build
VideoTools.exe - Prompt to download FFmpeg automatically
- Create a zip package and
build.jsonindist/windows/<channel>/
Output: VideoTools.exe (Windows GUI executable)
Package: dist/windows/<channel>/vX.Y.Z-<git>_win.zip + build.json
Run:
- Double-click
VideoTools.exein the project root - Or:
./VideoTools.exefrom Git Bash
Automatic FFmpeg Setup:
# The build script will offer this automatically, or run manually:
./scripts/windows/support/setup-windows.bat
# Or in PowerShell:
.\scripts\windows\support\setup-windows.ps1 -Portable
Advanced: Manual Platform-Specific Builds
Linux/macOS Native Build
./scripts/linux/build-linux.sh
Windows Cross-Compile (from Linux)
# Install MinGW first
sudo dnf install mingw64-gcc mingw64-winpthreads-static # Fedora
# OR
sudo apt install gcc-mingw-w64 # Ubuntu/Debian
# Cross-compile
./scripts/windows/build-windows.sh
# Output: dist/windows/<channel>/vX.Y.Z-<git>_win.zip (with FFmpeg bundled)
Build Options
Clean Build
# The build script automatically cleans cache
./scripts/linux/build.sh
Debug Build
# Standard build includes debug info by default
CGO_ENABLED=1 go build -o VideoTools
# Run with debug logging
./VideoTools -debug
Release Build (Smaller Binary)
# Strip debug symbols
go build -ldflags="-s -w" -o VideoTools
Troubleshooting
"go: command not found"
Install Go 1.21+ from https://go.dev/dl/
"CGO_ENABLED must be set"
CGO is required for Fyne (GUI framework):
export CGO_ENABLED=1
./scripts/linux/build.sh
"ffmpeg not found" (Linux/macOS)
Install FFmpeg using your package manager (see above).
Windows: "x86_64-w64-mingw32-gcc not found"
Install MinGW-w64:
- MSYS2: https://www.msys2.org/
- Or standalone: https://www.mingw-w64.org/
macOS: "ld: library not found"
Install Xcode Command Line Tools:
xcode-select --install
Build Artifacts
After building, you'll find:
Linux/macOS:
VideoTools/
└── VideoTools # Native executable
Windows:
VideoTools/
├── VideoTools.exe # Main executable
└── dist/
└── windows/
└── dev/
├── vX.Y.Z-<git>_win.zip
└── build.json
Development Builds
For faster iteration during development:
# Quick build (no cleaning)
go build -o VideoTools
# Run directly
./VideoTools
# With debug output
./VideoTools -debug
CI/CD
The build scripts are designed to work in CI/CD environments:
# Example GitHub Actions
- name: Build VideoTools
run: ./scripts/linux/build.sh
For more details, see:
QUICKSTART.md- Simple setup guideWINDOWS_SETUP.md- Windows-specific instructionsdocs/WINDOWS_COMPATIBILITY.md- Cross-platform implementation details
Navigation
What is VideoTools?
Project Status
Capabilities
Codecs and Frame Rates
Installation (One Command)
Alternative: Developer Setup
DVD Workflow (Optional)
Documentation
- Project Status
- Installation
- Readme
- Build And Run
- DVD User Guide
- DVD Implementation Summary
- Integration Guide
- Queue System Guide
- Localization-Policy