mupen64plus / mupen64plus-ui-python

A frontend for Mupen64Plus
http://m64py.sourceforge.net/
GNU General Public License v3.0
242 stars 66 forks source link

Improve the search for lrelease in setup.py #226

Closed ShimmerFairy closed 10 months ago

ShimmerFairy commented 10 months ago

This fixes #225 by additionally searching for the lrelease binary in the location Qt installs its binaries to, since this location may not necessarily be in the environment's PATH variable. This allows the build script to more closely match how other build systems make use of tools like lrelease, and in particular mirrors how Qt's appropriate CMake module finds this program.

This change searches the Qt binary location first, and if it cannot find a file named lrelease there, or if for whatever reason an attempt to query the binary directory returns nothing, then setup.py will try finding a suitable binary exactly as it did before. I don't know if the old searching code is still necessary in this instance, so I kept it to be safe. This code only looks for lrelease in the Qt-provided location, and not lrelease-qt5 like the path-based search does, since I assume the -qt5 suffix wouldn't be used for binaries installed to the Qt5-specific directory.

gen2brain commented 10 months ago

Merged, thanks!