func RustDedicatedPath() string { switch runtime.GOOS { case "windows": return filepath.Join(utils.GetRustDir(), rustDedicatedWin) case "linux": return filepath.Join(utils.GetRustDir(), rustDedicatedLinux) default: return "" } }
func (m *Meld) InstallRust(args *InstallArgs, success *bool) error { m.mu.Lock() defer m.mu.Unlock() if args.SteamPath == "" { args.SteamPath = utils.GetSteamDir() } if args.RustPath == "" { args.RustPath = utils.GetRustDir() } // check for existing steamCmdPath, err := utils.GetSteamCmdPath(args.SteamPath) if err != nil { *success = false return fmt.Errorf("unable to find steam; perhaps try installing; err=%s", err) } if err := utils.InstallRust(steamCmdPath, args.RustPath, true); err != nil { *success = false return err } return nil }
func (m *Meld) InstallOxide(args *InstallArgs, success *bool) error { m.mu.Lock() defer m.mu.Unlock() if args.RustPath == "" { args.RustPath = utils.GetRustDir() } if err := utils.InstallOxideMod(args.RustPath); err != nil { *success = false return fmt.Errorf("error installing oxide: %s", err) } *success = true return nil }