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

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:

  • Ubuntu 18.04.2
  • Ubuntu 14.04.6 (runs but https queries fail - maybe outdated system TLS support?)
  • CentOS 7
  • MX Linux 18.1 (ref #15311)
  • Linux Mint 19.1 (ref #15450)

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

@Phrohdoh
Copy link
Member

left a comment

Inline comments.

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

This comment has been minimized.

Copy link
@Phrohdoh

Phrohdoh Mar 17, 2019

Member

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?

This comment has been minimized.

Copy link
@pchote

pchote Mar 17, 2019

Author Member

Yes, and this is the intended behaviour.

This comment has been minimized.

Copy link
@Phrohdoh

This comment has been minimized.

Copy link
@pchote

pchote Mar 17, 2019

Author Member

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
pchote added 3 commits Mar 15, 2019
Fix build artifacts leaking between platforms.
This moves the `dependencies` target from `core`
to `default`, so that we aren't forced to run
`linux-dependencies` for non-linux platforms.

@pchote pchote force-pushed the pchote:appimage-package-mono branch from 5e1a70f to 231cc69 Mar 17, 2019

@pchote

This comment has been minimized.

Copy link
Member Author

commented Mar 17, 2019

Updated.

@obrakmann
Copy link
Contributor

left a comment

👍

@Phrohdoh Phrohdoh removed the PR: Needs +2 label Mar 22, 2019

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

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@obrakmann

This comment has been minimized.

Copy link
Contributor

commented Mar 22, 2019

Changelog

@fusion809 fusion809 referenced this pull request Jun 1, 2019

@pchote pchote deleted the pchote:appimage-package-mono branch Aug 26, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.