mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-27 07:58:45 -07:00
launcher: Rec-Room-styled UI; PowerShell-free patcher; Launch button
UI redesign: - Warm coral + teal palette over deep purple-navy (closer to Rec Room's marketing aesthetic). New wordmark gradient (coral -> pink -> teal). - Chunky 18px rounded cards on the first-run wizard with per-mode accent tinting (coral for host, teal for join) and clear CTAs. - Form fields wrapped in elevated panels with sectional titles + pill status chips in the header (HOST MODE / JOIN MODE / SETTINGS). - Drop-shadow effects on primary buttons + cards for depth. Patcher rewrite: - ClientPatcher.cs no longer shells out to PowerShell; the launcher unzips MelonLoader, copies the DorkNet plugin DLL, and renders the user-data config template — all in C# in-process. - Patcher zip now driven by a manifest.json at root (schema v1). Per-version branches publish: manifest.json + MelonLoader.zip + DorkNet.ClientMod.dll + config template. - RELEASES.md updated with the new MelonLoader manifest contract and the placeholder substitution rules. Rec Room launch path: - New Backend/RecRoomLauncher.cs runs Recroom_Release.exe directly from the picked install folder's parent dir (no Steam). - 'Launch Rec Room' button appears after a successful patch in both host + join modes.
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
|
||||
namespace DorkNet.Launcher.Backend;
|
||||
|
||||
/// <summary>Launches the user's already-patched Rec Room install
|
||||
/// directly via <c>Recroom_Release.exe</c>. Never goes through Steam —
|
||||
/// DorkNet users may not own the game on Steam.</summary>
|
||||
public static class RecRoomLauncher
|
||||
{
|
||||
/// <summary>The picked install path is the <c>Recroom_Release_Data</c>
|
||||
/// folder; the executable lives at <c><parent>\Recroom_Release.exe</c>.
|
||||
/// Returns true if Process.Start succeeded.</summary>
|
||||
public static bool TryLaunch(string recRoomDataPath, out string error)
|
||||
{
|
||||
error = "";
|
||||
if (string.IsNullOrEmpty(recRoomDataPath))
|
||||
{
|
||||
error = "No Rec Room install picked.";
|
||||
return false;
|
||||
}
|
||||
var parent = Path.GetDirectoryName(recRoomDataPath.TrimEnd(Path.DirectorySeparatorChar));
|
||||
if (string.IsNullOrEmpty(parent))
|
||||
{
|
||||
error = $"Couldn't resolve the parent directory of '{recRoomDataPath}'.";
|
||||
return false;
|
||||
}
|
||||
var exe = Path.Combine(parent, "Recroom_Release.exe");
|
||||
if (!File.Exists(exe))
|
||||
{
|
||||
error = $"Recroom_Release.exe not found at '{exe}'. " +
|
||||
"Pick the *_Data folder that sits next to it.";
|
||||
return false;
|
||||
}
|
||||
try
|
||||
{
|
||||
Process.Start(new ProcessStartInfo
|
||||
{
|
||||
FileName = exe,
|
||||
WorkingDirectory = parent,
|
||||
UseShellExecute = true,
|
||||
});
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
error = ex.Message;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user