From 6c8867ad5c37439f08a9db4c334a03e4a9679d53 Mon Sep 17 00:00:00 2001 From: Maurice O'Neal Date: Thu, 19 Sep 2019 13:07:50 -0400 Subject: [PATCH] Minor changes to the linux build script $qt_dir in the build script will now default to the hard coded standard directory for Qt binaries '/usr/lib/x86_64-linux-gnu/qt5/bin' if a valid path is not provided by the user. End users that have customized setups of Qt might need to modify this script to make sure $qt_dir points to the correct directory at all times. Moved the LICENSE.md file to the root directory so github can read it. --- docs/LICENSE.md => LICENSE.md | 0 linux_build.sh | 26 ++++++++++++++++---------- 2 files changed, 16 insertions(+), 10 deletions(-) rename docs/LICENSE.md => LICENSE.md (100%) diff --git a/docs/LICENSE.md b/LICENSE.md similarity index 100% rename from docs/LICENSE.md rename to LICENSE.md diff --git a/linux_build.sh b/linux_build.sh index 166434b..4933e62 100644 --- a/linux_build.sh +++ b/linux_build.sh @@ -12,7 +12,13 @@ bin_dir="/usr/bin" tmp_dir="$HOME/.cache/mrci_build" user="$USER" -if [ "$qt_dir" != "" ]; then +if [ ! -d "$qt_dir" ]; then + + echo "a valid path to Qt was not provided, falling back to the default: /usr/lib/x86_64-linux-gnu/qt5/bin" + + qt_dir="/usr/lib/x86_64-linux-gnu/qt5/bin" + +else PATH=$qt_dir:$PATH @@ -29,14 +35,12 @@ if [ -d "$tmp_dir" ]; then rm -rfv $tmp_dir fi - -mkdir -vp $tmp_dir -cp -rv $src_dir/. $tmp_dir - -if [ $? -eq 0 ]; then - + +if [ $? -eq 0 -a -d "$qt_dir" ]; then + + mkdir -vp $tmp_dir + cp -rv $src_dir/. $tmp_dir cd $tmp_dir - qmake -config release if [ $? -eq 0 ]; then @@ -61,8 +65,10 @@ if [ $? -eq 0 ]; then service_file="./build/$bin_name.service" echo "#!/bin/sh" > $startup_script - echo "export LD_LIBRARY_PATH=$install_dir/lib" >> $startup_script - echo "$install_dir/$bin_name \$1 \$2 \$3 \$4 \$5 \$6 \$7 \$8 \$9 \$10" >> $startup_script + echo "export QTDIR=$install_dir" >> $startup_script + echo "export QT_PLUGIN_PATH=$install_dir" >> $startup_script + echo "export LD_LIBRARY_PATH=\"$install_dir/lib:\$LD_LIBRARY_PATH\"" >> $startup_script + echo "$install_dir/$bin_name \$1 \$2 \$3" >> $startup_script echo "#!/bin/sh" > $setup_script echo "if [ -f \"$install_dir/uninstall.sh\" ]; then" >> $setup_script