VideoTools/docs/CROSS_PLATFORM_GUIDE.md
VideoTools CI 965242a767 Add comprehensive Windows 11 support and localization infrastructure
- Enhanced Windows 11 native installer with GPU detection and DirectX 12 support
- Add cross-platform GUI detection utilities for improved platform handling
- Implement localization infrastructure foundation with i18n support
- Create comprehensive cross-platform deployment guide
- Add Inuktitut and Cree syllabics support framework
- Enhanced Arch Linux installation with desktop environment detection
- Implement Windows 11 DPI awareness and display scaling support
- Add automated cross-platform testing framework
2026-01-17 03:05:12 -05:00

9.7 KiB

VideoTools Cross-Platform Compatibility Guide

Overview

VideoTools has been enhanced to provide seamless support for Arch Linux and Windows 11, with intelligent GUI detection and adaptive window sizing across both platforms.

🐧 Arch Linux Enhancements

Installation Improvements

The scripts/install.sh script has been enhanced with:

GUI Environment Detection

  • Display Server Detection: Automatically detects Wayland vs X11
  • Desktop Environment: Detects GNOME, KDE, XFCE, i3, Sway
  • GPU Detection: Identifies NVIDIA, AMD, Intel graphics cards
  • Driver Verification: Checks if appropriate drivers are loaded

Enhanced Dependency Management

# The enhanced install function provides detailed feedback:
🔧 Detecting Arch Linux configuration...
   Display Server: Wayland detected
   Desktop Environment: GNOME
   GPU: NVIDIA detected - ensuring proper driver setup
   💡 Install NVIDIA drivers: sudo mhwd -a pci nonfree 0300
📦 Installing core packages...
   ✅ Arch Linux core dependencies installed

Package Installation

  • Core Dependencies: FFmpeg, GStreamer with development headers
  • Display Server Specific: Wayland protocols or X11 server packages
  • Desktop Environment Specific: GNOME, KDE, XFCE packages when detectable
  • GPU Drivers: Recommendations and verification for NVIDIA/AMD/Intel

Testing

Run the test script to verify Arch Linux support:

./scripts/test-cross-platform.sh arch

🪟 Windows 11 Enhancements

Native Installation (No WSL Required)

The scripts/install-deps-windows.ps1 script now provides:

Windows 11 Detection

  • Build Number Detection: Distinguishes Windows 11 (22000+) from Windows 10
  • Edition Detection: Identifies Home, Pro, Education editions
  • Display Scaling: Automatic DPI scaling detection
  • GPU Analysis: Vendor, model, and DirectX 12 support detection

Enhanced PowerShell Functions

# Get comprehensive Windows 11 information
$win11Info = Get-Windows11Info
$win11Info.IsWindows11          # boolean
$win11Info.DisplayScale         # e.g., 1.25, 1.5, 2.0
$win11Info.GPUInfo.Name       # e.g., "NVIDIA GeForce RTX 4070"
$win11Info.GPUInfo.SupportsDirectX12  # boolean

Native Dependency Installation

  • Chocolatey Integration: Automatic installation and management
  • Native Dependencies: FFmpeg, GStreamer, Go for Windows
  • GPU Optimization: Vendor-specific driver recommendations
  • No WSL Dependency: Pure Windows installation

GPU Driver Recommendations

  • NVIDIA: GeForce Experience updates, Game Ready Drivers
  • AMD: Adrenalin Software updates
  • Intel: Windows Update driver integration

Testing

Run the test script to verify Windows 11 support:

# From Git Bash (on Windows)
./scripts/test-cross-platform.sh windows

# From PowerShell
.\scripts\test-cross-platform.sh windows

🖥️ Cross-Platform GUI Detection

New GUI Environment System

VideoTools now includes a comprehensive GUI detection system in internal/utils/gui_detection.go:

Platform Detection

guiEnv := guitutils.DetectGUIEnvironment()
fmt.Printf("Display: %s, Desktop: %s, Scale: %.1fx, GPU: %s %s",
    guiEnv.DisplayServer, guiEnv.DesktopEnvironment, 
    guiEnv.ScaleFactor, guiEnv.GPUInfo.Vendor, guiEnv.GPUInfo.Model)

Supported Environments

Platform Display Server Desktop GPU Detection Scaling
Arch Linux X11, Wayland GNOME, KDE, XFCE, i3, Sway
Windows 11 Windows Native Windows 11
macOS Darwin macOS

Adaptive Window Sizing

Windows automatically adapt to the detected environment:

Size Calculation Logic

// Get optimal window size for current environment
optimalSize := guiEnv.GetOptimalWindowSize(800, 600)

// Module-specific sizing
playerSize := guiEnv.GetModuleSpecificSize("player")     // 1024x768 base
authorSize := guiEnv.GetModuleSpecificSize("author")     // 900x700 base
queueSize := guiEnv.GetModuleSpecificSize("queue")       // 700x500 base

Platform-Specific Adjustments

  • Windows 11: Modern UI scaling, max 1600x1200
  • Wayland: Good scaling support, max 1400x1000
  • X11 High DPI: Conservative scaling, max 1200x900
  • GPU Acceleration: Disabled on very high DPI displays (>2.0x)

🧪 Testing Framework

Comprehensive Test Script

The scripts/test-cross-platform.sh script provides:

