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 osx-arm64 support #3400

Closed
wants to merge 3 commits into from
Closed

Conversation

drcatdoctor
Copy link

@drcatdoctor drcatdoctor commented Oct 29, 2022

Adds osx-arm64 support. Still in testing stages and this is still very early. Draft for feedback.

In local tests this seems to all work, and I played a full game on Lizard and it worked almost perfectly the entire time and was pegged at 120 FPS...

but some part of the map had a client-side entity that caused my screen to stop updating entirely. Though the game was still responsive, so I could walk away from the bugged area and everything would resume, it is pretty brutal. Traceback is below under Known Issues. I don't know more than that yet.

Still, things seem promising.

The number one open question of course is: is this a good idea at all, and now that I have it somewhat working, I can see arguments for both sides.

Changes

  • bump native dependencies for Robust.Client
  • Robust.Server osx-arm64 now requires Zstd.
  • explicitly set the library name of fluidsynth to have a 2 in it to be compatible with the dylib that is packed in the build deps, and to stop problems like MIDI broken again #3376
  • update package_client_build.py to add mac-apple-silicon

Upstream requirements

Known issues

[ERRO] runtime: Caught exception in "GameLoop Render"
System.Collections.Generic.KeyNotFoundException: Entity c2754 does not have a component of type Robust.Shared.GameObjects.TransformComponent
   at Robust.Client.Graphics.Clyde.Clyde.DrawLightsAndFov(Viewport viewport, Box2Rotated worldBounds, Box2 worldAABB, IEye eye) in .../Robust.Client/Graphics/Clyde/Clyde.LightRendering.cs:line 436
   at Robust.Client.Graphics.Clyde.Clyde.<>c__DisplayClass204_0.<RenderViewport>b__0() in .../Robust.Client/Graphics/Clyde/Clyde.HLR.cs:line 574
   at Robust.Client.Graphics.Clyde.Clyde.RenderInRenderTarget(RenderTargetBase rt, Action a, Nullable`1 clearColor) in .../Robust.Client/Graphics/Clyde/Clyde.HLR.cs:line 446
   at Robust.Client.Graphics.Clyde.Clyde.RenderViewport(Viewport viewport) in .../Robust.Client/Graphics/Clyde/Clyde.HLR.cs:line 575

Questions

  • Not actually sure if $(ProcessArchitecture) is doing what I want? It seems to work locally. Could just remove the conditional, it's not hurting anybody
  • Seems like a really ugly place to set the fluidsynth library name but I can't figure out where would be better, suggestions welcome
  • Does package_client_build.py do anything? Am I doing it right? I can't really tell.

@PJB3005 PJB3005 changed the title Add arm64 support Add osx-arm64 support Oct 30, 2022
@PJB3005
Copy link
Member

PJB3005 commented Oct 30, 2022

Robust.Server osx-arm64 now requires Zlib.

Where is this extra dependency coming from?

Wait did you mean zstd?

Not actually sure if $(ProcessArchitecture) is doing what I want? It seems to work locally. Could just remove the conditional, it's not hurting anybody

It's only used for the Robust.Natives.Zstd package so frankly you can just include that dependency always. Would be nicer to be able to get it into the upstream SharpZstd.Interop package though.

(The "correct" way would be to use RIDs or something if you really care, but I don't think MSBuild makes that easy)

For the GLFW stuff, I've been planning to move to SDL2 for various reasons. I hope it'll be more reliable for stuff like this. We already have a good chunk of the backend code for it, but it's far from done.

@drcatdoctor
Copy link
Author

drcatdoctor commented Nov 1, 2022

Robust.Server osx-arm64 now requires Zlib.

Where is this extra dependency coming from?

Wait did you mean zstd?

I meant Zstd. Duh. My mistake. Fixed description.

Not actually sure if $(ProcessArchitecture) is doing what I want? It seems to work locally. Could just remove the conditional, it's not hurting anybody

It's only used for the Robust.Natives.Zstd package so frankly you can just include that dependency always. Would be nicer to be able to get it into the upstream SharpZstd.Interop package though.

(The "correct" way would be to use RIDs or something if you really care, but I don't think MSBuild makes that easy)

Hm it does seem better. Thanks for the pointer, I will look into that more when I have some more time to work on this.

For the GLFW stuff, I've been planning to move to SDL2 for various reasons. I hope it'll be more reliable for stuff like this. We already have a good chunk of the backend code for it, but it's far from done.

Ok, if that's in progress then maybe it is tolerable that GLFW has some problems for now..

Thanks for the look.

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

Successfully merging this pull request may close these issues.

3 participants