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

Port macOS and Linux release packages to .NET 5 #18955

Merged
merged 8 commits into from Jan 9, 2021

Conversation

pchote
Copy link
Member

@pchote pchote commented Dec 23, 2020

This follows #17989 by switching over the macOS packages, which requires two additional changes to work well:

  1. Assemblies are now installed into the mod.app/Contents/MacOS subdir, using Engine.EngineDir to point to the data in mod.app/Contents/Resources. This brings us in line with the app bundling convention for putting all executable code in MacOS, and more importantly fixes the app icon otherwise being missing.
  2. Use hard links within the disk image to avoid duplicating the otherwise identical runtime files. This reduced the final dmg size from 143MB to 84MB, compared to 60MB for the current mono based image.

I could only find one reference online to anybody using this hard link trick before, so i'm not 100% sure this will be compatible on all systems. It works for me on macOS 11.0.1, but we should get some additional testing on at least macOS 10.13 before we merge this.

Test builds: https://github.com/pchote/OpenRA/releases/tag/devtest-20201223-4

@pchote
Copy link
Member Author

pchote commented Dec 24, 2020

Added a commit to enable trimming, which saves a further 10MB on both macOS and Windows, and another commit to switch the non-compat builds to the ULFO format for faster decompression.

Updated test builds: https://github.com/pchote/OpenRA/releases/tag/devtest-20201223-8

Windows should now be tested too since it is affected by trimming.

@pchote
Copy link
Member Author

pchote commented Dec 24, 2020

N/A confirmed on Discord that the -8 test build works on macOS 10.13.

@pchote pchote changed the title Port macOS release packages to .NET 5 Port macOS and Linux release packages to .NET 5 Dec 28, 2020
@pchote
Copy link
Member Author

pchote commented Dec 28, 2020

Rebased on latest version of #17989 and added some more commits to switch the Linux AppImages to NET 5 and remove the now-obsolete runtime assemblies check. This now just leaves the makefile and related bits that were dropped out of the first PR to complete the full migration.

Updated test builds: https://github.com/pchote/OpenRA/releases/tag/devtest-20201228

I have tested that the AppImages run fine on Ubuntu 14.04 and CentOS 7, so we should not be dropping any distros with this switch.

@pchote
Copy link
Member Author

pchote commented Dec 29, 2020

  • Need to update the "Used By" comments
  • Need to change the mono installation to copy all dlls to compensate for the removed assemblies check.

@pchote
Copy link
Member Author

pchote commented Dec 30, 2020

Updated. I'll wait for #17989 to be merged before tagging another test build.

@pchote
Copy link
Member Author

pchote commented Jan 1, 2021

Rebased.

Updated (and hopefully final) test builds: https://github.com/pchote/OpenRA/releases/tag/devtest-20210101
Packaging logs: https://github.com/pchote/OpenRA/actions/runs/456542700

@Mailaender
Copy link
Member

Mailaender commented Jan 2, 2021

The OpenRA-Dune-2000-devel-x86_64.AppImage immediately crashes in skirmish and after a while also on the shellmap:

