Commit Graph

141 Commits

Author SHA1 Message Date
FlightlessMango
5754ca13ee vulkan manifest: set cpu_family in layer name 2023-05-20 08:27:27 +02:00
FlightlessMango
b8bd09d638 More windows fixes 2023-04-09 19:06:46 +02:00
Emil Velikov
1b3f8b29bc meson: restrict most libMangoHud.so symbols
With the introduction of the static library, we forgot the version
script. As a result we were spilling all the internal symbols.

Fixes: d4aa74c ("Create static and shared libs separately")
Closes: https://github.com/flightlessmango/MangoHud/issues/933
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-04-03 02:21:42 +02:00
Emil Velikov
80d394c0cd meson: make libMangoHud.so append_libdir_mangohud aware
The library does not honour the correct install location. Seems like it
was broken for a while and I didn't catch it with my recent rework...
Since all the scripts flip the default "true" to "false" 🤦

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-04-02 23:11:05 +02:00
Emil Velikov
5c86369758 meson: explicitly annotate version.h as dependency
Currently we list the custom_target (aka vcs_tag() as part of the
sources. Although since it's not an explicit dependency meson/ninja are
free to compile the C/C++ files, before the file is generated.

Closes: https://github.com/flightlessmango/MangoHud/issues/862
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-03-13 21:56:18 +01:00
Emil Velikov
f47f777e26 meson: unwrap ld_libdir_mangohud handling, remove ld_libdir_abs
Currently we have ld_libdir_abs which defaults to false. In that case,
both the mangohud shell wrapper, as well as the json files, reference
the DSOs directly without any path component.

This means that at run-time the dynamic linker, vulkan loader as well as
pressure-vessel will need to jump through hoops and figure out the
bitness of the DSO, whether one wants the 32 or 64bit one and even then
there will be confusing messages like:

fatal: /usr/lib/libMangoHud.so: wrong ELF class: ELFCLASS32

When set to true, as seen in the in-tree build.sh we'll append empty
path to LD_LIBRARY_PATH (bad), the full path with the $LIB token will be
used with LD_PRELOAD (good) and json files (bad).

Since we are generating separate json files, we can use the actual path
(while $LIB currently works, it's not really strict json nor documented
as supported). We can also drop the dubious LD_LIBRARY_PATH manipulation

This basically reinstates the prepend_libdir_vk=true option that was
dropped earlier.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2023-03-13 21:53:27 +01:00
Emil Velikov
dd374d4c9e meson: remove prepend_libdir_vk option
The option is always true for all distributions that build Mangohud.
While only the in-tree PKGBUILD disables it for undocumented reasons.

In practise the option will be enabled across the board - in different
manner, with latter commit. But for now, just remove it.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2023-03-13 21:53:27 +01:00
Emil Velikov
491510d41c meson: produce per cpu_family json files
This will allow us to remove the $LIB from the json files and simplify
the related lib handling.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2023-03-13 21:53:27 +01:00
Emil Velikov
5d53d0dcc3 meson: inline PROJECT_NAME in mangohud.json.in
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2023-03-13 21:53:27 +01:00
Emil Velikov
def59db953 meson: remove ld_libdir_prefix option
The option defaults to false in-tree and across all distributions. The
only alleged use-case is the build.sh/build-srt.sh scripts. Although the
output of those scripts is absolutely identical with or w/o the flag.

Remove it.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2023-03-13 21:53:27 +01:00
Emil Velikov
08c26d595f meson: do not pick system vulkan, when explicitly disabled
For this to actually work, we also need to set dep_vulkan for all users.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2023-03-12 14:08:42 +01:00
Emil Velikov
221d335006 meson: remove mangoapp_32bit option
Was introduced as a means to shorten the build cycles. With the static
lib helper it should no longer be needed.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2023-03-04 22:23:35 +02:00
Emil Velikov
581b6b3375 meson: move util_files next to its user
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2023-03-04 21:40:56 +02:00
Emil Velikov
270beefdf3 meson: drop no_override_init_args
No longer needed

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2023-03-04 21:40:56 +02:00
Emil Velikov
ef169bd28b meson: remove unused MANGOAPP_LAYER define
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2023-03-04 21:31:25 +02:00
Emil Velikov
da219457e5 mangoapp: control.cpp -> control.c
There's nothing C++ in there, so rename the file appropriately.

While in there, use C99 initializers, annotate static functions as
such and pull the implicit stdbool.h.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2023-03-04 21:31:25 +02:00
Emil Velikov
8a1c56ba25 meson: remove broken -Dwith_dlsym
The option does not even build, so let's remove it.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2023-03-04 21:17:28 +02:00
FlightlessMango
99c72d30cf check for mangoapp_layer option for manifest 2023-01-19 00:45:56 +01:00
FlightlessMango
d4aa74c149 Create static and shared libs separately 2023-01-11 09:09:33 +01:00
FlightlessMango
6f23cdeaf1 mangoapp: meson option to install lib32 2023-01-10 13:38:05 +01:00
FlightlessMango
e3995ffcbf mangoapp: compile using static mangohud_library 2023-01-05 07:42:54 +01:00
FlightlessMango
ddbb4f5be1 intel: use json for parsing intel_gpu_top output 2022-11-29 06:18:37 +01:00
FlightlessMango
e38413b2d8 use intel_gpu_top for gpu stats 2022-11-01 12:01:50 +01:00
Stephan Lachnit
b8b6d61b25 Build mangoapp and mangohudctl for any CPU architecture
On 32-bit-only machines, building these for the 32-bit architecture makes sense.

Signed-off-by: Simon McVittie <smcv@debian.org>
2022-10-11 14:41:47 +02:00
jackun
e5d52c202e
Add meson install_tags, bump meson to 0.60 2022-07-14 17:36:49 +03:00
jackun
50720d2215
Install data files only if include_doc option is set 2022-07-14 15:32:05 +03:00
Stephan Lachnit
5709832576 Install MangoApp layer into libdir_mangohud
This makes the installation path adapt correctly to the value of
the append_libdir_mangohud option, which defaults to putting it in a
subdirectory ${libdir}/mangohud. Without this, the path in the JSON
manifest (which does respect append_libdir_mangohud) is inconsistent
with the actual location of the library.

Resolves: https://github.com/flightlessmango/MangoHud/issues/795
Co-authored-by: Simon McVittie <smcv@collabora.com>
2022-07-13 20:48:09 +03:00
jackun
39ba57daa1
s/is/are/g 2022-05-16 13:16:45 +03:00
jackun
8a628e6a77
Rename GL files to avoid some confusion with upstream Dear ImGui files 2022-05-16 13:06:07 +03:00
FlightlessMango
4341843117 nlohmann_json wrap 2022-03-15 22:56:36 +01:00
FlightlessMango
7df8918c42 mangoapp: layer: append libdir to json 2022-03-15 22:29:51 +01:00
jackun
11142b5b2c
Merge pull request #703 from evelikov/misc-mixes
Remove libdrm_amdgpu and other unnecessary code
2022-03-15 19:47:48 +02:00
FlightlessMango
b064f47d66 mangoapp: vulkan layer 2022-03-14 19:49:20 +01:00
Emil Velikov
68ce8f81cc Remove libdrm_amdgpu metrics
There are two alternatives - hwmon entries and gpu_metrics sysfs file.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2022-03-12 10:28:18 +00:00
Alessandro Toia
4be3ba20c2 GAMEPAD: add battery reporting for gamepad devices
(xone,xpadneo,ds4,ds5,switch)
2022-02-18 18:14:14 -08:00
FlightlessMango
e9d4eeff04 mangohudctl meson option 2022-01-21 10:42:30 +01:00
FlightlessMango
37e18279e7 mangoapp: use amdgpu metrics 2022-01-14 22:41:38 +01:00
FlightlessMango
92151565fc mangoapp: disable some options 2022-01-05 08:46:33 +01:00
FlightlessMango
45be485a13 mangohud control 2021-11-04 02:08:26 +01:00
FlightlessMango
da573e8eba mangoapp: fix not respecting nvctrl option 2021-10-23 02:35:09 +02:00
FlightlessMango
cd215854ce Mangoapp: meson option 2021-10-18 17:50:58 +02:00
FlightlessMango
4e3a40c6ef mangoapp + gamescope shm 2021-10-18 17:50:58 +02:00
jackun
822e325d11
Add get_basename, fix win32 build
std::string::substr likes to throw
2021-08-12 16:07:42 +03:00
jackun
2f807a4c0d
Add spdlog wrap and logging 2021-07-16 04:06:09 +03:00
jackun
c093f9823e
Use libdrm_amdgpu for amdgpu sensor info, if available
Using plain `open` as `drmOpen` needs bus id check which needs interface 1.4 ioctl which gives EPERM cause only DRM_MASTER can call it :(

https://github.com/clbr/radeontop/issues/48#issuecomment-493792404
2021-07-13 19:54:24 +03:00
Alessandro Toia
5656001639 Add forkawesome from compressed Base85 TTF 2021-05-27 15:40:33 -07:00
Alessandro Toia
5adb4500c7 Install forkawesome font file 2021-05-27 15:40:33 -07:00
FlightlessMango
a90c897feb Check battery info 2021-05-27 15:40:33 -07:00
jackun
47865573a8
Add option to prepend libdir to library's path in vulkan manifest
"\$LIB" technically breaks json but on the other hand vulkan loader
currently doesn't handle "\\$LIB"
Help with issue #468
2021-04-18 23:03:24 +03:00
jackun
54d6a8e889
Unset LD_LIBRARY_PATH if using absolute paths in LD_PRELOAD
$LIB in LD_LIBRARY_PATH makes `ldconfig` unhappy.
2021-03-24 19:55:32 +02:00