Pārlūkot izejas kodu

change autogen_lib.sh for auto find qtmake.

yuchuli 3 gadi atpakaļ
vecāks
revīzija
3201de69f7
2 mainītis faili ar 30 papildinājumiem un 16 dzēšanām
  1. 28 14
      autogen_lib.sh
  2. 2 2
      src1/common/modulecomm/main.cpp

+ 28 - 14
autogen_lib.sh

@@ -1,19 +1,33 @@
-#qt_com=$(arch)
-qt_com=`arch`
-if [ $qt_com = "aarch64" ];then
-qtmake="/usr/lib/aarch64-linux-gnu/qt5/bin/qmake"
-else
-qtmake="/opt/Qt5.10.1/5.10.1/gcc_64/bin/qmake"
+#qtmake="/opt/qt/5.13.2/gcc_64/bin/qmake"
+
+qtmake=" "
+
+if [ ${#qtmake} -lt 5 ]; then
+  echo "now need find qmake "
+  optfiles=`find /opt -name 'qmake'` 
+  for entry in $optfiles
+  do
+     x=${entry:0-10:10}
+     if [ "$x" == "/bin/qmake" ];  then
+        qtmake="$entry"
+	echo "  -----find qmake"
+	echo "$qtmake"
+     fi
+  done
 fi
 
-if [ ! $qtmake ];then
-	echo -e "\e[33m qtmake not set, auto find it\e[0m"
-	qtmake=`find /opt -name "qmake" 2>/dev/null | grep 'gcc_64'`
-fi
-
-if [ ! $qtmake ];then
-	echo -e "\e[33m can't find qmake \e[0m"
-	exit 1
+if [ ${#qtmake} -lt 5 ]; then
+  echo "maybe agx,find qmake in usr folder "
+  optfiles=`find /usr -name 'qmake'` 
+  for entry in $optfiles
+  do
+     x=${entry:0-14:14}
+     if [ "$x" == "/qt5/bin/qmake" ];  then
+        qtmake="$entry"
+	echo "  -----find qmake"
+	echo "$qtmake"
+     fi
+  done
 fi
 
 echo -e "\e[33m qtmake: $qtmake \e[0m"

+ 2 - 2
src1/common/modulecomm/main.cpp

@@ -92,8 +92,8 @@ int main(int argc, char *argv[])
 //    iv::modulecomm::RegisterRecv("test1",testcall,iv::modulecomm::ModuleComm_INTERIOR);
 //    std::thread * xthread = new std::thread(threadsend);
 
-    gpa = iv::modulecomm::RegisterSend("test1",1000,1,iv::modulecomm::ModuleComm_INTERIOR);
-    iv::modulecomm::RegisterRecv("test1",testcall2,iv::modulecomm::ModuleComm_INTERIOR);
+    gpa = iv::modulecomm::RegisterSend("test1",1000,1,iv::modulecomm::ModuleComm_FASTRTPS);
+    iv::modulecomm::RegisterRecv("test1",testcall2,iv::modulecomm::ModuleComm_FASTRTPS);
 //    iv::modulecomm::RegisterRecv("test1",testcall2);
     std::thread * xthread = new std::thread(threadsend2);
     return a.exec();