Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed include file name with correct case #4

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ HmiFuncDesignerBin/bin/project
HmiFuncDesignerBin/bin/QSCADARunTime
HmiFuncDesignerBin/bin/RtdbView
HmiFuncDesignerBin/bin/SysTagManager
HmiFuncDesignerBin/bin/ProjectManager
HmiFuncDesignerBin/bin/NativeRtdbView

HmiRunTimeBin/log/
HmiRunTimeBin/Project/
Expand All @@ -51,6 +53,11 @@ HmiRunTimeBin/*.exe
HmiRunTimeBin/*.dll
HmiRunTimeBin/ViewElements/

HmiRunTimeBin/AppLauncher
HmiRunTimeBin/FileTransferTool
HmiRunTimeBin/HmiRunTimeData
HmiRunTimeBin/HmiRunTimeView

third/


Expand All @@ -72,3 +79,19 @@ delobj.bat
*.opensdf
*.orig
*.autosave
*~
*.un~
*.swp
Makefile
.qmake.stash
.moc
*.moc
moc_*
.rcc
.uic
*.so
*.so.*
tags
prj
*.ini
qrc_*
8 changes: 8 additions & 0 deletions HmiFuncDesigner/ProjectManager/ProjectManager/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,11 @@ void MainWindow::onSlotUpLoadProject()
ProjectUploadDialog *pDlg = new ProjectUploadDialog(this, QSoftCore::getCore()->getProjectCore()->m_szProjFile);
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 + "不存在!");
Expand Down Expand Up @@ -869,7 +873,11 @@ void MainWindow::onSlotDownloadProject()
Helper::CopyRecursively(QSoftCore::getCore()->getProjectCore()->m_szProjPath, 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 + "不存在!");
Expand Down
7 changes: 1 addition & 6 deletions HmiFuncDesignerBin/bin/RecentProjectList.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
[RecentProjects]
project-count=5
project-1=C:/Users/70640/Desktop/123.pdt
project-2=C:/Users/70640/Desktop/demo1.pdt
project-3=D:/HmiFuncDesigner/HmiRunTimeBin/RunProject/ModbusRTU.pdt
project-4=C:/Users/JasonWang/Desktop/ModbusRTU.pdt
project-5=C:/Users/70640/Desktop/HMI_TEST_PROJECT/ModbusRTU.pdt
project-count=0
8 changes: 3 additions & 5 deletions HmiRunTime/AppLauncher/applauncher.ini
Original file line number Diff line number Diff line change
@@ -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
11 changes: 8 additions & 3 deletions HmiRunTime/AppLauncher/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down
4 changes: 2 additions & 2 deletions HmiRunTime/FileTransferTool/tcpsocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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

Expand Down
9 changes: 7 additions & 2 deletions HmiRunTime/HmiRunTime/HmiRunTime/PortThread.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#include "PortThread.h"
#include "PortThread.h"
#include <RealTimeDB.h>
#include <QDebug>


PortThread::PortThread(QString name)
{
m_name = name;
Expand Down Expand Up @@ -46,6 +45,7 @@ void PortThread::Start()
}
}
}
state = __Thread_Runing;
this->start();
}

Expand All @@ -64,6 +64,10 @@ void PortThread::Stop()
}
}
}
while(state != __Thread_Stop)
{
this->msleep(5);
}
this->wait();
}

Expand All @@ -82,5 +86,6 @@ void PortThread::run()
}
this->msleep(5);
}
state = __Thread_Stop;
}

10 changes: 8 additions & 2 deletions HmiRunTime/HmiRunTime/HmiRunTime/PortThread.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef PORTTHREAD_H
#ifndef PORTTHREAD_H
#define PORTTHREAD_H

#include <QObject>
Expand All @@ -8,6 +8,12 @@
#include <QSemaphore>
#include "Vendor.h"

enum __ThreadState
{
__Thread_Stop,
__Thread_Runing,
};

class PortThread : public QThread
{
Q_OBJECT
Expand All @@ -21,7 +27,7 @@ class PortThread : public QThread
void Start();
// 停止
void Stop();

__ThreadState state;
protected:
void run();

Expand Down
8 changes: 3 additions & 5 deletions HmiRunTimeBin/applauncher.ini
Original file line number Diff line number Diff line change
@@ -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