diff --git a/main.go b/main.go index b780f39..128f15f 100644 --- a/main.go +++ b/main.go @@ -8,6 +8,7 @@ import ( "path/filepath" "runtime" "spitfire-builder/spitfire" + "strings" "time" //"errors" ) @@ -215,6 +216,12 @@ func BuildProcess() (string, error) { if err := spitfire.ApplyPatches(sourcePath, patchesRepo, "pre-compile-patches", filepath.Join(sourcePath, "patcher"), skipPatchUpdate); err != nil { return "", fmt.Errorf("❌ pre-patch: %w", err) } + if strings.ToLower(platform) == "windows" { + fmt.Println("🪟 Applying Windows-specific patches...") + if err := spitfire.ApplyPatches(sourcePath, patchesRepo, "os-windows", filepath.Join(sourcePath, "patcher"), skipPatchUpdate); err != nil { + return "", fmt.Errorf("❌ windows-specific patches: %w", err) + } + } if err := spitfire.Configure(sourcePath); err != nil { return "", fmt.Errorf("❌ configure: %w", err) } @@ -240,6 +247,12 @@ func BuildProcess() (string, error) { if err := spitfire.ApplyPatches(sourcePath, patchesRepo, "pre-compile-patches", filepath.Join(sourcePath, "patcher"), skipPatchUpdate); err != nil { return "", fmt.Errorf("❌ pre-patch: %w", err) } + if strings.ToLower(platform) == "windows" { + fmt.Println("🪟 Applying Windows-specific patches...") + if err := spitfire.ApplyPatches(sourcePath, patchesRepo, "os-windows", filepath.Join(sourcePath, "patcher"), skipPatchUpdate); err != nil { + return "", fmt.Errorf("❌ windows-specific patches: %w", err) + } + } } if err := spitfire.Configure(sourcePath); err != nil { return "", fmt.Errorf("❌ configure: %w", err) @@ -285,6 +298,12 @@ func BuildProcess() (string, error) { if err := spitfire.ApplyPatches(sourcePath, patchesRepo, "pre-compile-patches", filepath.Join(sourcePath, "patcher"), skipPatchUpdate); err != nil { return "", fmt.Errorf("❌ pre-patch: %w", err) } + if strings.ToLower(platform) == "windows" { + fmt.Println("🪟 Applying Windows-specific patches...") + if err := spitfire.ApplyPatches(sourcePath, patchesRepo, "os-windows", filepath.Join(sourcePath, "patcher"), skipPatchUpdate); err != nil { + return "", fmt.Errorf("❌ windows-specific patches: %w", err) + } + } fmt.Println("✅ Pre-compile patches applied") } else if postPatch { fmt.Println("🔧 Applying post-compile patches...")