Windows-related build script and game launching fixes.
Fixed Windows build script to install gcc in MSYS2, which is needed for some dependencies. Fixed game launching on Windows, now ioq3 will search for game data in proper directory.
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -114,6 +115,12 @@ func (l *Launcher) Launch(server_profile *datamodels.Server, user_profile *datam
|
||||
go func() {
|
||||
go func() {
|
||||
cmd := exec.Command(launch_bin, launch_params...)
|
||||
// This workaround is required on Windows, otherwise ioq3
|
||||
// will not find game data.
|
||||
if runtime.GOOS == "windows" {
|
||||
dir := filepath.Dir(launch_bin)
|
||||
cmd.Dir = dir
|
||||
}
|
||||
out, err1 := cmd.Output()
|
||||
if err1 != nil {
|
||||
fmt.Println("Launch error: " + err1.Error())
|
||||
|
Reference in New Issue
Block a user