sammyfreg / netImgui

'Dear Imgui' remote access library and application
MIT License
595 stars 51 forks source link

Linux server application #22

Closed zukonake closed 1 year ago

zukonake commented 2 years ago

Hello, is there any plan for a Linux server application? i.e. one that can on Linux render the UI etc. from a remote session. Or maybe some instructions how to build/port it for Linux? If it's not too complex maybe I'll try it myself.

sammyfreg commented 2 years ago

There is not one at the moment, but I wrote the code to make multi-platform 'easy'. In fact, I believe someone was able to successfully achieve that, you can look at issue #20 for some more insights.

Steps:

  1. NetImguiServer relies on the Dear ImGui's sample code for the application framework. Start compiling their Linux GLFW/OpenGl3 sample.
  2. Recreate the makefile needed to build, with the NetImguiServer sources from ServerApp\Source (except the Win32DX11 subfolder), using the previous sample as inspiration.
  3. Add the NetImgui sources from \Code\Client, to your makefile.
  4. In NetImguiServer_App.h Set HAL_API_PLATFORM_WIN32_DX11 to 0 and HAL_API_PLATFORM_GLFW_GL3 to 1
  5. Try to have things compiling

Note: -Platform specific code are inside files with _HAL in their filename, and with functions also prefixed with HAL_. All of the actions should be in there (and *_App.cpp), with everything else unchanged. -Code imported from Dear ImGui's sample code, that was modified, use the @SAMPLE_EDIT tag. With this, you can easily see how they should differ from their original version. -GlfwGL3\NetImguiServer_App_GlfwGL3.cpp is an important file. It is a copy of the DearImGui's sample main.cpp, but with changes to work with our Server. -'NetImguiServer_HAL_Glfw' is still lacking some Linux specific code, it would be nice if you could push an updated version if you get it running. In particular, it is lacking the code to convert Linux keycodes to Windows, in HAL_ConvertKeyDown().

sammyfreg commented 1 year ago

It seems that it is now possible to compile and run the Server application under Linux. #40