UGT icon indicating copy to clipboard operation
UGT copied to clipboard

Linux port?

Open gmipf opened this issue 4 years ago • 2 comments

Do you consider or ever will port this to Linux? I'm a Linux and macOS only user.

gmipf avatar Jun 25 '21 15:06 gmipf

As far as I understand, this is just a demo for windows (according to the readme). I'm pretty sure the graphics bindings are quite different between OS, so I think it's not a simple thing to port.

Your best bet might be running it in DosBox

Meerkov avatar Jul 18 '21 18:07 Meerkov

Yeah, it would take some work. While Proton SDK (the framework it runs on) does support mac and linux as targets (OpenGL for rendering and FMOD are fine for example), the 'weird' and special things UGT does are Windows-specific and would need to be abstracted or hacked around.

The parts that currently won't work on Linux/mac (and iphone/android for that matter)

  • Capturing desktop pixels into a SoftSurface (capturing the screen uses GDI, a windows specific thing)
  • Drawing the overlay lines over the desktop for the custom rect selection box, and capturing that rect (again, using GDI)
  • Global hotkeys
  • Capturing from webcam input (Escapi uses Windows Media Foundation, so that's out)

The files to look at specifically: HotKeyHandler.cpp, WinDesktopCapture.cpp, WinDragRect.cpp.

For example, on OSX, we'd want to write a OSXDesktopCapture.cpp and link that instead of the Win* versions, etc.

I suspect Mac would be easier to get going due to only one kind of desktop layer to worry about, but we'd need a motivated expert to fill in the missing functionality. Any volunteers? :)

SethRobinson avatar Jul 18 '21 20:07 SethRobinson