-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Linux Support #60
Comments
Basically you need to either rewrite the program to support linux or you need to change how to find files so the WINE version will work, I'd recommend creating a window where you can type the path to custom. |
I'm not opposed to adding Linux support, but I don't have the spare time to set up a Linux machine to develop and test this right now. If anyone else wants to take this one, they are welcome to do so. |
This is a .NET 5 program using WPF. WPF internally uses DX9, which is already emulated by Wine. Nobody made the proof of concept yet. Alternatively we can replace WPF with Avalonia. Hidden files start with a dot in Linux. To avoid cross-distro imcompability we need to use ~/.steam/root symlink and go from there. |
Taking a look into what can be done to natively support this. WPF not being available on Linux is a major blocker so we might need to do something else? Unsure, still in early stages of poking around. |
Perhaps the upcoming .NET MAUI will be the way to go. https://docs.microsoft.com/en-us/dotnet/maui/what-is-maui |
Certainly seems like a good way to go, but there is no mention of Linux on that page, and I can't find any evidence that they want to support it. |
I should have read more into it before posting it here, my bad. You're right, it looks like Microsoft is still holding a grudge against Linux and purposely making it hard to support it. Linux features are being built into Windows but it's a one way street. |
So I guess the question is, are we okay with moving to a totally different UI library/framework? It doesn't seem like there are any that are drop in replacements but I'm willing to put in the legwork to make the transition if that's something you're okay with @CriticalFlaw. |
I'm honestly not too keen on switching frameworks for this purpose. Instead I'm wondering if having a companion web app would be a better alternative. We may be able to carry over more of the code and have it be accessible for everyone. |
A webapp would be neat, sort of the same vein as the Toonhud customiser? I 100% agree that switching frameworks isn't the best move in this case, especially since the interface for each hud is generated so it's not a super straightforward port. |
Could this run on the Steam Deck OS w/proton? |
@PoorPocketsMcNewHold Interesting. Thank you for looking into it. Could you please do a write up of how you set it up in Linux? It will be useful for other users who are on it. Will need to see how the checkedbox and modifications can be fixed for that build. I'm sure the latter can be fixed someway |
Wine can work with hidden files, it's just disabled by default. Check the drive tab in winecfg. |
Need someone to download the latest from the master branch, compile and test in Linux. Just to get a better sense of where it's at currently. |
Welp...
|
What happens if you set EnableWindowsTargeting to true in the project settings file as instructed in the error? |
tf2hud.log |
In Visual Studio, we have a post-build script to remove certain language files. Looks like the command to do so does not work on Linux. Try removing it and building again. Here's the section in the csproj file: https://github.com/CriticalFlaw/TF2HUD.Editor/blob/master/src/TF2HUD.Editor/HUDEditor.csproj#L147 |
While now it runs, it does not like all "System.Windows" refs.
This is clear due to dotnet/core#4743 |
@SlawekNowy was this test attempted with wine? |
No. Not yet. "dotnet build" packages native dotnet runtime into an application. I would need to package the windows one. |
After "LANG=C dotnet build --os win" in project directory, run fails with:
It seems that the path to hostfxr is a linux one. Howver no Linux path exists in the built json files. Let's try adding the .net runtime to wineprefix. EDIT: That did not work. I have to bundle the whole dotnet runtime. |
In linux we don't seem to bundle the whole runtime... That is pushed via special nuget packages |
I fidlled some more. Adding "RuntimeIdentifiers" property to csproj (win-x64 and win-x86) fixed the problem. |
That shouldn't be an issue. I can mark a self-contained build as Linux specific. If this change works could you please 1. Create a PR for any changes that need to be included in the editor and 2. Do a write up of the steps needed to get this to running on Linux please? |
Here's the thing. I presume the build I would publish would have no difference in functionality and stability as the Windows one. This is due to a fact, that since .net core (and version 5 since) both use same underlying nuget package as an base overlay for such apps. Namely "Microsoft.NETCore.App.Host.win-x64" "Microsoft.NETCore.App.Runtime.win-x64". Internally Runtime package is copied without changes, and the AppHost one would have slight modification to run our compiled application. Both ours and Runtime's code would be the same either way. |
Plus now I don't even have TF2 installed right now. |
In order to build that on linux (after removing the PostBuild step) you would have to run "dotnet publish -r win-x64 -c Release --self-contained". The command explicitely metions the RID of the runtime, configuration and the "Bundle the runtime" flag. Similiar command would be run on linux, but RID of the runtime would be by default "win-x64". |
Additionnally the exported executable would not have an icon. |
It's kinda worse: The executable on linux (for me) freezes on start with dxvk, or crashes without. |
Funnily enough running build done on Linux in Windows works perfectly. |
So we're going in circles. |
I think the conclusion is that unless we re-write the editor in a cross-compatible language there's no proper way to get the editor (in its current state) to work on Linux. |
The only issue is the WPF GUI framework, which is not supported natively on Linux. Otherwise, there is nothing preventing it from running on Linux (that is, doing a dotnet build that targets native linux, instead of wine/windows). Some projects opt into https://avaloniaui.net/ for this very reason. |
A year late but thank you for the suggestion. I'm working on the next release (dev branch) and will see how feasible it is to adopt Avalonia into the codebase for Linux support |
You need to create a configure.sh file for linux support in order to make a makefile to install the program. WINE version cannot detect hidden files due to using a crappy file manager so no steam files.
The text was updated successfully, but these errors were encountered: