Skip to content

Conversation

@WinterPhoenix
Copy link
Contributor

@WinterPhoenix WinterPhoenix commented Jul 27, 2025

This is a cleanly rebased version of #3

It is split up into a mere 10 commits vs the original fork's 5 year history across 110+ commits.

It provides a clean, easy path to follow from the CEF 80 (what's public here), to CEF 86 (what's shipped with GMod), to CEF 137 (what's currently shipped with @solsticegamestudios' GModPatchTool).

Changes Made (chronological order)

  • Update to CEF 86.0.24+g85e79d4+chromium-86.0.4240.198 (version shipped with GMod; we update to CEF 137 later in the commits)
  • Update .gitignore
  • Sync build system with SGS gmod-html fork
    • Clean up CMake files
    • Update to C++17 / CMake 3.19 / VS2022
    • Generate debug symbols
    • Move chromium_process to top-level
  • Add gmod_launcher
    • Needed for linking newer CEF versions
    • Fixes Linux namespace detection in containered Steam
    • Fixes macOS "10.16" compat version detection in macOS 11 Big Sur or later
  • Add gmod_launcher stuff to chromium_process on Windows, since they're a combined process there
  • Add gmod_32bit_redirector for non-x86-64 branches on Windows
  • Update to CEF 137.0.19+g8a1c4ce+chromium-137.0.7151.121
  • chromium_process: Set stack reserve on Windows to 1.5MiB
    • Same as Facepunch's shipped builds, fixes stack overflow crashes on 32-bit
  • Reduce log severity to DEFAULT
  • Fix Linux builds
  • Fix Proton
  • Fix sandboxing
  • Fix multirun
  • Add chromium.log rotation
  • Enable (partial) GPU acceleration
  • Disable Hardware Media Keys
  • Remove old HTMLImports blink feature
  • Remove old Adobe Flash enablement
  • Optimize OnPaint with blitting
  • Add OnAcceleratedPaint scaffolding
  • Enable WebGL
  • Force/convert to LF line endings (.gitattributes)
  • Convert to consistent tab indentation
  • Trim trailing whitespace
  • Add missing end-of-file newlines
  • Fix "clicekd" typo (aka the incredibly insightful and useful PR Fix typo #4)
  • Add .editorconfig
  • Cleanup JSValue to fix macOS builds
  • Remove extra scream of developer agony
  • Re-enable Site Isolation (some websites don't work without it; BREAKING CHANGE for GMod!)
  • Add commented code + note about how to enable remote_debugging_port
  • Fix Example Host

Differs slightly from #3

In the rebase branch (this PR) we don't:

  • Strip/dump symbols automatically (or include the symbol dumping instructions in the README)
  • Disable RelatedWebsiteSets (aka FirstPartySets)
  • Disable disable-devtool
  • Remove the VPC scripts

And again, special thanks to everyone who's helped contribute code to the SGS fork of gmod-html over the last 5 years:

Please merge. We spent a considerable amount of time cleaning it up to make it as easy as possible for Facepunch.

WinterPhoenix and others added 10 commits July 25, 2025 17:43
…ped with GMod)

- Update .gitignore

Co-authored-by: sohpeach <sohpeach@users.noreply.github.com>
Co-authored-by: JohnPeel <john@dgby.org>
Co-authored-by: AkikoKumagara <sophie-bear@solsticegamestudios.com>
Co-authored-by: Davilarek <davilareko@gmail.com>
Co-authored-by: snowkat <snow@datagirl.xyz>
- Clean up CMake files
- Update to C++17 / CMake 3.19 / VS2022
- Generate debug symbols
- Move chromium_process to top-level

Co-authored-by: sohpeach <sohpeach@users.noreply.github.com>
Co-authored-by: JohnPeel <john@dgby.org>
Co-authored-by: AkikoKumagara <sophie-bear@solsticegamestudios.com>
Co-authored-by: Davilarek <davilareko@gmail.com>
Co-authored-by: snowkat <snow@datagirl.xyz>
…nux namespace detection in containered Steam, and fixing macOS "10.16" compat version detection)

- Add gmod_launcher stuff to chromium_process on Windows, since they're a combined process there
- Add gmod_32bit_redirector for non-x86-64 branches on Windows

