44 Commits

Author SHA1 Message Date
PJB3005
1fea48fbf4 Don't disable GPU compositing in CEF
Workaround no longer needed with message pump fixed. I think.
2025-12-28 02:16:23 +01:00
PJB3005
d43c3f2caf Merge remote-tracking branch 'origin/master' into 25-11-01-cef-update 2025-12-27 01:50:23 +01:00
PJB3005
a1dddf6af1 More macOS fixes, introduce RUST code 2025-12-27 01:44:57 +01:00
PJB3005
c94e1742cb Fix warning in WebView 2025-12-17 16:29:39 +01:00
PJB3005
27fd737e6a Fix WebView build 2025-12-17 16:29:33 +01:00
haiwwkes
cfefd760e2 fix webview resize (#6340) 2025-12-15 19:37:28 +01:00
haiwwkes
497ca865dc Skip redundant texture uploads in WebView when content unchanged (#6338)
Add dirty flag to WebView to skip unnecessary texture uploads.
2025-12-14 20:01:30 +01:00
PJB3005
602d7833a1 Initial macOS WebView support
This is a gigantic kerfuffle because Chromium expects a very specific directory & app bundle layout. Have to change a bunch of resource loading code to account for content development being launched from an app bundle, and also had to make automatic MSBuild tooling & a python script to generate such an app bundle
2025-11-09 00:06:16 +01:00
gus
2d3522e752 Allow multiple clients running WebView on a singular machine. (#5947)
* Multiple CEF instances on a single machine

* remove unused

* meh implementation

* cefextension

* me when partials, race conditions and extractiion of methods exists

* Change remote debugging handling

It now defaults to 9222 again. This doesn't seem to cause any issues when launching 3 clients. The debug port can be reconfigured via CVar if desired.

Also disabled debugging by default outside dev builds.

* Lower MaxAttempts to 15

100 was way too much and gave me anxiety idk.

* Fix non-TOOLS default of remote debug port

* Rewrite locking implementation.

It is much smaller, less complicated and probably more robust too. Should be fully atomic (the previous one wasn't).

* Undo unnecessary style changes

---------

Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
2025-09-16 02:19:59 +02:00
PJB3005
7654d38612 Move CEF cache out of data directory
Don't want content messing with this...
2025-09-14 14:49:14 +02:00
PJB3005
cdcc255123 Make Robust.Client.WebView.Cef.Program internal. 2025-09-14 14:49:14 +02:00
wixoa
261bfaeeb8 Add AlwaysActive to WebViewControl (#6047) 2025-06-25 21:50:07 +02:00
ike709
09c6a816e0 Bump cefglue (#5585)
* Bump cefglue

* another bump

* Update build-test.yml

* Update to latest CEF natives and fix code to be compatible.

* Switch CEF CreateBrowserWindow to Alloy style

you will NOT open Chrome

* Update cefglue, again

---------

Co-authored-by: ike709 <ike709@github.com>
Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
2025-01-08 02:32:24 +01:00
PJB3005
7810cd0c2e Disable CETCompat in Robust.Client.WebView
Guess what doesn't work with CEF (not that it works in the first place for us)
2025-01-06 03:15:36 +01:00
Pieter-Jan Briers
87a5745519 SDL3 (#5583)
* Start converting SDL2 backend to SDL3.

Game starts, but a lot of stuff is broken. Oh well.

* Fix text input

SDL3 changed the API somewhat, for the better. Changes all over UI/Clyde/SDL3 layer.

* Fix mouse buttons being broken

* Remove records from SDL3 WSI

The fact that this shaved 2-3% off Robust.Client.dll is mindboggling. Records are so bad.

* Set Windows/X11 native window properties

* Fix window resize events getting wrong size

oops

* Remove "using static" from SDL3 WSI

Seriously seems to hurt IDE performance, oh well.

* Apparently I never called CheckThreadApartment().

* Add STAThreadAttribute to sandbox

Necessary for content start

* Set window title on creation properly.

* Load window icons

* Fix GLFW NoTitleBar style handling

Yeah this PR is supposed to be about SDL3, so what?

* Implement more window creation settings in SDL3

Mostly the ones that need a lot of platform-specific stuff to work.

* Make fullscreen work properly in SDL3.

* File dialogs with SDL3

Removes need for swnfd.

* Fix some TODOs

* Fix WebView build
2025-01-03 18:42:57 +01:00
Pieter-Jan Briers
0094040d68 Dependency update / fixes / skrungle bungle (#4825)
* Move to Central Package Management.

Allows us to store NuGet package versions all in one place. Yay!

* Update NuGet packages and fix code for changes.

Notable:

Changes to ILVerify.
Npgsql doesn't need hacks for inet anymore, now we need hacks to make the old code work with this new reality.
NUnit's analyzers are already complaining and I didn't even update it to 4.x yet.
TerraFX changed to GetLastSystemError so error handling had to be changed.
Buncha APIs have more NRT annotations.

* Remove dotnet-eng NuGet package source.

I genuinely don't know what this was for, and Central Package Management starts throwing warnings about it, so YEET.

* Fix double loading of assemblies due to ALC shenanigans.

Due to how the "sideloading" code for the ModLoader was set up, it would first try to load Microsoft.Extensions.Primitives from next to the content dll. But we already have that library in Robust!

Chaos ensues.

We now try to forcibly prioritize loading from the default ALC first to avoid this.

* Remove Robust.Physics project.

Never used.

* Remove erroneous NVorbis reference.

Should be VorbisPizza and otherwise wasn't used.

* Sandbox fixes

* Remove unused unit test package references.

Castle.Core and NUnit.ConsoleRunner.

* Update NUnit to 4.0.1

This requires replacing all the old assertion methods because they removed them 🥲

* Mute CA1416 (platform check) errors

TerraFX started annotating APIs with this and I can't be arsed to entertain this analyzer so out it goes.

* Fine ya cranky, no more CPM for Robust.Client.Injectors

* Changelog

* Oh so that's what dotnet-eng was used for. Yeah ok that makes sense.

* Central package management for remaining 2 robust projects

* Ok that was a bad idea let's just use NUnit 3 on the analyzer test project

* Oh right forgot to remove this one

* Update to a newer version of RemoteExecutor

* Disable RemoteExecutor test

https://github.com/dotnet/arcade/issues/8483 Yeah this package is not well maintained and clearly we can't rely on it.

* Fix immutable list serialization
2024-01-12 22:59:52 +01:00
Pieter-Jan Briers
61385b7c21 Fix WebView processes hanging around on unclean shutdown.
The processes now voluntarily exit themselves if the parent process exits.
2023-12-27 15:33:31 +01:00
Pieter-Jan Briers
2d3379d7f4 Bring CEF up to snuff (#4760) 2023-12-25 00:28:51 +01:00
Amy
229a45bea2 Enables debugging and error handling on Linux with CEF enabled (#4181)
Co-authored-by: amylizzle <amylizzle@users.noreply.github.com>
2023-07-12 08:42:30 +02:00
metalgearsloth
7d1ad527d9 Replace Robust Vector2 with System.Numerics (#4092) 2023-07-08 14:08:26 +10:00
metalgearsloth
8a6cadd38f Revert "Revert "Replace ResourcePath with ResPath (#3926)" (#3949)" (#3950) 2023-04-20 20:15:57 +10:00
metalgearsloth
d646403068 Revert "Replace ResourcePath with ResPath (#3926)" (#3949) 2023-04-20 11:43:51 +10:00
Ygg01
d6a3e1e286 Replace ResourcePath with ResPath (#3926) 2023-04-19 23:37:46 +10:00
Pieter-Jan Briers
23fd4e1843 Refactor MSBuild spaghetti, new configurations. (#3807) 2023-03-06 11:12:08 -08:00
Pieter-Jan Briers
d6cbdd221c WebView fixes and improvements.
Re-organize initialization so that User-Agent CVar actually works.

Add web.headless CVar to not load CEF even on graphical client.

Clean up init logic to not rely on static IoC, and clean up loggers used too.
2023-02-24 00:29:31 +01:00
Pieter-Jan Briers
59a8a98703 Basic fixes for WebView in 2023.
Launcher works again with this.
2023-02-24 00:05:31 +01:00
ike709
4c2ea93624 Adds a WCvar to override the CEF user-agent (#3676) 2023-01-12 13:33:44 +11:00
Pieter-Jan Briers
de486207b3 .NET 7 (#3582) 2022-12-17 14:15:58 +01:00
Amy
fac1b2c469 Fix bad reference (#3484)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2022-11-16 20:15:15 +01:00
Pieter-Jan Briers
9591d16aed Implement res:// protocol for WebView, MIME type handling. 2022-06-10 17:09:46 +02:00
Pieter-Jan Briers
05bb361eb2 CEF cookie fixes (#2934)
* 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.
2022-06-10 14:30:57 +02:00
Pieter-Jan Briers
ca59cff07f WiP launcher CEF loading. (#2376) 2021-12-28 17:37:54 +01:00
Pieter-Jan Briers
2f76908efb Remove PlatformTarget from WebView project.
Fixes a compiler warning.
2021-11-29 08:35:39 +01:00
Pieter-Jan Briers
25d6bd908b Remove BGRA32 uploads from Clyde.
BGRA uploads are not supported on GLES. Use a shader to swizzle WebViewControl contents instead.
2021-11-11 18:05:04 +01:00
Pieter-Jan Briers
5be3ced05a UI scaling for WebViewControl. 2021-11-10 11:57:58 +01:00
ike709
b8fbe32c27 Bump Robust.Client.WebView TargetFramework to .NET 6 (#2214) 2021-11-09 20:17:37 +01:00
Pieter-Jan Briers
6e84821233 Package CEF as NuGet package, does not need to be manually downloaded anymore. 2021-11-05 14:50:47 +01:00
Pieter-Jan Briers
dee8a87acd Use headless WebViewManager on headless clients. 2021-11-03 15:26:52 +01:00
Pieter-Jan Briers
d4a7e8f3e0 Move CEF RequestResult to correct folder. 2021-11-03 15:14:46 +01:00
Pieter-Jan Briers
dae6424667 Allow swapping out internal WebViewManager implementation.
Everything moved to interfaces.
2021-11-03 15:12:49 +01:00
Pieter-Jan Briers
3770149cfc Update CefGlue 2021-11-03 15:03:25 +01:00
Pieter-Jan Briers
97c70124a5 [CEF] properly close streams when loading from res:// and such. 2021-11-02 01:53:38 +01:00
Pieter-Jan Briers
cdcc5239ab Rename WebView control to WebViewControl to avoid namespace name clash. 2021-11-01 21:06:30 +01:00
Pieter-Jan Briers
ba2f464249 Restructure CEF stuff in preparation for launcher packaging.
Robust.Client.CEF Renamed to Robust.Client.WebView since CEF should really be an implementation detail.
Content is no longer responsible for initializing and managing the module, this is done automatically by the engine.
WebView is initialized by declaring it in a manifest.yml file in the game resources. In the future the launcher will read this same file to manage WebView module versions.
CefManager has been made private and the content-visible API is now IWebViewManager.
2021-11-01 21:03:51 +01:00