[Add] Hot Reload

This commit is contained in:
2026-02-27 03:16:18 +07:00
parent 5067cb51a1
commit b37579153b
431 changed files with 43054 additions and 1 deletions
@@ -0,0 +1,33 @@
using System.Diagnostics;
using System.IO;
using System.Threading.Tasks;
namespace SingularityGroup.HotReload.Editor.Cli {
class WindowsCliController : ICliController {
Process process;
public string BinaryFileName => "CodePatcherCLI.exe";
public string PlatformName => "win-x64";
public bool CanOpenInBackground => true;
public Task Start(StartArgs args) {
process = Process.Start(new ProcessStartInfo {
FileName = Path.GetFullPath(Path.Combine(args.executableTargetDir, "CodePatcherCLI.exe")),
Arguments = args.cliArguments,
UseShellExecute = !args.createNoWindow,
CreateNoWindow = args.createNoWindow,
});
return Task.CompletedTask;
}
public async Task Stop() {
await RequestHelper.KillServer();
try {
process?.CloseMainWindow();
} catch {
//ignored
}
process = null;
}
}
}