Co-authored-by: sohpeach <sohpeach@users.noreply.github.com>
Co-authored-by: JohnPeel <john@dgby.org>
Co-authored-by: AkikoKumagara <sophie-bear@solsticegamestudios.com>
Co-authored-by: Davilarek <davilareko@gmail.com>
Co-authored-by: snowkat <snow@datagirl.xyz>
…ssible changes)

- chromium_process: Set stack reserve on Windows to 1.5MiB (same as Facepunch's builds, fixes stack overflow crashes on 32-bit)
- Reduce log severity to DEFAULT

Co-authored-by: sohpeach <sohpeach@users.noreply.github.com>
Co-authored-by: JohnPeel <john@dgby.org>
Co-authored-by: AkikoKumagara <sophie-bear@solsticegamestudios.com>
Co-authored-by: Davilarek <davilareko@gmail.com>
Co-authored-by: snowkat <snow@datagirl.xyz>
- Fix Proton
- Fix sandboxing
- Fix multirun
- Add chromium.log rotation

Co-authored-by: sohpeach <sohpeach@users.noreply.github.com>
Co-authored-by: JohnPeel <john@dgby.org>
Co-authored-by: AkikoKumagara <sophie-bear@solsticegamestudios.com>
Co-authored-by: Davilarek <davilareko@gmail.com>
Co-authored-by: snowkat <snow@datagirl.xyz>
- Disable Hardware Media Keys
- Remove old HTMLImports blink feature
- Remove old Adobe Flash enablement
- Optimize OnPaint with blitting
- Add OnAcceleratedPaint scaffolding
- Enable WebGL

Co-authored-by: sohpeach <sohpeach@users.noreply.github.com>
Co-authored-by: JohnPeel <john@dgby.org>
Co-authored-by: AkikoKumagara <sophie-bear@solsticegamestudios.com>
Co-authored-by: Davilarek <davilareko@gmail.com>
Co-authored-by: snowkat <snow@datagirl.xyz>
- Convert to consistent tab indentation
- Trim trailing whitespace
- Add missing end-of-file newlines
- Fix "clicekd" typo
- Add .editorconfig

Co-authored-by: sohpeach <sohpeach@users.noreply.github.com>
Co-authored-by: JohnPeel <john@dgby.org>
Co-authored-by: AkikoKumagara <sophie-bear@solsticegamestudios.com>
Co-authored-by: Davilarek <davilareko@gmail.com>
Co-authored-by: snowkat <snow@datagirl.xyz>
- Remove extra scream of developer agony

Co-authored-by: sohpeach <sohpeach@users.noreply.github.com>
Co-authored-by: JohnPeel <john@dgby.org>
Co-authored-by: AkikoKumagara <sophie-bear@solsticegamestudios.com>
Co-authored-by: Davilarek <davilareko@gmail.com>
Co-authored-by: snowkat <snow@datagirl.xyz>
…KING CHANGE for GMod!)

- Add commented code + note about how to enable remote_debugging_port

Co-authored-by: sohpeach <sohpeach@users.noreply.github.com>
Co-authored-by: JohnPeel <john@dgby.org>
Co-authored-by: AkikoKumagara <sophie-bear@solsticegamestudios.com>
Co-authored-by: Davilarek <davilareko@gmail.com>
Co-authored-by: snowkat <snow@datagirl.xyz>
Co-authored-by: sohpeach <sohpeach@users.noreply.github.com>
Co-authored-by: JohnPeel <john@dgby.org>
Co-authored-by: AkikoKumagara <sophie-bear@solsticegamestudios.com>
Co-authored-by: Davilarek <davilareko@gmail.com>
Co-authored-by: snowkat <snow@datagirl.xyz>
@WinterPhoenix WinterPhoenix force-pushed the rebase branch 2 times, most recently from 114a6f0 to ee69c32 Compare July 27, 2025 08:27
@DarthTealc
Copy link
Contributor

DarthTealc commented Jul 28, 2025

This is fantastic work and would be great to get it added to x86-64, followed by Main on Windows when Rubat's happy with it, followed by main on Mac and Linux when 64bit in general is ready.

