Cross-Platform Crucible (#2)
test-image / build-image (push) Successful in 44s
test / test (push) Successful in 1m20s
build-binaries / build-binaries (push) Successful in 2m0s
build-image / publish (push) Successful in 12s

Crucible groundwork for cross-platform compatibility.

Reviewed-on: #2
Reviewed-by: xtul <mpiasecki720@protonmail.com>
Co-authored-by: vickydotbat <vickydotbat@tutamail.com>
Co-committed-by: vickydotbat <vickydotbat@tutamail.com>
This commit was merged in pull request #2.
This commit is contained in:
2026-06-16 13:52:19 +00:00
committed by archvillainette
parent e9d82816b7
commit 93433e3f53
11 changed files with 465 additions and 43 deletions
+15 -2
View File
@@ -1,6 +1,7 @@
package music
import (
"fmt"
"os"
"os/exec"
"path/filepath"
@@ -104,7 +105,7 @@ func ResolveFFmpegWithConfig(configuredPath string) (string, error) {
}
path, err := exec.LookPath("ffmpeg")
if err != nil {
return "", err
return "", ffmpegMissingErr("ffmpeg")
}
return path, nil
}
@@ -122,11 +123,23 @@ func ResolveFFprobeWithConfig(configuredPath string) (string, error) {
}
path, err := exec.LookPath("ffprobe")
if err != nil {
return "", err
return "", ffmpegMissingErr("ffprobe")
}
return path, nil
}
// ffmpegMissingErr renders an actionable, cross-platform "tool not found"
// message. Only the music builder needs ffmpeg/ffprobe; every other builder
// runs with zero external dependencies.
func ffmpegMissingErr(tool string) error {
return fmt.Errorf(`%[1]s not found on PATH.
Windows: winget install Gyan.FFmpeg
macOS: brew install ffmpeg
Linux: apt install ffmpeg (or your distro's package manager)
Only the music builder needs %[1]s; set SOW_%[2]s to a full path to override.`,
tool, strings.ToUpper(tool))
}
func IsMusicAssetPath(rel string) bool {
rel = filepath.ToSlash(strings.TrimSpace(rel))
return rel == "envi/music" || strings.HasPrefix(rel, "envi/music/")