Commit Graph

153 Commits

Author SHA1 Message Date
FlightlessMango
cc9d9b3526 meson option: with_spdlog 2023-09-23 05:20:23 +02:00
FlightlessMango
3a4a62369c emscripten compiler fixes 2023-09-22 00:22:21 +02:00
FlightlessMango
8da7e06b44 meson options: notify 2023-09-22 00:22:21 +02:00
FlightlessMango
00c8e47293 include unixy files if emscripten 2023-09-22 00:22:21 +02:00
FlightlessMango
a8689b6219 don't build shared if we're a subproject 2023-09-22 00:22:21 +02:00
FlightlessMango
ea376a2698 subproject: implot 2023-09-22 00:07:34 +02:00
Alessandro Toia
17d4541980 device: switch gamepad_battery to device_battery and allow to enable mouse or gamepad or both 2023-09-13 18:12:08 -07:00
FlightlessMango
d5ca00717e windows: don't include intel.cpp 2023-08-23 02:11:57 +02:00
FlightlessMango
e60b625fd0 meson: check for glslang bin as well 2023-07-28 16:12:54 +02:00
FlightlessMango
f38cc78996 add --version to mangohud script 2023-07-24 13:10:42 +02:00
FlightlessMango
dc1761e98a static link stdc++ 2023-07-22 05:12:20 +02:00
FlightlessMango
602ba78ea3 Split library into vulkan and opengl parts.
This has caused a lot of issues because when preloaded the vulkan hooks
will still initialize even tho it's an OpenGL application.
This will subsequently crash the application.
The solution is to split the vulkan and opengl parts into two separate
shared libraries.
2023-07-21 05:31:58 +02:00
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