From 181d99e8826c2a0e81955c46e03c7cd3bae28873 Mon Sep 17 00:00:00 2001 From: Gioacchino Mazzurco Date: Wed, 16 May 2018 10:38:47 +0200 Subject: [PATCH] Give proper error message if Qt version is too old --- libresapi/src/libresapi.pro | 19 ++++++------------- retroshare.pri | 8 +++++++- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/libresapi/src/libresapi.pro b/libresapi/src/libresapi.pro index 2733cffa2..885d430f5 100644 --- a/libresapi/src/libresapi.pro +++ b/libresapi/src/libresapi.pro @@ -106,20 +106,13 @@ libresapihttpserver { DEFINES *= WINDOWS_SYS INCLUDEPATH += . $$INC_DIR - greaterThan(QT_MAJOR_VERSION, 4) { - # Qt 5 - PRO_PATH=$$shell_path($$_PRO_FILE_PWD_) - MAKE_SRC=$$shell_path($$PRO_PATH/webui-src/make-src) - } else { - # Qt 4 - PRO_PATH=$$replace(_PRO_FILE_PWD_, /, \\) - MAKE_SRC=$$PRO_PATH\\webui-src\\make-src - } + PRO_PATH=$$shell_path($$_PRO_FILE_PWD_) + MAKE_SRC=$$shell_path($$PRO_PATH/webui-src/make-src) - #create_webfiles.commands = $$MAKE_SRC\\build.bat $$PRO_PATH - #QMAKE_EXTRA_TARGETS += create_webfiles - #PRE_TARGETDEPS += create_webfiles - QMAKE_POST_LINK=$$MAKE_SRC\\build.bat $$PRO_PATH + #create_webfiles.commands = $$MAKE_SRC\\build.bat $$PRO_PATH + #QMAKE_EXTRA_TARGETS += create_webfiles + #PRE_TARGETDEPS += create_webfiles + QMAKE_POST_LINK=$$MAKE_SRC\\build.bat $$PRO_PATH # create dummy files system($$MAKE_SRC\\init.bat .) diff --git a/retroshare.pri b/retroshare.pri index 4d36fd088..6b8fdd870 100644 --- a/retroshare.pri +++ b/retroshare.pri @@ -160,6 +160,12 @@ rs_v07_changes { ## RetroShare qmake functions goes here as all the rest may use them ########### ################################################################################ +## Qt versions older the 5 are not supported anymore, check if the user is +## attempting use them and fail accordingly with a proper error message +lessThan(QT_MAJOR_VERSION, 5) { + error(Qt 5.0.0 or newer is needed to build RetroShare) +} + ## This function is useful to look for the location of a file in a list of paths ## like the which command on linux, first paramether is the file name, ## second parameter is the name of a variable containing the list of folders @@ -226,7 +232,7 @@ defineReplace(linkDynamicLibs) { ################################################################################ -## Statements and variables that depends on build options (CONFIG)goes here #### +## Statements and variables that depends on build options (CONFIG) goes here ### ################################################################################ ## ## Defining the following variables may be needed depending on platform and