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:
2016-11-22 04:56:18 +05:00
parent 90f888bdfb
commit 862b336556
2 changed files with 8 additions and 1 deletions

View File

@@ -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())