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:
@@ -57,9 +57,11 @@ func main() {
|
||||
|
||||
r := gin.Default()
|
||||
|
||||
frontendServed := false
|
||||
subFS, subErr := fs.Sub(embed.Frontend, "dist")
|
||||
if subErr == nil {
|
||||
if _, err := subFS.Open("index.html"); err == nil {
|
||||
frontendServed = true
|
||||
r.NoRoute(func(c *gin.Context) {
|
||||
path := strings.TrimPrefix(c.Request.URL.Path, "/")
|
||||
if path == "" {
|
||||
@@ -81,7 +83,7 @@ func main() {
|
||||
}
|
||||
}
|
||||
|
||||
handler := api.New(settings, configMgr, modlistMgr, process, steamcmd, scheduler, streamer, dataDir, serverfileDir, modsDir, cfgDir, profilesDir)
|
||||
handler := api.New(settings, configMgr, modlistMgr, process, steamcmd, scheduler, streamer, dataDir, serverfileDir, modsDir, cfgDir, profilesDir, frontendServed)
|
||||
handler.SetupRoutes(r)
|
||||
|
||||
// Startup auto-tasks
|
||||
|
||||
Reference in New Issue
Block a user