stride icon indicating copy to clipboard operation
stride copied to clipboard

‼️🔴𝐋 Linux support for the launcher and the editor

Open Kryptos-FR opened this issue 8 months ago • 3 comments

While Avalonia supports Windows, Linux and MacOS, our code has some dependencies or assumptions of a Windows machine running the editor.

The purpose of this task is to identify all blocking points, fix issues or find alternatives in case it has to be done on a per-platform basis.

This task should cover both the launcher and the editor. It might be split into several sub-tasks if necessary.

Here is a non-exhaustive list of areas that are impacted by platform specifics:

  • hard dependencies, prerequisites that might be necessary to install before the launcher or the game studio can be used on Linux or on MacOS
  • file system and file path management (e.g. the path separator character is different: /vs \)
  • nuget packages location and restore
  • lack of Windows registry on other platforms

Kryptos-FR avatar May 02 '25 09:05 Kryptos-FR

What are your hard dependencies? I feel like as a C# engine you should avoid using native libraries that aren't already on the system. If you can you should port them to C#

The file system should use a common method to combine paths so you can change it if you need to. Things like Path.Combine are better but you can't edit what it does if you need to.

Nuget works for me on linux I don't understand what your saying.

You shouldn't be using the registry at all. Use configurations, On windows it would probably be in AppData/Roaming/Stride and linux probably ~/.config/stride, idk about mac.

Shadowblitz16 avatar May 03 '25 18:05 Shadowblitz16

There is something called technical debts. Until now, the editor was only working on Windows. As such, some design decisions did not take into account the fact that other systems behave differently in various places and situations. One of such was to use the registry for some operations or to detect some system configuration.

We use nuget to restore/load the editor dependencies as well as the game dependency (we could technically depend on different versions of stride). The launcher itself "installs" stride versions using the nuget API. Nuget default locations are different on each system, and while it is usually found in common places on Windows, it can vary in each Linux distribution as well as user preferences.

In short, we have to investigate what those difference are, write some code to handle them and make it resilient against exotic configuration that users could have.

Kryptos-FR avatar May 03 '25 19:05 Kryptos-FR

nuget packages location and restore partially done by #2776.

What remains is either to automatically add a source for developers (i.e. Stride Dev) the same way it's done on Windows, or to write a documentation with steps to setup that source: Linux users are usually more advanced and have more custom settings so maybe it's better to not mess with.

Kryptos-FR avatar May 13 '25 13:05 Kryptos-FR