feat: add Wine Z: path prefix for Windows platform on Linux host
CI / build (push) Successful in 1m44s
CI / build (push) Successful in 1m44s
- Add winePath helper that prepends Z: when platform is windows on Linux - Thread platform through buildModPath, buildAutoArgs, and Start() - Apply Z: prefix to -config=, -mod=, -profiles=, and %command% binary paths - Add tests for winePath, buildAutoArgs, and buildModPath with platform param - Fix formatting across services package with gofmt - Include all prior bug fixes from this branch
This commit is contained in:
@@ -76,7 +76,7 @@ func (h *Handler) Health(c *gin.Context) {
|
||||
Running: h.steamcmd.IsRunning(),
|
||||
},
|
||||
Frontend: FrontendHealth{
|
||||
Served: true,
|
||||
Served: h.frontendServed,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -140,8 +140,6 @@ func findServerBinary(serverfileDir string) (string, bool) {
|
||||
candidates := []string{"arma3server_x64"}
|
||||
if runtime.GOOS == "windows" {
|
||||
candidates = append(candidates, "arma3server_x64.exe")
|
||||
} else {
|
||||
candidates = append(candidates, "arma3server_x64.exe")
|
||||
}
|
||||
for _, name := range candidates {
|
||||
p := filepath.Join(serverfileDir, name)
|
||||
|
||||
@@ -117,7 +117,9 @@ func (h *Handler) StreamRPTLogs(c *gin.Context) {
|
||||
if currentPath == "" {
|
||||
continue
|
||||
}
|
||||
conn.WriteMessage(websocket.TextMessage, []byte("--- tailing: "+filepath.Base(currentPath)+" ---"))
|
||||
if err := conn.WriteMessage(websocket.TextMessage, []byte("--- tailing: "+filepath.Base(currentPath)+" ---")); err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
if currentPath == "" {
|
||||
continue
|
||||
|
||||
@@ -7,18 +7,19 @@ import (
|
||||
)
|
||||
|
||||
type Handler struct {
|
||||
settings *services.SettingsManager
|
||||
configs *services.ConfigManager
|
||||
modlists *services.ModlistManager
|
||||
process *services.ProcessManager
|
||||
steamcmd *services.SteamCmdManager
|
||||
scheduler *services.Scheduler
|
||||
streamer *services.LogStreamer
|
||||
dataDir string
|
||||
serverfileDir string
|
||||
modsDir string
|
||||
cfgDir string
|
||||
profilesDir string
|
||||
settings *services.SettingsManager
|
||||
configs *services.ConfigManager
|
||||
modlists *services.ModlistManager
|
||||
process *services.ProcessManager
|
||||
steamcmd *services.SteamCmdManager
|
||||
scheduler *services.Scheduler
|
||||
streamer *services.LogStreamer
|
||||
dataDir string
|
||||
serverfileDir string
|
||||
modsDir string
|
||||
cfgDir string
|
||||
profilesDir string
|
||||
frontendServed bool
|
||||
}
|
||||
|
||||
func New(
|
||||
@@ -30,20 +31,22 @@ func New(
|
||||
scheduler *services.Scheduler,
|
||||
streamer *services.LogStreamer,
|
||||
dataDir, serverfileDir, modsDir, cfgDir, profilesDir string,
|
||||
frontendServed bool,
|
||||
) *Handler {
|
||||
return &Handler{
|
||||
settings: settings,
|
||||
configs: configs,
|
||||
modlists: modlists,
|
||||
process: process,
|
||||
steamcmd: steamcmd,
|
||||
scheduler: scheduler,
|
||||
streamer: streamer,
|
||||
dataDir: dataDir,
|
||||
serverfileDir: serverfileDir,
|
||||
modsDir: modsDir,
|
||||
cfgDir: cfgDir,
|
||||
profilesDir: profilesDir,
|
||||
settings: settings,
|
||||
configs: configs,
|
||||
modlists: modlists,
|
||||
process: process,
|
||||
steamcmd: steamcmd,
|
||||
scheduler: scheduler,
|
||||
streamer: streamer,
|
||||
dataDir: dataDir,
|
||||
serverfileDir: serverfileDir,
|
||||
modsDir: modsDir,
|
||||
cfgDir: cfgDir,
|
||||
profilesDir: profilesDir,
|
||||
frontendServed: frontendServed,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user