New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ship a minimal mono 5.10 runtime in the AppImage packages. #16316
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inline comments.
OpenRA.Mods.Common/UtilityCommands/CheckRuntimeAssembliesCommand.cs
Outdated
Show resolved
Hide resolved
foreach (var a in AppDomain.CurrentDomain.GetAssemblies()) | ||
{ | ||
var assemblyName = Path.GetFileName(a.Location); | ||
if (!whitelist.Contains(assemblyName)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this command is invoked without a whitelist arg isn't it always going to flag the OpenRA.Platforms.Default.dll
which we are loading by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, and this is the intended behaviour.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The purpose of the command is to generate errors for any assemblies used by the game which hasn't been explicitly specified by the caller (in this case, the CI) as being accounted for. If the caller isn't accounting for the platform DLL then the game won't be able to run, and so the error is correct.
This moves the `dependencies` target from `core` to `default`, so that we aren't forced to run `linux-dependencies` for non-linux platforms.
5e1a70f
to
231cc69
Compare
Updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This PR makes our Linux packages properly stand-alone by shipping a minimal mono runtime inside the AppImages.
Fixes #15965.
This is a significant win, even if we ignore the AppImage philosophy, because it removes the resriction of having to support mono 4.2 and 4.6. These aren't going away any time soon, and hold us back from the modern .NET ecosystem which requires mono >= 5.4 (#15954).
The first commit adds a new check that will fail if the runtime dependencies change. We only ship the parts of the core runtime that we actually use, so we may accidentally introduce a new dependency in the future that works fine when compiled and run from source, but crashes when players try to run the packaged builds.
The second commit adjusts the AppImage packaging to pull in the changes from OpenRA/AppImageSupport@b21c85b and OpenRA/AppImageSupport@bbfb0f9. These use the runtime files provided by Microsoft for the
mkbundle
cross-compiler toolchain - we currently target Debian 7 as our glibc baseline, so 5.10 is the latest version we can use.The third commit fixes a facepalm I discovered while working on this PR, making sure that each platform's build starts from a clean slate and fixing a build failure when the host doesn't have lua installed.
Test packages are available from https://github.com/pchote/OpenRA/releases/tag/pkgtest-20190316.
I have already tested under: