stride icon indicating copy to clipboard operation
stride copied to clipboard

Cross-platform build for Xenko projects

Open xen2 opened this issue 6 years ago • 16 comments

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 avatar Feb 01 '19 04:02 xen2

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

Kryptos-FR avatar Feb 01 '19 04:02 Kryptos-FR

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

xen2 avatar Feb 01 '19 05:02 xen2

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

dfkeenan avatar Feb 05 '19 23:02 dfkeenan

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

It's a link to another issue. #8

SleepyMode avatar Feb 16 '19 11:02 SleepyMode

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 avatar Feb 16 '19 11:02 xen2

More detailed steps/progress for .NET Core 3

Runtime

  • [x] Update to latest System assemblies
  • [x] 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)

  • [x] Update RoslynPad to latest version (which supports .NET Core 3.0)
  • [x] Recompile QuickGraph and GraphX with support for .NET Standard or .NET Core 3.0
  • [x] 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

xen2 avatar Oct 29 '19 19:10 xen2

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

Kryptos-FR avatar Oct 29 '19 23:10 Kryptos-FR

@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.

xen2 avatar Oct 30 '19 15:10 xen2

@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.

Kryptos-FR avatar Oct 31 '19 01:10 Kryptos-FR

Xceed now supports .Net Core 3.0.

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

meriaizen86 avatar Feb 02 '20 19:02 meriaizen86

@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.

makotech222 avatar Feb 02 '20 19:02 makotech222

@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.

Kryptos-FR avatar Feb 03 '20 00:02 Kryptos-FR