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

Cross-platform build for Xenko projects #360

Open
3 tasks
xen2 opened this issue Feb 1, 2019 · 15 comments
Open
3 tasks

Cross-platform build for Xenko projects #360

xen2 opened this issue Feb 1, 2019 · 15 comments
Labels
area-Asset area-Build area-GameStudio bounty A bounty will be awarded to the person working on this issue, see the bounty wiki entry enhancement New feature or request

Comments

@xen2
Copy link
Member

xen2 commented Feb 1, 2019

Idea is to be able to build Xenko projects (incl. asset compilation) on Linux/macOS.

Some important steps:

  • Remove managed c++ code (esp. FBX/Assimp importers)
  • Find/recompile/remove various native dependencies for Linux/macOS
  • Convert projects to .NET Standard or .NET Core (to decide per project)

This is a necessary step before cross-platform editor

@xen2 xen2 changed the title Cross-platform project compilation Cross-platform build for Xenko projects Feb 1, 2019
@Kryptos-FR
Copy link
Member

Convert projects to .NET Core

.NET Standard should be enough for some of them, see my early attempts in https://github.com/Kryptos-FR/Avalonia.GameStudio

@xen2
Copy link
Member Author

xen2 commented Feb 1, 2019

@Kryptos-FR yes sorry that's what I meant, editing

@dfkeenan
Copy link
Contributor

dfkeenan commented Feb 5, 2019

That "cross-platform editor" link doesn't seem to go anywhere.

@SleepyMode
Copy link
Contributor

That "cross-platform editor" link doesn't seem to go anywhere.

It's a link to another issue.
#8

@xen2
Copy link
Member Author

xen2 commented Feb 16, 2019

Yes my bad, it was broken before (I tried [cross-platform editor](#8) but it made a link on same page with #8 in URL). Fixed it a few days ago.

@xen2
Copy link
Member Author

xen2 commented Oct 29, 2019

More detailed steps/progress for .NET Core 3

Runtime

  • Update to latest System assemblies
  • Convert Xenko.Games and Xenko.Input to use .NET Core 3.0 WinForms & WPF, like on .NET Framework

Compiler tools (.NET Core 3 on Windows)

  • Managed code (Assimp/FBX): if not converted to pure C/C# (cf multiplatform section), we could use new C++/CLI in .NET Core but we need to at least add multi TFM build for both .NET Core and .NET FW (i.e. TargetFrameworks)
  • Review various use of EnvDTE (mostly used for reattaching debugger on child process)
  • Remove WCF code (maybe convert to ServiceWire?)

Compiler tools (multiplatform)

  • Managed code (Assimp/FBX) needs to be converted to pure C/C#
    It might be worth investigating if making a C++ to C# PInvoke converter wouldn't make sense.
    But contrary to most existing solution, idea would be to just wrap C++ class as struct and avoid any kind of complex automatic conversion (little bit like SharpVulkan) to make very lightweight & close to the metal bindings that require no/few custom rules.
  • Rebuild various dependencies (Texture libraries, VHACD, msdfgen, etc.) for Linux/OSX

Game Studio (.NET Core 3.0 on Windows)

  • Update RoslynPad to latest version (which supports .NET Core 3.0)
  • Recompile QuickGraph and GraphX with support for .NET Standard or .NET Core 3.0
  • Migrate from System.Windows.Interactivity to Microsoft.Xaml.Behaviors.Wpf
  • Decide how to get rid of Xceed.Datagrid
  • Either wait until Xceed (other than Datagrid) release .NET Core version (in a few months?) or migrate to something else

@Kryptos-FR
Copy link
Member

About QuickGraph, did you see that there is already a fork on GitHub that has still some development getting done?
https://github.com/YaccConstructor/QuickGraph

@xen2
Copy link
Member Author

xen2 commented Oct 30, 2019

@Kryptos-FR Yes I was hesitating but didn't want to run into regressions for GraphX and our code.
Also I was hoping GraphX might consider a PR so thought staying with something close to official QuickGraph might help.
Anyway, fine to switch to that version if it works well.

@Kryptos-FR
Copy link
Member

@xen2 Makes sense. I was just wondering if forking their repo and starting from their initial releases (e.g. nuget https://www.nuget.org/packages/YC.QuickGraph/3.7.1) could work.

Might be safer to start from something closer to what we have currently though.

@meriaizen86
Copy link
Contributor

Xceed now supports .Net Core 3.0.

https://xceed.com/release-notes/

@makotech222
Copy link
Contributor

@meriaizen86 As discussed in the discord, they removed their datagrid component from the Free version, so we will have to replace the datagrid component with something else anyways.

@Kryptos-FR
Copy link
Member

@meriaizen86 They might very well support .Net Core but it is still Windows-only. Xceed is and remains a WPF "extension", so it won't magically support other platforms.

@Jklawreszuk
Copy link
Collaborator

Jklawreszuk commented Jun 25, 2024

For those interested, it is possible to build mostly all Stride packages (except Tests and Editor) on Linux
result of
dotnet build Stride.Runtime.sln
image

@Jklawreszuk
Copy link
Collaborator

Jklawreszuk commented Nov 24, 2024

Since 4.2.0.2267 it is possible to build your game on Linux 💟
Please keep in mind that It still may have some issues, so should be treated as in preview/beta.

If anyone is interested in supporting macOS you can follow my PR's for inspiration

@bruno-garcia
Copy link

After I installed lld on my Mac (brew install lld), I was able to run dotnet build Stride.Runtime.sln:

Build succeeded with 1280 warning(s) in 21.3s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Asset area-Build area-GameStudio bounty A bounty will be awarded to the person working on this issue, see the bounty wiki entry enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

9 participants