Test Categories

  1. Arch Linux Support: Display server, GPU, dependencies
  2. Windows 11 Support: Build detection, GPU, scaling
  3. GUI Detection: Code compilation, build verification
  4. Installation Scripts: Enhanced function verification

Usage Examples

# Test all platforms
./scripts/test-cross-platform.sh all

# Test specific components
./scripts/test-cross-platform.sh arch
./scripts/test-cross-platform.sh windows
./scripts/test-cross-platform.sh gui
./scripts/test-cross-platform.sh scripts

Sample Output

🐧 Testing Arch Linux Support...
   ✅ Wayland detected: :0
   ✅ Desktop Environment: GNOME
   ✅ NVIDIA GPU detected
   ✅ NVIDIA drivers loaded
✅ All core dependencies installed

📊 Test Results Summary:
🐧 Arch Linux Support:
   • Display server detection: ✅ Enhanced
   • GPU detection: ✅ Enhanced
   • Desktop environment: ✅ Detected
   • Dependency management: ✅ Pacman enhanced
✅ Cross-platform compatibility improvements successfully implemented!

🔧 Implementation Details

Files Modified

Installation Scripts

  • scripts/install.sh: Enhanced Arch Linux detection and GPU handling
  • scripts/install-deps-windows.ps1: Windows 11 native installation

Core Application

  • main.go: Integrated GUI environment detection and adaptive sizing
  • internal/utils/gui_detection.go: New cross-platform GUI system

Testing

  • scripts/test-cross-platform.sh: Comprehensive validation script

Key Features

Arch Linux Enhancements

  • Display server detection (Wayland/X11)
  • Desktop environment detection (GNOME/KDE/XFCE/i3/Sway)
  • GPU vendor detection and driver verification
  • Enhanced dependency management with pacman
  • Platform-specific package recommendations

Windows 11 Enhancements

  • Windows 11 build number detection (22000+)
  • Native installation without WSL requirements
  • GPU vendor and DirectX 12 detection
  • Display scaling detection (DPI awareness)
  • Enhanced PowerShell with hardware detection

Cross-Platform GUI System

  • Unified GUI environment detection
  • Adaptive window sizing per platform
  • Module-specific size optimization
  • GPU acceleration consideration
  • High DPI display support

🚀 Usage Instructions

For Arch Linux Users

# 1. Run enhanced installer
./scripts/install.sh

# 2. Build VideoTools
./scripts/build.sh

# 3. Run VideoTools
./scripts/run.sh

For Windows 11 Users

# 1. Run enhanced PowerShell installer (as Administrator)
.\scripts\install-deps-windows.ps1

# 2. Build VideoTools
.\scripts\build.ps1

# 3. Run VideoTools
.\scripts\run.ps1

Testing Your Setup

# Verify cross-platform compatibility
./scripts/test-cross-platform.sh all

🎯 Benefits Achieved

For You (Arch Linux)

  • Perfect Arch Integration: Detects your exact setup
  • GPU Optimization: Proper driver recommendations
  • Desktop Awareness: GNOME/KDE/XFCE specific handling
  • Dependency Accuracy: Pacman-specific package management

For Jake (Windows 11)

  • Native Windows Experience: No WSL required
  • Modern Windows Support: Windows 11 specific optimizations
  • GPU Acceleration: DirectX 12 and vendor support
  • Display Scaling: Proper DPI handling for his setup

For Development

  • Unified Codebase: Single GUI system for all platforms
  • Maintainable: Clean separation of platform logic
  • Testable: Comprehensive validation framework
  • Extensible: Easy to add new platforms

🔍 Validation Checklist

Arch Linux Validation

  • Install on vanilla Arch with GNOME
  • Install on Arch with KDE
  • Install on Arch with XFCE
  • Install on Arch with i3 window manager
  • Test NVIDIA GPU setup
  • Test AMD GPU setup
  • Test Intel GPU setup
  • Verify Wayland compatibility
  • Verify X11 compatibility

Windows 11 Validation

  • Install on Windows 11 21H2
  • Install on Windows 11 22H2
  • Install on Windows 11 23H2
  • Test NVIDIA GPU (GeForce/Quadro)
  • Test AMD GPU (Radeon/Pro)
  • Test Intel GPU (Iris/UHD)
  • Verify 100% DPI scaling
  • Verify 125% DPI scaling
  • Verify 150% DPI scaling
  • Test multi-monitor setups

Cross-Platform Validation

  • Verify identical feature parity
  • Test module switching performance
  • Validate window sizing consistency
  • Test high DPI displays (150%+)
  • Verify GPU acceleration reliability

📝 Future Enhancements

Planned Improvements

  1. Additional Linux Distros: Fedora, Ubuntu, openSUSE support
  2. macOS Integration: Apple Silicon and Intel Mac support
  3. Advanced GUI Features: Custom themes, layout persistence
  4. Mobile Support: Potential Android/iOS player components
  5. Cloud Integration: Remote processing capabilities

Extensibility

The GUI detection system is designed for easy extension:

  • Add new platforms in gui_detection.go
  • Implement platform-specific optimizations
  • Extend test suite for new environments
  • Maintain backward compatibility

Status: IMPLEMENTED - Cross-platform compatibility enhancements are complete and ready for testing.

Next Step: Run comprehensive tests on both Arch Linux and Windows 11 systems to validate all improvements.