Skip to content
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

Merged
merged 3 commits into from Mar 22, 2019

Conversation

pchote
Copy link
Member

@pchote pchote commented Mar 16, 2019

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:

@pchote pchote added this to the Next Release milestone Mar 16, 2019
Copy link
Member

@phrohdoh phrohdoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inline comments.

foreach (var a in AppDomain.CurrentDomain.GetAssemblies())
{
var assemblyName = Path.GetFileName(a.Location);
if (!whitelist.Contains(assemblyName))
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Member Author

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.

packaging/linux/AppRun.in Outdated Show resolved Hide resolved
This moves the `dependencies` target from `core`
to `default`, so that we aren't forced to run
`linux-dependencies` for non-linux platforms.
@pchote
Copy link
Member Author

pchote commented Mar 17, 2019

Updated.

Copy link
Contributor

@obrakmann obrakmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@obrakmann obrakmann merged commit 817db8d into OpenRA:bleed Mar 22, 2019
@obrakmann
Copy link
Contributor

Changelog

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

Successfully merging this pull request may close these issues.

Bundle Mono inside AppImage
3 participants