mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
* Trying to get res:// and usr:// cookies to wrok * Update CefGlue * Bump CEF * Seal types in WebView Fixes warnings * Move most of client cleanup to game thread. This used to run in the windowing thread which broke CEF shutdown, most notably cookie saving. * "flushcookies" command for CEF. * Remove unecessary res:// code. * Fix tests * More request handler fixes. * Good thing I don't have to care about commit quality in PRs like this.
34 lines
1.0 KiB
C#
34 lines
1.0 KiB
C#
using System;
|
|
using Xilium.CefGlue;
|
|
|
|
namespace Robust.Client.WebView.Cef
|
|
{
|
|
public static class Program
|
|
{
|
|
// This was supposed to be the main entry for the subprocess program... It doesn't work.
|
|
public static int Main(string[] args)
|
|
{
|
|
// This is a workaround for this to work on UNIX.
|
|
var argv = args;
|
|
if (CefRuntime.Platform != CefRuntimePlatform.Windows)
|
|
{
|
|
argv = new string[args.Length + 1];
|
|
Array.Copy(args, 0, argv, 1, args.Length);
|
|
argv[0] = "-";
|
|
}
|
|
|
|
var mainArgs = new CefMainArgs(argv);
|
|
|
|
// This will block executing until the subprocess is shut down.
|
|
var code = CefRuntime.ExecuteProcess(mainArgs, new RobustCefApp(), IntPtr.Zero);
|
|
|
|
if (code != 0)
|
|
{
|
|
System.Console.WriteLine($"CEF Subprocess exited unsuccessfully with exit code {code}! Arguments: {string.Join(' ', argv)}");
|
|
}
|
|
|
|
return code;
|
|
}
|
|
}
|
|
}
|