|
|
|
|
|
by Crinus
2538 days ago
|
|
Of everything that list all you really need is the X libraries and you do not need to carry (meaning distribute) those since they are part of the every single desktop environment and have a stable ABI. The rest aren't strictly necessary, but i think Cairo has a stable ABI. I'm not sure if it is available everywhere though. OpenGL (and Vulkan) can be provided via dynamic linking, though only via an API that doesn't guarantee its existence (it doesn't exist in all X11 desktops - AFAIK Raspberry Pi doesn't support them). In any case, the dependencies i mean here are dependencies for the applications that target your API, not the dependencies your API has. You can make your API use whatever library you want to -e.g.- load PNG, JPG or whatever, but that can be hidden from the user of the API (ie. their binary will link against libyourapi.so.1 for yapi_load_image and what that specific version of libyourapi.so.1 uses to load the requested image is an implementation detail). Note that this is in the context of making that API a standard people can target, not a reusable library (and its own dependencies) people carry with their binaries. Basically the equivalent of how you do not need to give USER32.DLL on Windows to your users because you can pretty much expect that it will be there. Nowadays the only equivalent on Linux is the X libraries, anything else is either not guaranteed to be there now, or not guaranteed to be there in ~5 years because thanks to CADT people cannot stick with an API and feel the need to break everyone's programs to feel useful. |
|
both Debian and Fedora use wayland by default now. And wayland alone only gives you the ability to open a viewport, so you are going to need a lot of stuff if you want your UI library to do something as simple as :
> Note that this is in the context of making that API a standard people can target, not a reusable library (and its own dependencies) people carry with their binaries. Basically the equivalent of how you do not need to give USER32.DLL on Windows to your users because you can pretty much expect that it will be there.But almost no one makes Win32 apps with the Win32 API anymore anyways. The majority of desktop windows apps created today are using WPF or UWP which does not use any "native" stuff (that is, the win32 UI API), Qt or Electron. If this model does not even work on windows, why would you want to port it on linux instead of letting people ship their app as they wish ?
> Nowadays the only equivalent on Linux is the X libraries, anything else is either not guaranteed to be there now, or not guaranteed to be there in ~5 years because thanks to CADT people cannot stick with an API and feel the need to break everyone's programs to feel useful.
Even if someone made this magical new library today, I would still have to package it along with all its dependencies in an AppImage because I have users still on ubuntu 12.04, 14.04, and 16.04 as well as debian stretch and jessie.