MangoHud
MangoHud copied to clipboard
Use meson to handle multilib install and uninstall
Hello,
Since I saw that meson automatically handles library paths according the host machine, it should handle properly MangoHud's multilib building.
In this PR:
- Rely on meson to determine whether
/usr/lib,/usr/lib64... etc should be used for both x86 and x86_64 builds. - Use
meson installto install directly into the/usrprefix and without specifying inbuild.shwhich files to install. - Use meson's list of installed files for uninstalling.
I feel like there are some final touches to do, but I cannot see them for now. Otherwise this needs to be tested on Arch, RPM and DEB distros to confirm everything is alright. It works on Gentoo.
Feedback welcome!
Adel.
build.sh is used for building release package primarily so needs to line-up with mangohud-setup.sh (a.k.a no meson to configure stuff there).
But workflow and DIY should use separate build scripts anyway probably :P
You got me completely lost, where is this mangohud-setup.sh script ? What does it do ? How come something doesn't use the build system of MangoHud ?
Oh I get it better now, the script that installs from the binary tarball. The meson approach of this PR could be transferred there too:
- Use
DESTDIR="$PWD/build/release" ninja -C build/meson-$MACHINE installandDESTDIR="$PWD/build/release" ninja -C build/meson-x86 install - tar
$PWD/build/releaseas-is and just untar that into the host system root folder. - this approach needs to keep a list of the installed files to be uninstalled, though.
But basically this is re-implementing a package manager. I suppose we do this to avoid making an Arch, DEB and RPM package.
Nevermind, it needs the lib32 detection logic still...
build.sh is used for building release package primarily so needs to line-up with mangohud-setup.sh (a.k.a no meson to configure stuff there).
Yeah now that I had a quick look, I broke that workflow I think, I will check more thoroughly and see if I can update that with the changes done here.
But workflow and DIY should use separate build scripts anyway probably :P
I am for using meson when installing on own machine. I started this PR without the tar+install script approach in mind (I wasn't aware that it even existed)
Okay, so there are quite a few install scripts and I do have the energy to go through all of them. So how about I do this:
- I make the script called
install.shand is to only be used for local installs with meson/compilation. - Leave the rest untouched xD
Is that a good start, but that would be the fifth build/install script xD