VideoTools/internal/utils/proc_other.go
Stu 30899b3512 Add Windows 11 compatibility and cross-platform build system
Ports Windows compatibility improvements from VideoTools to enable
VT_Player to build and run on Windows 11 alongside VideoTools.

Build System Enhancements:
- Universal build script auto-detects platform (Linux/macOS/Windows)
- Platform-specific build routing (build-linux.sh for Unix)
- Windows: Builds vt_player.exe with GUI flags (-H windowsgui)
- Windows: Automatic FFmpeg PATH detection
- Shares dependencies with VideoTools installation

Windows Console Hiding:
- Created internal/utils/proc_windows.go (Windows-specific)
- Created internal/utils/proc_other.go (Linux/macOS no-op)
- ApplyNoWindow() hides FFmpeg/ffprobe console windows on Windows
- Provides clean GUI experience without console popups

Cross-Platform Support:
- Build flags adapt to target platform automatically
- Go build tags for platform-specific code
- CGO enabled for all platforms (required by Fyne)
- Tested on Linux, ready for Windows 11

Documentation:
- WINDOWS_COMPATIBILITY.md: Complete Windows setup guide
- Explains dependency sharing with VideoTools
- Troubleshooting section for common issues
- Platform-specific build flag documentation

Benefits for Jake's Windows 11 Environment:
- Uses same MinGW-w64 toolchain as VideoTools
- Uses same FFmpeg installation (already on PATH)
- No additional dependency installation needed
- Build process identical to VideoTools

Technical Details:
- Windows GUI binary: vt_player.exe (~45MB)
- Linux/macOS binary: vt_player (~32MB)
- All platforms use CGO for Fyne OpenGL bindings
- syscall.SysProcAttr{HideWindow: true} for Windows processes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 11:10:57 -05:00

11 lines
155 B
Go

//go:build !windows
package utils
import "os/exec"
// ApplyNoWindow is a no-op on non-Windows platforms.
func ApplyNoWindow(cmd *exec.Cmd) {
_ = cmd
}