diff --git a/doc/installation/windows/make-dist.sh b/doc/installation/windows/make-dist.sh index b0ca2d6..a97d653 100644 --- a/doc/installation/windows/make-dist.sh +++ b/doc/installation/windows/make-dist.sh @@ -36,7 +36,7 @@ check_msys() { # Check if we have neccessary MSYS packages installed. check_msys_packages() { echo "* Installing neccessary MSYS2 packages..." - pacman -S ${MINGW_PACKAGE_PREFIX}-tools-git ${MINGW_PACKAGE_PREFIX}-gtk2 ${MINGW_PACKAGE_PREFIX}-pkg-config ${MINGW_PACKAGE_PREFIX}-gtk-engines ${MINGW_PACKAGE_PREFIX}-gtk-engine-murrine --noconfirm --needed + pacman -S ${MINGW_PACKAGE_PREFIX}-tools-git ${MINGW_PACKAGE_PREFIX}-gtk2 ${MINGW_PACKAGE_PREFIX}-pkg-config ${MINGW_PACKAGE_PREFIX}-gtk-engines ${MINGW_PACKAGE_PREFIX}-gtk-engine-murrine ${MINGW_PACKAGE_PREFIX}-gcc --noconfirm --needed } # Build URTrator diff --git a/launcher/launcher_object.go b/launcher/launcher_object.go index 2806abe..94f5ab4 100644 --- a/launcher/launcher_object.go +++ b/launcher/launcher_object.go @@ -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())