From 9ad445e8b4ebcf10efedbda94afe69a904cd88f8 Mon Sep 17 00:00:00 2001 From: Dirk Chang Date: Wed, 24 Feb 2021 18:55:53 +0800 Subject: [PATCH 1/5] fixed include file name with correct case --- .gitignore | 8 ++++++++ .../ProjectManager/ProjectManager/TableviewDelegate.cpp | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 48126a52..b2bb0d53 100644 --- a/.gitignore +++ b/.gitignore @@ -68,3 +68,11 @@ delobj.bat *.opensdf *.orig *.autosave +*~ +*.un~ +*.swp +Makefile +.qmake.stash +.moc +.rcc +.uic diff --git a/HmiFuncDesigner/ProjectManager/ProjectManager/TableviewDelegate.cpp b/HmiFuncDesigner/ProjectManager/ProjectManager/TableviewDelegate.cpp index a87fcaad..d9f93c42 100644 --- a/HmiFuncDesigner/ProjectManager/ProjectManager/TableviewDelegate.cpp +++ b/HmiFuncDesigner/ProjectManager/ProjectManager/TableviewDelegate.cpp @@ -1,4 +1,4 @@ -#include "tableviewdelegate.h" +#include "TableviewDelegate.h" #include #include #include From 7a19f971b40f9447be23db76ff6bb27f5c716022 Mon Sep 17 00:00:00 2001 From: Dirk Chang Date: Wed, 24 Feb 2021 19:02:33 +0800 Subject: [PATCH 2/5] remove the useless ini --- HmiFuncDesignerBin/bin/RecentProjectList.ini | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/HmiFuncDesignerBin/bin/RecentProjectList.ini b/HmiFuncDesignerBin/bin/RecentProjectList.ini index 353582fd..e554bc0f 100644 --- a/HmiFuncDesignerBin/bin/RecentProjectList.ini +++ b/HmiFuncDesignerBin/bin/RecentProjectList.ini @@ -1,7 +1,2 @@ [RecentProjects] -project-1=C:/Users/70640/Desktop/HMI_TEST_PROJECT/ModbusRTU_Draw/ModbusRTU.pdt -project-2=C:/Users/70640/Desktop/HMI_TEST_PROJECT/TCPIPModbus/TCPIPModbus_4X_FLOAT/TCPIPModbus.pdt -project-count=5 -project-3=E:/JasonWang/HmiFuncDesigner/HmiRunTimeBin/RunProject/first.pdt -project-4=C:/Users/Administrator/Desktop/HMI_TEST_PROJECT/TCPIPModbus/TCPIPModbus_4X_FLOAT/TCPIPModbus.pdt -project-5=C:/Users/Administrator/Desktop/HMI_TEST_PROJECT/TCPIPModbus_4X/TCPIPModbus.pdt +project-count=0 From 4b8888f1428036618c0dac5ab0745fb2ae8a0545 Mon Sep 17 00:00:00 2001 From: Dirk Chang Date: Wed, 24 Feb 2021 19:03:03 +0800 Subject: [PATCH 3/5] added git ignore for ini file --- .gitignore | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.gitignore b/.gitignore index b2bb0d53..912e7b7a 100644 --- a/.gitignore +++ b/.gitignore @@ -31,6 +31,8 @@ HmiFuncDesignerBin/bin/project HmiFuncDesignerBin/bin/QSCADARunTime HmiFuncDesignerBin/bin/RtdbView HmiFuncDesignerBin/bin/SysTagManager +HmiFuncDesignerBin/bin/ProjectManager +HmiFuncDesignerBin/bin/NativeRtdbView HmiRunTimeBin/log/ HmiRunTimeBin/Project/ @@ -48,6 +50,11 @@ HmiRunTimeBin/*.exe HmiRunTimeBin/*.dll HmiRunTimeBin/ViewElements/ +HmiRunTimeBin/AppLauncher +HmiRunTimeBin/FileTransferTool +HmiRunTimeBin/HmiRunTimeData +HmiRunTimeBin/HmiRunTimeView + third/ delobj.bat @@ -74,5 +81,12 @@ delobj.bat Makefile .qmake.stash .moc +*.moc +moc_* .rcc .uic +*.so +*.so.* +tags +prj +*.ini From c5893442d734ec310c9693ef3ac1c742381e9895 Mon Sep 17 00:00:00 2001 From: Dirk Chang Date: Wed, 24 Feb 2021 19:06:02 +0800 Subject: [PATCH 4/5] remove the file appendix and added exe only in Windows build --- .gitignore | 1 + HmiRunTime/AppLauncher/applauncher.ini | 8 +++----- HmiRunTime/AppLauncher/main.cpp | 11 ++++++++--- HmiRunTimeBin/applauncher.ini | 8 +++----- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 912e7b7a..aa05b0e5 100644 --- a/.gitignore +++ b/.gitignore @@ -90,3 +90,4 @@ moc_* tags prj *.ini +qrc_* diff --git a/HmiRunTime/AppLauncher/applauncher.ini b/HmiRunTime/AppLauncher/applauncher.ini index 78d4080d..5136abf4 100644 --- a/HmiRunTime/AppLauncher/applauncher.ini +++ b/HmiRunTime/AppLauncher/applauncher.ini @@ -1,6 +1,4 @@ -[AppDir] -dir=E:/JasonWang/HmiFuncDesigner/HmiRunTimeBin/ [AppName] -FileTransferTool=FileTransferTool.exe -HmiRunTimeData=HmiRunTimeData.exe -HmiRunTimeView=HmiRunTimeView.exe +FileTransferTool=FileTransferTool +HmiRunTimeData=HmiRunTimeData +HmiRunTimeView=HmiRunTimeView diff --git a/HmiRunTime/AppLauncher/main.cpp b/HmiRunTime/AppLauncher/main.cpp index b8b8e3c1..3fa8db01 100644 --- a/HmiRunTime/AppLauncher/main.cpp +++ b/HmiRunTime/AppLauncher/main.cpp @@ -21,9 +21,14 @@ void getApplicationFiles() QFile fileCfg(iniAppLauncher); if(fileCfg.exists()) { QString szDir = ConfigUtils::getCfgStr(iniAppLauncher, "AppDir", "dir", Helper::AppDir() + "/"); - g_szAppFileTransferTool = szDir + ConfigUtils::getCfgStr(iniAppLauncher, "AppName", "FileTransferTool", "FileTransferTool.exe"); - g_szAppHmiRunTimeData = szDir + ConfigUtils::getCfgStr(iniAppLauncher, "AppName", "HmiRunTimeData", "HmiRunTimeData.exe"); - g_szAppHmiRunTimeView = szDir + ConfigUtils::getCfgStr(iniAppLauncher, "AppName", "HmiRunTimeView", "HmiRunTimeView.exe"); + g_szAppFileTransferTool = szDir + ConfigUtils::getCfgStr(iniAppLauncher, "AppName", "FileTransferTool", "FileTransferTool"); + g_szAppHmiRunTimeData = szDir + ConfigUtils::getCfgStr(iniAppLauncher, "AppName", "HmiRunTimeData", "HmiRunTimeData"); + g_szAppHmiRunTimeView = szDir + ConfigUtils::getCfgStr(iniAppLauncher, "AppName", "HmiRunTimeView", "HmiRunTimeView"); +#ifdef Q_OS_WIN + g_szAppFileTransferTool += ".exe"; + g_szAppHmiRunTimeData += ".exe"; + g_szAppHmiRunTimeView += ".exe"; +#endif } } diff --git a/HmiRunTimeBin/applauncher.ini b/HmiRunTimeBin/applauncher.ini index e46b02d9..5136abf4 100644 --- a/HmiRunTimeBin/applauncher.ini +++ b/HmiRunTimeBin/applauncher.ini @@ -1,6 +1,4 @@ -[AppDir] -dir=E:/JasonWang/HmiFuncDesigner/HmiRunTimeBin/ [AppName] -FileTransferTool=FileTransferTool.exe -HmiRunTimeData=HmiRunTimeData.exe -HmiRunTimeView=HmiRunTimeView.exe \ No newline at end of file +FileTransferTool=FileTransferTool +HmiRunTimeData=HmiRunTimeData +HmiRunTimeView=HmiRunTimeView From 7714c6a8464a8009731205440a9026c7c4c5ce5f Mon Sep 17 00:00:00 2001 From: Dirk Chang Date: Thu, 25 Feb 2021 10:49:32 +0800 Subject: [PATCH 5/5] fixed project compress and uncompress under linux --- .../ProjectManager/ProjectManager/MainWindow.cpp | 8 ++++++++ HmiRunTime/FileTransferTool/tcpsocket.cpp | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/HmiFuncDesigner/ProjectManager/ProjectManager/MainWindow.cpp b/HmiFuncDesigner/ProjectManager/ProjectManager/MainWindow.cpp index f2525aeb..2a28541d 100644 --- a/HmiFuncDesigner/ProjectManager/ProjectManager/MainWindow.cpp +++ b/HmiFuncDesigner/ProjectManager/ProjectManager/MainWindow.cpp @@ -722,7 +722,11 @@ void MainWindow::on_actionUpLoad_triggered() ProjectUploadDialog *pDlg = new ProjectUploadDialog(this, m_strProjectName); if (pDlg->exec() == QDialog::Accepted) { QString desDir = pDlg->getProjectPath(); +#ifdef Q_OS_WIN QString program = QCoreApplication::applicationDirPath() + "/tar/tar.exe"; +#else + QString program = "tar"; +#endif QFile programFile(program); if (!programFile.exists()) { QMessageBox::information(this, "系统提示", "命令:" + program + "不存在!"); @@ -786,7 +790,11 @@ void MainWindow::on_actionDownload_triggered() Helper::CopyRecursively(m_strProjectPath, desDir); // 打包工程到tmp目录 +#ifdef Q_OS_WIN QString program = QCoreApplication::applicationDirPath() + "/tar/tar.exe"; +#else + QString program = "tar"; +#endif QFile programFile(program); if(!programFile.exists()) { QMessageBox::information(this, "系统提示", "命令:" + program + "不存在!"); diff --git a/HmiRunTime/FileTransferTool/tcpsocket.cpp b/HmiRunTime/FileTransferTool/tcpsocket.cpp index 935c944a..fdd94400 100644 --- a/HmiRunTime/FileTransferTool/tcpsocket.cpp +++ b/HmiRunTime/FileTransferTool/tcpsocket.cpp @@ -183,7 +183,7 @@ void TcpSocket::unTarProject() #if defined(Q_OS_WIN32) QString program = QCoreApplication::applicationDirPath() + "/tar/tar.exe"; #elif defined(Q_OS_LINUX) - QString program = "/bin/tar"; + QString program = "tar"; #endif QFile programFile(program); @@ -203,7 +203,7 @@ void TcpSocket::unTarProject() tarProc->setWorkingDirectory(QCoreApplication::applicationDirPath() + "/tar"); QStringList arguments; QString strSrc = QCoreApplication::applicationDirPath()+"/Project/RunProject.tar"; - QString strDes = QCoreApplication::applicationDirPath()+"/RunProject"; + QString strDes = QCoreApplication::applicationDirPath(); arguments << "-xvf" << strSrc << "-C"<< strDes; #endif