flybywiresim / simbridge

GNU General Public License v3.0
20 stars 26 forks source link

Running on linux #94

Open konradmoesch opened 11 months ago

konradmoesch commented 11 months ago

Hi, I play MSFS on Linux (using proton) and want to use (and maybe help developing) the plane and simbridge. How much is simbridge depending on the win32-platform, and what would be a starting point for porting/running it on linux?

CEbbinghaus commented 8 months ago

Currently Investigating this. Since its written in Typescript there is no reason why it wouldn't be possible to run it on linux. I took a shot and tried getting it to run in docker (which I think is a great start). My use case involves running simbridge in headless mode on my server to have a persistent api. That way I don't need to ensure the simbridge services is running locally whenever I want to start my flight sim (and gives me the possibility of accessing my routes remotely).

To achieve this I had to delete any and all terrain code and anything that had to do with the system tray but at least it runs: image

I don't know how performant a docker container would be especially without access to the GPU when rendering the terrain but I am sure it can be done.

+1 on this and considering deployments that aren't standalone windows applications

ZigTag commented 8 months ago

I mean if you were running on docker it should run natively on Linux which would allow you to be able to access the GPU, After looking into it, it seems like GPU.js (the library we use for GPU operations) works on Linux.

This may work for allowing GPUs in docker if that is needed

Edit: I should've done some research before posting

CEbbinghaus commented 8 months ago

Its a PITA to get Nvidia GPUs into docker. It can be done and I have managed to get it running but only for video transcoding for which ffmpeg was the real hero. I wouldn't mind linux binaries for full desktop or VM deployments together with a docker container. And as you pointed out, any binary that runs in docker also runs in linux. But it might be smartest to have 3 different versions of (full windows, full linux, stripped docker). Additionally the JS support for conditional compilation is basically non existent so extra logic needs to be added to only load certain libraries on certain operating systems.