Going from CEF 86 to CEF 137 gives some pretty big performance improvements. I did a benchmark with https://browserbench.org/JetStream, on Gmod's main menu so no gameplay is running. CEF 86 gave a total result of 223.361, while CEF 137 gave 402.381 (higher is better), which is an 80% improvement. Worth nothing that every single benchmark component improved in CEF 137. Ranging from a tiny 5% improvement to a massive 607% improvement.

@Grocel
Copy link

Grocel commented Aug 27, 2025

Looks like @robotboy655 is not interested. 🥀
Maybe he was never interested at all.

He said the size of this PR makes it hard to review and pull.

grafik

Source: Discord Chat, 2025-08-27

@smokingplaya
Copy link

Looks like @robotboy655 is not interested. 🥀 Maybe he was never interested at all.

He said the size of this PR makes it hard to review and pull.

grafik Source: [Discord Chat, 2025-08-27](https://discord.com/channels/565105920414318602/589120351238225940/1410345259216535684)

"its not going to make anything better for you" 🥀

@AkikoKumagara
Copy link
Contributor

Makes things better for me 🤷‍♀️ otherwise why would we bother putting in the effort to continue supporting it?

@Grocel
Copy link

Grocel commented Aug 27, 2025

grafik

This looks like something.

Not sure about the "backend changes", though. Might be a misunderstanding.
Edit: Apparently these backend changes are mainly about build infrastructure and deployment.

@smokingplaya
Copy link

grafik [This looks like something.](https://discord.com/channels/565105920414318602/589120351238225940/1410393766011080764)

Not sure about the "backend changes", though. Might be a misunderstanding. Edit: Apparently these backend changes are mainly about build infrastructure and deployment.

c++ issue lol

@WinterPhoenix
Copy link
Contributor Author

WinterPhoenix commented Aug 28, 2025

Source: Garry's Mod Discord Message

image

@DarthTealc
Copy link
Contributor

Rubat has indicated that CEF updating will be done because Linux requires it to even run the game. Based on that, I assume this PR will happen, either directly or indirectly. I don't think he realises this PR is most of the things he'll need to do to get Linux to run. Any additional changes in the PR are cleanup or part of the 86-137 upgrade process.

I also don't think Rubat is aware "all 6000 lines" (+3,944 −3,130) includes 3,176 lines of line-ending standardisation, whitespace, blank line fixing, all contained in d61a94c - In reality the PR is less than 1000 lines.

And I don't think he realises each commit in this PR is a single self-contained step that can be checked and tested sequentially, in conjunction with looking at WinterPhoenix's "Changes Made (chronological order)" list to see what/why. It's not like many PRs where each commit is just whatever the developer was working on first. It's been put together in retrospect with knowledge of the end result, to "provides a clean, easy path to follow from the CEF 80 (what's public here), to CEF 86 (what's shipped with GMod), to CEF 137", so that there's no redundant or pointless commits.

If there's additional stuff or additional info that SGS can do to help Rubat get this merged then I'm sure they'll help, as WinterPhoenix has repeatedly expressed a willingness to assist with this. Having 5 years of work ignored and then given a "I didn't actually read the PR" (or didn't understand/realise what the PR was doing) is understandably going to be infuriating and insulting to WinterPhoenix and the SGS developers. I'm hoping Rubat is willing to actually ask questions or state what specific things are wrong so that they can make it suitable for what Facepunch needs.

@robotboy655
Copy link
Contributor

I would appreciate if you'd split these commits into actual different PRs. Some of these are a lot easier to merge than others.

Maybe you could start with the line ending stuff if that stuff bothers you so much (or I can do it for you as a commit), so other stuff can be easier to review and work with.

@WinterPhoenix
Copy link
Contributor Author

The standardized whitespace/line-endings/.editorconfig/etc fix two issues.

Firstly, it fixes issues where mixed whitespace has caused compile errors, such as when there's missing brackets for if-then statements.

Secondly, over the last few years, we've had to deal with text getting converted between CRLF/LF, editors changing spaces to tabs and vice-versa, the classic issue with text files not ending in an extra line with Git, etc.

These two things combined have continually eaten into developer time, so we felt it necessary to address it in this PR to hopefully prevent more developers, including yourself, from wasting time on these avoidable situations.


We can break this PR into pieces if you prefer that. Give us some time if that's your preference.

@WinterPhoenix
Copy link
Contributor Author

Closing in favor of the progressive series of PRs, beginning with #7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants