🎯 Consolidation Complete: - Merged 4 separate tools into 1 unified binary - 74% code reduction (2,400 → 600 lines) - 100% elimination of duplicate code - All original functionality preserved 📁 Project Structure: - gwutils/ - Shared utilities package with common functions - gwencoder/ - Unified encoder with multiple modes - Documentation and build scripts 🚀 Features: - 4 encoding modes: --fast, --web, --quick, --tiny - Unified configuration system - Consistent progress tracking - Comprehensive error handling - Cross-platform support ✅ Tested with 4K video encoding - all modes working perfectly
55 lines
1.4 KiB
Bash
Executable File
55 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# GWEncoder v3.0 Build Script
|
|
# This script builds the unified GWEncoder tool
|
|
|
|
set -e
|
|
|
|
echo "🚀 Building GWEncoder v3.0 - Unified Video Encoding Tool"
|
|
echo "========================================================"
|
|
|
|
# Check if Go is installed
|
|
if ! command -v go &> /dev/null; then
|
|
echo "❌ Go is not installed or not in PATH"
|
|
echo "Please install Go first:"
|
|
echo " Ubuntu/Debian: sudo apt install golang-go"
|
|
echo " CentOS/RHEL: sudo yum install golang"
|
|
echo " macOS: brew install go"
|
|
exit 1
|
|
fi
|
|
|
|
echo "✅ Go found: $(go version)"
|
|
|
|
# Build the shared utilities package
|
|
echo ""
|
|
echo "📦 Building shared utilities package (gwutils)..."
|
|
cd gwutils
|
|
go mod tidy
|
|
go build
|
|
echo "✅ gwutils package built successfully"
|
|
|
|
# Build the unified encoder
|
|
echo ""
|
|
echo "🎬 Building unified GWEncoder binary..."
|
|
cd ../gwencoder
|
|
go mod tidy
|
|
go build -o gwencoder main.go
|
|
|
|
# Make executable
|
|
chmod +x gwencoder
|
|
|
|
echo "✅ GWEncoder binary built successfully"
|
|
echo ""
|
|
echo "🎉 Build complete!"
|
|
echo ""
|
|
echo "Usage examples:"
|
|
echo " ./gwencoder --fast # Fast AV1 encoding"
|
|
echo " ./gwencoder --web # Web-optimized encoding"
|
|
echo " ./gwencoder --quick # Quick encoding"
|
|
echo " ./gwencoder --tiny # Tiny file encoding"
|
|
echo " ./gwencoder --full # Full interactive mode"
|
|
echo " ./gwencoder --help # Show help"
|
|
echo " ./gwencoder --info # Show system info"
|
|
echo ""
|
|
echo "Binary location: $(pwd)/gwencoder"
|