diff --git a/build.sh b/build.sh index f4c7c7ba..d65b9414 100755 --- a/build.sh +++ b/build.sh @@ -10,9 +10,6 @@ BUILD="build" QMAKE_CONF="" ROOT_DIR=`pwd` -# Create translations -lrelease ./src/Cutter.pro - check_r2() { r2 -v >/dev/null 2>&1 if [ $? = 0 ]; then @@ -38,6 +35,19 @@ find_qmake() { echo "$qmakepath" } +find_lrelease() { + lreleasepath=$(which lrelease-qt5) + if [ -z "$lreleasepath" ]; then + lreleasepath=$(which lrelease) + fi + if [ -z "$lreleasepath" ]; then + echo "You need lrelease to build Cutter." + echo "Please make sure lrelease is in your PATH environment variable." + exit 1 + fi + echo "$lreleasepath" +} + find_gmake() { gmakepath=$(which gmake) if [ -z "$gmakepath" ]; then @@ -72,6 +82,9 @@ else echo "Correct radare2 version found, skipping..." fi +# Create translations +$(find_lrelease) ./src/Cutter.pro + # Build mkdir -p "$BUILD" cd "$BUILD" || exit 1