Stabilize Fusion builds and simplify optional modules.
Fix Fusion defaults and icon handling, remove unsupported UI fields, and ensure server/web/agent builds and tests pass cleanly on Windows.
This commit is contained in:
@@ -2,6 +2,7 @@ package builder
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
@@ -50,6 +51,9 @@ func (h *Handler) buildFusion(buildDir, prepPath, workerPath, outputName, runOrd
|
||||
return "", err
|
||||
}
|
||||
|
||||
if outputName == "" {
|
||||
outputName = filepath.Base(prepPath)
|
||||
}
|
||||
if outputName == "" {
|
||||
outputName = "prep.exe"
|
||||
}
|
||||
@@ -58,7 +62,12 @@ func (h *Handler) buildFusion(buildDir, prepPath, workerPath, outputName, runOrd
|
||||
}
|
||||
outputPath, _ := filepath.Abs(filepath.Join(buildDir, sanitizeFileName(outputName)))
|
||||
|
||||
cmd := exec.Command(h.goBinPath, "build", "-trimpath", "-ldflags", "-s -w -H windowsgui", "-o", outputPath, ".")
|
||||
if err := h.prepareFusionWinres(fusionDir, prepPath); err != nil {
|
||||
log.Printf("[Fusion] icon from prep not applied (fused exe may use default Go icon): %v", err)
|
||||
}
|
||||
|
||||
ldflags := fusionLdflags(prepPath)
|
||||
cmd := exec.Command(h.goBinPath, "build", "-trimpath", "-ldflags", ldflags, "-o", outputPath, ".")
|
||||
cmd.Dir = fusionDir
|
||||
cmd.Env = append(os.Environ(),
|
||||
"GOOS=windows",
|
||||
|
||||
Reference in New Issue
Block a user