Commit Graph

42 Commits (master)

Author SHA1 Message Date
Etaash Mathamsetty 732629e5a0 Implement Wayland hotkeys 2 months ago
John Zimmermann cfc51ec99f meson: allow setting absolute path instead of 'Dynamic string tokens'
resolves #601
3 months ago
FlightlessMango 1fc0d640ff meson: mangoplot option 7 months ago
FlightlessMango 381c519631 meson: disable mangoapp by default
[skip ci]
11 months ago
FlightlessMango 801b5ef5fc mangoapp: install by default
[skip ci]
11 months ago
Emil Velikov bc282cf300 meson: remove use_system_vulkan/vulkan_datadir
Newer versions of the XML and headers don't play nice. In particular the
VK_LAYER_EXPORT macro was removed and the XML was reworked quite
significantly, so our generator no longer works.

I was able to port newer version of the generator scripts from Mesa
(where these were copied from originally), although these new scripts
don't work with the old XML.

Just drop the meson knobs and always use the subproject version. In
practical terms this is identical to what Mesa also does... So Debian
DFSG should not be _too_ upset.

Closes: https://github.com/flightlessmango/MangoHud/issues/927
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
1 year ago
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>
1 year ago
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>
1 year ago
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>
1 year ago
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>
1 year ago
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>
1 year ago
FlightlessMango dbe2f010a2 Don't build mangoapp by default 1 year ago
FlightlessMango 6f23cdeaf1 mangoapp: meson option to install lib32 1 year ago
FlightlessMango 8d064db204 mangoapp: install by default 1 year ago
wael 9a6809daca meson_options: fix bool options 2 years ago
jackun 50720d2215
Install data files only if `include_doc` option is set 2 years ago
Stephan Lachnit 2dfdb9b584
add metainfo file
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2 years ago
jackun 11142b5b2c
Merge pull request #703 from evelikov/misc-mixes
Remove libdrm_amdgpu and other unnecessary code
2 years ago
FlightlessMango b064f47d66 mangoapp: vulkan layer 2 years ago
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>
2 years ago
FlightlessMango e9d4eeff04 mangohudctl meson option 2 years ago
FlightlessMango cd215854ce Mangoapp: meson option 3 years ago
jackun a82e27d978
Use spdlog macros so logging can be completely disabled during compile-time 3 years ago
jackun 2f807a4c0d
Add `spdlog` wrap and logging 3 years ago
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
3 years ago
Kira Bruneau d8a1ddf253
meson: Add vulkan_datadir option (#522)
This option enables using system Vulkan headers when it doesn't share
the same datadir as MangoHud. This is specifically an issue in NixOS
where packages are built into their own isolated directories in
/nix/store.

For example:
/nix/store/9g28nz6zh484144mzw670bx82y1ka49a-vulkan-headers-1.2.162.0/share/vulkan/registry/vk.xml

This is currently worked around in the Nix package, by symlinking the
vulkan-headers into MangoHud's install directory:

5debc57760/pkgs/tools/graphics/mangohud/default.nix (L66-L70)

Although, this hack causes the vulkan-headers to be included as a
runtime dependency when they're only needed at build time.

I tried to figure out a way to resolve the datadir automatically, but
found that just adding a new option is probably the best solution for
the following reasons:

- The vulkan.pc file used to resolve dep_vulkan doesn't contain any
information about the datadir.

- The share directory could be resolved relative to the vulkan include
directory and that would solve the specific issue for Nix, but the
datadir could be installed anywhere and that wouldn't be a general
solution.

- I couldn't find a way to resolve the data dir using the XDG Base
Directory Specification because meson doesn't provide a way to access
the necessary environment variables.

https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
3 years ago
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
3 years ago
jackun 6a5cd38127
Meson option to have absolute paths in LD_PRELOAD 3 years ago
jackun a173989b1c
Make build.sh compatible with \$LIB 4 years ago
Stephan Lachnit d956f60f86 remove old system nvml build option
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
4 years ago
jackun 953c8d0e0f
Add meson option `with_nvml` 4 years ago
Sporif 61ef9244e9 Disable dlsym hooking by default and fix LD_PRELOAD propagation to new processes
This allows `mangohud steam` to work
4 years ago
FlightlessMango d6314da8b2 Merge branch 'master' into develop 4 years ago
Stephan Lachnit f860418e7e
Allow system NVML to be used
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
4 years ago
jackun 8024736253
Add DBus loader, combined ticker for Spotify metadata 4 years ago
Danilo Spinella 0373383581
Add x11/wayland feature switches, rename 'use_xnvctrl' to 'with_xnvctrl' 4 years ago
jackun 049e960589
Add 'use_xnvctrl' feature to allow building without libXNVCtrl support 4 years ago
FlightlessMango 71b602751d [meson] option to include_doc 4 years ago
jackun ad64bf345d
Update build scripts, again
Install to $prefix$libdir/mangohud by default.
4 years ago
jackun f99129f9de
Libdirs: once more, with feeling 4 years ago
Danilo Spinella 18edd4eb50 meson: Add option to use system vulkan headers 4 years ago
jackun 6400ab3cdc
meson: option to add _GLIBCXX_ASSERTIONS define 4 years ago