Exception of type `System.TypeInitializationException`: The type initializer for 'OpenRA.Mods.Common.Traits.BotModules.Squads.AttackOrFleeFuzzy' threw an exception.
Inner
  Exception of type `System.IO.FileNotFoundException`: Could not load file or assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.

     at OpenRA.Mods.Common.Traits.BotModules.Squads.AttackOrFleeFuzzy..ctor(IEnumerable`1 rulesForNormalOwnHealth, IEnumerable`1 rulesForInjuredOwnHealth, IEnumerable`1 rulesForNeadDeadOwnHealth)
   at OpenRA.Mods.Common.Traits.BotModules.Squads.AttackOrFleeFuzzy..cctor() in /home/runner/work/OpenRA/OpenRA/OpenRA.Mods.Common/Traits/BotModules/Squads/AttackOrFleeFuzzy.cs:line 98
   at OpenRA.Mods.Common.Traits.BotModules.Squads.GroundUnitsIdleState.Tick(Squad owner) in /home/runner/work/OpenRA/OpenRA/OpenRA.Mods.Common/Traits/BotModules/Squads/States/GroundStates.cs:line 54
   at OpenRA.Mods.Common.Traits.SquadManagerBotModule.AssignRolesToIdleUnits(IBot bot) in /home/runner/work/OpenRA/OpenRA/OpenRA.Mods.Common/Traits/BotModules/SquadManagerBotModule.cs:line 235
   at OpenRA.Mods.Common.Traits.SquadManagerBotModule.OpenRA.Mods.Common.Traits.IBotTick.BotTick(IBot bot) in /home/runner/work/OpenRA/OpenRA/OpenRA.Mods.Common/Traits/BotModules/SquadManagerBotModule.cs:line 182
   at OpenRA.Mods.Common.Traits.ModularBot.<OpenRA.Traits.ITick.Tick>b__14_0() in /home/runner/work/OpenRA/OpenRA/OpenRA.Mods.Common/Traits/Player/ModularBot.cs:line 94
   at OpenRA.Sync.<>c__DisplayClass13_0.<RunUnsynced>b__0() in /home/runner/work/OpenRA/OpenRA/OpenRA.Game/Sync.cs:line 166
   at OpenRA.Sync.RunUnsynced[T](Boolean checkSyncHash, World world, Func`1 fn) in /home/runner/work/OpenRA/OpenRA/OpenRA.Game/Sync.cs:line 190
   at OpenRA.Sync.RunUnsynced(Boolean checkSyncHash, World world, Action fn) in /home/runner/work/OpenRA/OpenRA/OpenRA.Game/Sync.cs:line 167
   at OpenRA.Mods.Common.Traits.ModularBot.OpenRA.Traits.ITick.Tick(Actor self) in /home/runner/work/OpenRA/OpenRA/OpenRA.Mods.Common/Traits/Player/ModularBot.cs:line 90
   at OpenRA.TraitDictionary.TraitContainer`1.ApplyToAllTimed(Action`2 action, String text) in /home/runner/work/OpenRA/OpenRA/OpenRA.Game/TraitDictionary.cs:line 307
   at OpenRA.World.Tick() in /home/runner/work/OpenRA/OpenRA/OpenRA.Game/World.cs:line 435
   at OpenRA.Game.InnerLogicTick(OrderManager orderManager) in /home/runner/work/OpenRA/OpenRA/OpenRA.Game/Game.cs:line 646
   at OpenRA.Game.LogicTick() in /home/runner/work/OpenRA/OpenRA/OpenRA.Game/Game.cs:line 661
   at OpenRA.Game.Loop() in /home/runner/work/OpenRA/OpenRA/OpenRA.Game/Game.cs:line 823
   at OpenRA.Game.Run() in /home/runner/work/OpenRA/OpenRA/OpenRA.Game/Game.cs:line 864
   at OpenRA.Game.InitializeAndRun(String[] args) in /home/runner/work/OpenRA/OpenRA/OpenRA.Game/Game.cs:line 274
   at OpenRA.Launcher.Program.Main(String[] args) in /home/runner/work/OpenRA/OpenRA/OpenRA.Launcher/Program.cs:line 30
Platform is Linux
Engine version is devtest-20210101
Runtime: .NET CLR 5.0.1

@pchote
Copy link
Member Author

pchote commented Jan 2, 2021

Copy link
Member

@Mailaender Mailaender left a comment

Choose a reason for hiding this comment

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

Tested on Linux.

@pchote
Copy link
Member Author

pchote commented Jan 9, 2021

Is there anything else I can do here to help get this PR merged?

I wanted to delay the .NET 5 migration into Next + 1 so we could maximize the amount of testing and time to work around any issues on the new toolchain. This time is currently going wasted, until the next PR (which depends on this one) is merged.

Copy link
Member

@abcdefg30 abcdefg30 left a comment

Choose a reason for hiding this comment

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

Portable build worked fine on Windows 10.

@abcdefg30 abcdefg30 merged commit 868736f into OpenRA:bleed Jan 9, 2021
@abcdefg30
Copy link
Member

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.

None yet

4 participants