소스 검색

fix(gitignore,linuxsystemtest.sh,sample1&2,querymsg,view_message):add makeprotointerface to ignore, change system version determination methord, fix some include path error in sample project and some msg tool.

孙嘉城 3 년 전
부모
커밋
b552559275

+ 6 - 1
.gitignore

@@ -234,5 +234,10 @@ src/common/modulecomm/systemdef.pri
 build-*-Debug
 build-*-Release
 
-#vscode
+# vscode
 *.vscode
+
+# proto interface & ivprotoif
+src/common/makeprotointerface/makeprotointerface
+src/common/ivprotoif/*
+include/ivprotoif.h

+ 27 - 16
include/linuxsystemtest.sh

@@ -5,27 +5,38 @@ OSDEFINFO=$(echo "DEFINES += SYSTEM_UBUNTU1804")
 
 ubuntu1804="18.04."
 ubuntu1604="16.04."
-resultos=$(echo $systemname | grep "Ubuntu")
+ubuntu2004="20.04."
+resultos=$(echo $systemname | grep "tegra")
 if [ "$resultos" != "" ]
 then
-  result=$(echo $systemname | grep "${ubuntu1804}")
-  if [ "$result" != "" ]
-  then
-#      echo "ubuntu 18.04"
-      OSDEFINFO=$(echo "DEFINES += SYSTEM_UBUNTU1804")
-  fi
-
-  result=$(echo $systemname | grep "${ubuntu1604}")
-  if [ "$result" != "" ]
-  then
-#      echo "ubuntu 16.04"
-      OSDEFINFO=$(echo "DEFINES += SYSTEM_UBUNTU1604")
-  fi
+  OSDEFINFO=$(echo "DEFINES += SYSTEM_AGX")
 else
-resultos=$(echo $systemname | grep "tegra")
+  resultos=$(echo $systemname | grep "Ubuntu")
   if [ "$resultos" != "" ]
   then
-    OSDEFINFO=$(echo "DEFINES += SYSTEM_AGX")
+    systemname=`lsb_release -a`
+    
+    result=$(echo $systemname | grep "${ubuntu1804}")
+    if [ "$result" != "" ]
+    then
+#        echo "ubuntu 18.04"
+        OSDEFINFO=$(echo "DEFINES += SYSTEM_UBUNTU1804")
+    fi
+
+    result=$(echo $systemname | grep "${ubuntu1604}")
+    if [ "$result" != "" ]
+    then
+#        echo "ubuntu 16.04"
+        OSDEFINFO=$(echo "DEFINES += SYSTEM_UBUNTU1604")
+    fi
+    
+    result=$(echo $systemname | grep "${ubuntu2004}")
+    if [ "$result" != "" ]
+    then
+#        echo "ubuntu 20.04"
+        OSDEFINFO=$(echo "DEFINES += SYSTEM_UBUNTU1804") # 20210930 parameters of 20.04 temporarily same as 18.04
+    fi
+    
   fi
 fi
 

+ 7 - 0
src/include/proto/samplemsg.proto

@@ -0,0 +1,7 @@
+syntax = "proto2";
+package iv;
+message samplemsg
+{
+required int32 mvalue = 1;
+optional int64 msendtime = 2;
+};

+ 8 - 0
src/tool/sample1/sample1.pro

@@ -35,6 +35,14 @@ HEADERS += \
 FORMS += \
         mainwindow.ui
 
+# Default rules for deployment.
+qnx: target.path = /tmp/$${TARGET}/bin
+else: unix:!android: target.path = /opt/$${TARGET}/bin
+!isEmpty(target.path): INSTALLS += target
+
+!include(../../../include/common.pri ) {
+    error( "Couldn't find the common.pri file!" )
+}
 
 LIBS += -lprotobuf
 INCLUDEPATH += $$PWD/../../include/msgtype

+ 9 - 0
src/tool/sample2/sample2.pro

@@ -35,6 +35,15 @@ HEADERS += \
 FORMS += \
         mainwindow.ui
 
+# Default rules for deployment.
+qnx: target.path = /tmp/$${TARGET}/bin
+else: unix:!android: target.path = /opt/$${TARGET}/bin
+!isEmpty(target.path): INSTALLS += target
+
+!include(../../../include/common.pri ) {
+    error( "Couldn't find the common.pri file!" )
+}
+
 LIBS += -lprotobuf
 INCLUDEPATH += $$PWD/../../include/msgtype
 

+ 1 - 1
src/tool/tool_querymsg/tool_querymsg.pro

@@ -24,7 +24,7 @@ SOURCES += main.cpp \
 
 HEADERS += \
     querymsg.h \
-    ../../common/ModuleComm/ivmodulemsg_type.h
+    ../../common/modulecomm/ivmodulemsg_type.h
 
 
 INCLUDEPATH += $$PWD/../../common/modulecomm

+ 1 - 1
src/tool/view_message/view_message.pro

@@ -29,7 +29,7 @@ HEADERS += \
     dialogaddmsg.h \
     dialogviewmessage.h \
     mainwindow.h \
-    ../../common/ModuleComm/ivmodulemsg_type.h
+    ../../common/modulecomm/ivmodulemsg_type.h
 
 
 INCLUDEPATH += $$PWD/../../common/modulecomm