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

Add support for net 5 for Windows #17989

Merged
merged 1 commit into from Jan 1, 2021
Merged

Conversation

teinarss
Copy link
Contributor

@teinarss teinarss commented Apr 27, 2020

Closes #12988.

@teinarss
Copy link
Contributor Author

Im thiking that we should use dotnet build as default and have using msbuild as opt in.

We can use dotnet build for building core and mono as standard and then have the possibility to use msbuild on those platforms that dont have support for building with core (like different flavors of BSD).

pseudo code for the makefile

if parameter MSBUILD is not set then
    dotnet build TargetFramework=[netcore, netstandard]
else
    msbuild ...

We also need to have a parameter for which TargetFramework we want to build.

Copy link
Member

@pchote pchote left a comment

Choose a reason for hiding this comment

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

Something has regressed on macOS: i'm now seeing this error when trying to run dotnet OpenRA.Game.dll Game.Mod=cnc after compiling either through the commandline or with Rider.

Nevermind, its dotnet OpenRA.dll Game.Mod=cnc. My bad.

packaging/windows/OpenRA.nsi Outdated Show resolved Hide resolved
OpenRA.WindowsLauncher/OpenRA.WindowsLauncher.csproj Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
@RobFog
Copy link

RobFog commented Aug 18, 2020

Rebase needed.

@OpenRA OpenRA deleted a comment from RobFog Aug 18, 2020
@pchote
Copy link
Member

pchote commented Aug 26, 2020

Confirmed that this compiles and runs on OSX 10.9(!) with mono 6.10, so it looks like this now hits the compatibility goal i was hoping for 🙂

@pchote
Copy link
Member

pchote commented Aug 26, 2020

IMO it would be best if we could leave the packaging changes to followup PRs, where we can focus on one platform at a time.

What do you think about keeping mono as the default in this PR, with MONO=false as the opt-in, or keeping core as the default but then adding MONO=true to the packaging scripts?

@teinarss teinarss force-pushed the netstandard21 branch 9 times, most recently from 6b45d65 to 20c40ed Compare August 28, 2020 20:14
@pchote
Copy link
Member

pchote commented Dec 24, 2020

Commenting out FrozenUnderFogUpdatedByGPS reveals a bunch of missing traits from Mods.Common:

Exception of type `OpenRA.YamlException`: ActorInfo("2tnk") failed to initialize because of the following:
Missing:
OpenRA.Mods.Common.Traits.BodyOrientationInfo 
Unresolved:
OpenRA.Mods.Common.Traits.Render.WithFacingSpriteBodyInfo: { OpenRA.Mods.Common.Traits.BodyOrientationInfo, OpenRA.Traits.IFacingInfo }
OpenRA.Mods.Common.Traits.Render.WithParachuteInfo: { OpenRA.Mods.Common.Traits.BodyOrientationInfo }
OpenRA.Mods.Common.Traits.HitShapeInfo: { OpenRA.Mods.Common.Traits.BodyOrientationInfo }
OpenRA.Mods.Common.Traits.AutoTargetInfo: { OpenRA.Mods.Common.Traits.AttackBaseInfo }
OpenRA.Mods.Common.Traits.AutoTargetPriorityInfo: { OpenRA.Mods.Common.Traits.AutoTargetInfo }
OpenRA.Mods.Common.Traits.AutoTargetPriorityInfo: { OpenRA.Mods.Common.Traits.AutoTargetInfo }
OpenRA.Mods.Common.Traits.TurretedInfo: { OpenRA.Mods.Common.Traits.BodyOrientationInfo }
OpenRA.Mods.Common.Traits.ArmamentInfo: { OpenRA.Mods.Common.Traits.AttackBaseInfo }
OpenRA.Mods.Common.Traits.AttackTurretedInfo: { OpenRA.Mods.Common.Traits.TurretedInfo }
OpenRA.Mods.Common.Traits.Render.WithMuzzleOverlayInfo: { OpenRA.Mods.Common.Traits.AttackBaseInfo, OpenRA.Mods.Common.Traits.ArmamentInfo }
OpenRA.Mods.Common.Traits.Render.WithSpriteTurretInfo: { OpenRA.Mods.Common.Traits.TurretedInfo, OpenRA.Mods.Common.Traits.BodyOrientationInfo, OpenRA.Mods.Common.Traits.ArmamentInfo }

@pchote
Copy link
Member

pchote commented Dec 24, 2020

Ok, this is still a problem in TD - it just doesn't crash on the shellmap because we aren't spawning any non-player actors there. It will crash with the same symptoms as soon as you try to start a skirmish.

@pchote
Copy link
Member

pchote commented Dec 24, 2020

It looks like your comment on IRC about loading multiple copies was correct. This seems to work 50309ab, but it would be cleaner if we can actually unload it?

@teinarss
Copy link
Contributor Author

Updated.

@pchote
Copy link
Member

pchote commented Dec 25, 2020

Updated test builds: https://github.com/pchote/OpenRA/releases/tag/devtest-20201225
https://github.com/pchote/OpenRA/actions/runs/443934673

Rider isn't happy with this, ...

This can be fixed by going into Rider's Preferences → Toolset and Build → change "Use MSBuild version" from the mono MSBuild.dll to the dotnet one.

pchote
pchote previously approved these changes Dec 25, 2020
@Mailaender
Copy link
Member

@pchote
Copy link
Member

pchote commented Dec 27, 2020

We ship self contained builds, so do not depend on any runtime prerequisites. The lines you've highlighted can simply be deleted.

@teinarss
Copy link
Contributor Author

Updated.

@Mailaender
Copy link
Member

I can't spot any problems on Linux so 👍🏻

@abcdefg30 abcdefg30 merged commit 5e74e58 into OpenRA:bleed Jan 1, 2021
@abcdefg30
Copy link
Member

Changelog

@RobFog
Copy link

RobFog commented Jan 1, 2021

Should this be moved to the "Next Release" milestone?

@pchote
Copy link
Member

pchote commented Jan 1, 2021

No, this is going to be one of the main features for the release after next.

@RobFog
Copy link

RobFog commented Jan 1, 2021

Oh, okay.

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.

Investigate renaming OpenRA.Game to OpenRA.Engine
6 participants