mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-01 21:33:39 +01:00
Start correct XL binary through branch switcher, add build branch to metadata
Some checks failed
Build Dalamud / Build on Windows (push) Waiting to run
Build Dalamud / Check API Compatibility (push) Blocked by required conditions
Build Dalamud / Deploy dalamud-distrib staging (push) Blocked by required conditions
Rollup changes to next version / check (api14) (push) Failing after 5s
Tag Build / Tag Build (push) Successful in 2s
Some checks failed
Build Dalamud / Build on Windows (push) Waiting to run
Build Dalamud / Check API Compatibility (push) Blocked by required conditions
Build Dalamud / Deploy dalamud-distrib staging (push) Blocked by required conditions
Rollup changes to next version / check (api14) (push) Failing after 5s
Tag Build / Tag Build (push) Successful in 2s
This commit is contained in:
parent
a134c6d064
commit
fea7b3676f
4 changed files with 38 additions and 10 deletions
|
|
@ -1060,7 +1060,8 @@ internal class DalamudInterface : IInternalDisposableService
|
|||
{
|
||||
ImGui.PushFont(InterfaceManager.MonoFont);
|
||||
|
||||
ImGui.BeginMenu(Util.GetScmVersion(), false);
|
||||
ImGui.BeginMenu(Util.GetBranch() ?? "???", false);
|
||||
ImGui.BeginMenu($"{Util.GetScmVersion()}", false);
|
||||
ImGui.BeginMenu(this.FrameCount.ToString("000000"), false);
|
||||
ImGui.BeginMenu(ImGui.GetIO().Framerate.ToString("000"), false);
|
||||
ImGui.BeginMenu($"W:{Util.FormatBytes(GC.GetTotalMemory(false))}", false);
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ using Dalamud.Interface.Colors;
|
|||
using Dalamud.Interface.Utility;
|
||||
using Dalamud.Interface.Windowing;
|
||||
using Dalamud.Networking.Http;
|
||||
using Dalamud.Utility;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Dalamud.Interface.Internal.Windows;
|
||||
|
|
@ -44,13 +46,10 @@ public class BranchSwitcherWindow : Window
|
|||
this.branches = await client.GetFromJsonAsync<Dictionary<string, VersionEntry>>(BranchInfoUrl);
|
||||
Debug.Assert(this.branches != null, "this.branches != null");
|
||||
|
||||
var config = Service<DalamudConfiguration>.Get();
|
||||
this.selectedBranchIndex = this.branches!.Any(x => x.Key == config.DalamudBetaKind) ?
|
||||
this.branches.TakeWhile(x => x.Key != config.DalamudBetaKind).Count()
|
||||
var branch = Util.GetBranch();
|
||||
this.selectedBranchIndex = this.branches!.Any(x => x.Value.Track == branch) ?
|
||||
this.branches.TakeWhile(x => x.Value.Track != branch).Count()
|
||||
: 0;
|
||||
|
||||
if (this.branches.ElementAt(this.selectedBranchIndex).Value.Key != config.DalamudBetaKey)
|
||||
this.selectedBranchIndex = 0;
|
||||
});
|
||||
|
||||
base.OnOpen();
|
||||
|
|
@ -88,13 +87,12 @@ public class BranchSwitcherWindow : Window
|
|||
var config = Service<DalamudConfiguration>.Get();
|
||||
config.DalamudBetaKind = pickedBranch.Key;
|
||||
config.DalamudBetaKey = pickedBranch.Value.Key;
|
||||
config.QueueSave();
|
||||
|
||||
// If we exit immediately, we need to write out the new config now
|
||||
Service<DalamudConfiguration>.Get().ForceSave();
|
||||
config.ForceSave();
|
||||
|
||||
var appData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
|
||||
var xlPath = Path.Combine(appData, "XIVLauncher", "XIVLauncher.exe");
|
||||
var xlPath = Path.Combine(appData, "XIVLauncher", "current", "XIVLauncher.exe");
|
||||
|
||||
if (File.Exists(xlPath))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue