Add standalone win64 release packaging, Forgejo release script, and borderless/focus UX

This commit is contained in:
Meta Vens 2026-12-05 20:14:38 +01:00
commit 385275f130
12 changed files with 698 additions and 84 deletions

42
client/ClientAssets.cs Normal file
View file

@ -0,0 +1,42 @@
using System;
using System.IO;
using Godot;
using RustToDust.Core;
namespace RustToDust.Client;
internal static class ClientAssets
{
private static bool _registered;
internal static void EnsureAssetsRootRegistered()
{
if (_registered)
{
return;
}
_registered = true;
if (OS.HasFeature("template"))
{
string exeAssets = Path.Combine(OS.GetExecutablePath().GetBaseDir(), "assets");
if (Directory.Exists(exeAssets))
{
AssetPathResolver.RegisterAssetsRoot(exeAssets);
return;
}
}
string baseAssets = Path.Combine(AppContext.BaseDirectory, "assets");
if (Directory.Exists(baseAssets))
{
AssetPathResolver.RegisterAssetsRoot(baseAssets);
}
}
internal static string LocateAssetsDirectory()
{
EnsureAssetsRootRegistered();
return AssetPathResolver.LocateAssetsRoot();
}
}