Preserve current state before big refactor

This commit is contained in:
2025-02-05 20:45:49 -08:00
parent 4910ff7770
commit badc6d2375
65 changed files with 2356 additions and 113 deletions

View File

@@ -0,0 +1,41 @@
using System;
using System.IO;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Godot;
namespace Laura.DeployToSteamOS;
public partial class DeployWindow
{
private async Task DeployInit()
{
CurrentStep = DeployStep.Init;
CurrentProgress = StepProgress.Running;
UpdateUI();
await Task.Delay(0);
_gameId = ProjectSettings.GetSetting("application/config/name", "game").AsString();
_gameId = Regex.Replace(_gameId, @"[^a-zA-Z0-9]", string.Empty);
// Add current timestamp to gameid for incremental builds
if (SettingsManager.Instance.Settings.UploadMethod == SettingsFile.UploadMethods.Incremental)
{
_gameId += "_" + DateTimeOffset.Now.ToUnixTimeSeconds();
}
GD.Print($"[DeployToSteamOS] Deploying '{_gameId}' to '{_device.DisplayName} ({_device.Login}@{_device.IPAdress})'");
_localPath = SettingsManager.Instance.Settings.BuildPath;
if (DirAccess.Open(_localPath) == null)
{
GD.PrintErr($"[DeployToSteamOS] Build path '{_localPath}' does not exist.");
UpdateUIToFail();
return;
}
CurrentProgress = StepProgress.Succeeded;
UpdateUI();
}
}