-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some instructions for updating CEF/testing it.
- Loading branch information
Showing
5 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Testing unpublished engines against launcher | ||
|
||
In some rare cases, you may have to test your engine changes against the launcher. The problem you'll run into is that the launcher makes it *rather annoying* to use anything other than official published engine versions. Luckily I recently made this easier! | ||
|
||
Download [SS14.Launcher](https://github.com/space-wizards/SS14.Launcher) from GitHub, compile it, yada yada. You'll notice you have a very funny button when you run it: | ||
|
||
![](../assets/engine-development/launcher-dev-menu.png) | ||
|
||
Tick both checkboxes, then set the text box to the `release/` directory of the Robust you're working out of. This will make the launcher use exclusively local engine builds you've made, regardless of what server you connect to. | ||
|
||
You can then run the packaging scripts in `Tools/` (`package_client_build.py` or `package_webview.py`) to fill the `release/` folder with the engine zip files you need. Every time you change the engine you'd just re-run the script and the launcher would pick it up next time. | ||
|
||
Then you can just connect your launcher to your local server through the wonders of ACZ, and you'll be off! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Updating CEF | ||
|
||
CEF (Chromium Embedded Framework) FUCKING SUCKS. FUCKING HELL. Here's how to update it. | ||
|
||
## Download the latest stable CEF build | ||
|
||
Go [here](https://cef-builds.spotifycdn.com/index.html), download the latest stable build for Windows 64-bit and Linux 64-bit. | ||
|
||
## Update Xilium.CefGlue | ||
|
||
`Xilium.CefGlue` is the C# binding we use for the CEF API. They don't update upstream all that frequently but when they do it's worth merging in their changes. You'll have to accept THEIR changes for conflicts, because we've made plenty of changes that conflict otherwise. | ||
|
||
Update `CefGlue.Interop.Gen/include` with the latest headers from the CEF bundle you downloaded earlier, then re-run `gen-cef3.cmd`. | ||
|
||
If there's been any changes to the CEF API you might need to update the rest of CefGlue to make it compatible etc. Do that. | ||
|
||
## Update Robust.Natives.Cef | ||
|
||
These are the NuGet packages that ship the CEF binaries to regular developers of RT/OpenDream so they don't have to manually download CEF from above. | ||
|
||
Clone [`build-dependencies`](https://github.com/space-wizards/build-dependencies). Extract your downloaded CEF copies (for both platforms) into `natives/cef/` so it looks like this: | ||
|
||
![](../assets/engine-development/cef-update-build-dependencies.png) | ||
|
||
Strip the Linux binaries, you do this by running `strip *.so` in the `Release/` folder of the Linux download. Use WSL if you're on Windows. | ||
|
||
Then update `Packages/Robust.Natives.Cef/Robust.Natives.Cef.nuspec` so the files are correct for the new CEF version. You need the files from `Release/` and `Resources/` in the CEF build. | ||
|
||
Run `dotnet pack ./Packages/Robust.Natives.Cef/Robust.Natives.Cef.csproj` to produce `Packages/Robust.Natives.Cef/bin/Release/Robust.Natives.Cef.<VERSION>.nupkg`. | ||
|
||
## Modify `nuget.config` in your test repo | ||
|
||
Ok so obviously you're gonna be testing stuff yeah? You don't want to upload the above native package to NuGet in case it doesn't work, but how do you test that it *does* work? Well that's easy, use a local NuGet source! | ||
|
||
The repo you're testing against will have a `nuget.config` file next to the solution. It'll look like this (or similar): | ||
|
||
```xml | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<packageSources> | ||
<add key="nuget" value="https://api.nuget.org/v3/index.json" /> | ||
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" /> | ||
</packageSources> | ||
</configuration> | ||
``` | ||
|
||
You can locally make the NuGet package above available by adding the full path to your `Packages/Robust.Natives.Cef/bin/Release/` from earlier as a source: | ||
|
||
```xml | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<packageSources> | ||
<add key="nuget" value="https://api.nuget.org/v3/index.json" /> | ||
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" /> | ||
<add key="cef" value="E:\ss14\build-dependencies\Packages\Robust.Natives.Cef\bin\Release" /> | ||
</packageSources> | ||
</configuration> | ||
``` | ||
|
||
## Update Robust.Client.WebView | ||
|
||
With all the previous steps taken care of, you can now bump the `PackageReference` in `Robust.Client.WebView` to the new version. After building and running, *hopefully* everything will work! | ||
|
||
## TEST EVERYTHING | ||
|
||
CEF has this nasty habit of being a massive fucking dependency that can break in a morbillion ways. TEST THAT YOU DIDN'T BREAK ANYTHING. | ||
|
||
Specifically, test OpenDream on Windows, Linux, and both again through the launcher. You can test the launcher by following [Testing against launcher](./testing-against-launcher.md). Just use `Tools/package_webview.py` to package the zip for it. | ||
|
||
## Upload natives to NuGet | ||
|
||
Upload `Robust.Natives.Cef` to https://www.nuget.org/. There's a big upload button, use it. It'll take a while because the whole package is a couple hundred megabytes (oof) but thankfully there's no limit I know of. | ||
|
||
## Commit everything | ||
|
||
Commit everything to CefGlue, build-dependencies and Robust. Yay! | ||
|
||
## Upload new Robust Module to centcomm | ||
|
||
Idk just ask me this section will probably change in the future. |