[ref]同步711
@ -338,8 +338,8 @@ void CUpgradeWorker::slotExeDb()
|
||||
connect(m_installHelperProcess,QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),this,&CUpgradeWorker::slotInstallHelperFinishedHandler);
|
||||
connect(m_installHelperProcess,&QProcess::readyReadStandardOutput,this,&CUpgradeWorker::slotInstallHelperHandler);
|
||||
}
|
||||
QString program = m_installPath + QDir::separator() + "product" +QDir::separator() + m_exePath + QDir::separator() + INSTALL_HELPER_EXEC_NAME;
|
||||
//QString program = m_installPath + QDir::separator() + "platform" +QDir::separator() + m_exePath + QDir::separator() + INSTALL_HELPER_EXEC_NAME;
|
||||
QString program = m_installPath + QDir::separator() + "product" +QDir::separator() + m_exePath + QDir::separator() + UPGRADE_HELPER_EXEC_NAME;
|
||||
//QString program = m_installPath + QDir::separator() + "platform" +QDir::separator() + m_exePath + QDir::separator() + UPGRADE_HELPER_EXEC_NAME;
|
||||
qDebug() << "program "<<program << " arguments:" << arguments;
|
||||
|
||||
m_installHelperProcess->start(program,arguments);
|
||||
@ -504,7 +504,7 @@ QFileInfoList CUpgradeWorker::getOwnFile(const QString &path)
|
||||
for(int i = 0; i < file_list.size(); i++)
|
||||
{
|
||||
QString name = file_list.at(i).fileName();
|
||||
if(name == "iot_upgrade_abcdefghigklmnopqrstuvwxyz.txt")
|
||||
if(name == "kbd_upgrade_abcdefghigklmnopqrstuvwxyz.txt")
|
||||
{
|
||||
list.append(file_list.at(i));
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 4.8 KiB |
@ -4,42 +4,16 @@
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
#include "setup/CommonDef.h"
|
||||
|
||||
#ifdef OS_WINDOWS
|
||||
#define SYS_CONFIG_PATH "C:/Program Files/PowerSCADA3000"
|
||||
#endif
|
||||
|
||||
#ifdef OS_LINUX
|
||||
#define SYS_CONFIG_PATH "/etc/powerscada3000"
|
||||
#endif
|
||||
|
||||
#define INSTALLER_UNIQUE_NAME "iscs6000_installer"
|
||||
|
||||
const static int pos_min_x=10;
|
||||
const static int pos_max_x=560;
|
||||
const static int pos_min_y=10;
|
||||
const static int pos_max_y=400;
|
||||
|
||||
#ifdef OS_WINDOWS
|
||||
#define SYS_CONFIG_PATH "C:/Program Files/PowerSCADA3000"
|
||||
#define UNINSTALL_EXEC_NAME "uninstall.exe"
|
||||
#define INSTALL_HELPER_EXEC_NAME "upgrade_install_helper.exe"
|
||||
#define INSTALL_FREFIX "D:"
|
||||
#define DB_MANAGER_EXE_NAME "db_manager.exe"
|
||||
#endif
|
||||
|
||||
#ifdef OS_LINUX
|
||||
#define SYS_CONFIG_PATH "/etc/powerscada3000"
|
||||
#define UNINSTALL_EXEC_NAME "uninstall"
|
||||
#define INSTALL_HELPER_EXEC_NAME "upgrade_install_helper"
|
||||
#define INSTALL_FREFIX "/opt"
|
||||
#define DB_MANAGER_EXE_NAME "db_manager"
|
||||
#endif
|
||||
|
||||
#define USER_NAME_DEFINE "root";
|
||||
#define PASSWORD_DEFINE "kbdct@0755";
|
||||
|
||||
|
||||
struct StOldProjectInfo
|
||||
{
|
||||
int projectId;
|
||||
@ -68,6 +42,7 @@ struct StNewUpgradeInfo
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
struct StDbInfo
|
||||
{
|
||||
QString dbIp;
|
||||
@ -77,11 +52,12 @@ struct StDbInfo
|
||||
QString dbPassword;
|
||||
StDbInfo(){
|
||||
dbIp = "127.0.0.1";
|
||||
dbName = "iscs6000";
|
||||
dbName = EMS_DEFAULT_DATABASE;
|
||||
dbUser ="root";
|
||||
dbPort = 3306;
|
||||
dbPassword ="kbdct@0755";
|
||||
dbPassword = EMS_DEFAULT_PASSWD;
|
||||
}
|
||||
};
|
||||
|
||||
*/
|
||||
#endif // UPGRADECOMMON_H
|
||||
|
||||
@ -134,8 +134,8 @@ bool MainWindow::addDefaultEmptyDir(const QString &src_path)
|
||||
QString exePath = dir.currentPath();
|
||||
QDir::setCurrent(src_path);
|
||||
qDebug()<<dir.absolutePath();
|
||||
file.setFileName("iot_upgrade_abcdefghigklmnopqrstuvwxyz.txt");
|
||||
QString content ="iot_upgrade_abcdefghigklmnopqrstuvwxyz";
|
||||
file.setFileName("kbd_upgrade_abcdefghigklmnopqrstuvwxyz.txt");
|
||||
QString content ="kbd_upgrade_abcdefghigklmnopqrstuvwxyz";
|
||||
if(file.open(QIODevice::WriteOnly | QIODevice::Text))
|
||||
{
|
||||
QByteArray str = content.toUtf8();
|
||||
@ -266,11 +266,11 @@ void MainWindow::on_pushButton_clicked()
|
||||
void MainWindow::on_pushButton_2_clicked()
|
||||
{
|
||||
int proId = ui->cb_id->currentData().toInt();
|
||||
if(proId == 40)
|
||||
{
|
||||
ui->textEdit->append(tr("请选择一个产品线补丁"));
|
||||
return ;
|
||||
}
|
||||
// if(proId == 40)
|
||||
// {
|
||||
// ui->textEdit->append(tr("请选择一个产品线补丁"));
|
||||
// return ;
|
||||
// }
|
||||
QString path = ui->lineEdit_path->text().trimmed();
|
||||
QString name = ui->lineEdit_name->text().trimmed();
|
||||
if(path.isEmpty())
|
||||
@ -457,7 +457,7 @@ QFileInfoList MainWindow::getOwnFile(const QString &path)
|
||||
for(int i = 0; i < file_list.size(); i++)
|
||||
{
|
||||
QString name = file_list.at(i).fileName();
|
||||
if(name == "iot_upgrade_abcdefghigklmnopqrstuvwxyz.txt")
|
||||
if(name == "kbd_upgrade_abcdefghigklmnopqrstuvwxyz.txt")
|
||||
{
|
||||
list.append(file_list.at(i));
|
||||
}
|
||||
@ -631,20 +631,20 @@ void MainWindow::writeVerInfotoFile()
|
||||
}
|
||||
if(node.toElement().attribute("key")=="exe_path")
|
||||
{
|
||||
QString exePath = "windows10_debug";
|
||||
QString exePath = QString("windows10_%1").arg(DIR_DEBUG_RELEASE_DIR);
|
||||
|
||||
int type = ui->cb_plat->currentData().toInt();
|
||||
if(type == 1)
|
||||
{
|
||||
exePath = "windows10_debug";
|
||||
exePath = QString("windows10_%1").arg(DIR_DEBUG_RELEASE_DIR);
|
||||
}
|
||||
else if (type == 2)
|
||||
{
|
||||
exePath = "centos7_debug";
|
||||
exePath = QString("centos7_%1").arg(DIR_DEBUG_RELEASE_DIR);
|
||||
}
|
||||
else if (type == 3)
|
||||
{
|
||||
exePath = "kylin10d_debug";
|
||||
exePath = QString("kylin10d_%1").arg(DIR_DEBUG_RELEASE_DIR);
|
||||
}
|
||||
|
||||
list.at(i).toElement().setAttribute("value",exePath);
|
||||
|
||||
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 4.8 KiB |
@ -15,6 +15,8 @@ DEFINES += QT_DEPRECATED_WARNINGS
|
||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
DEFINES += DIR_DEBUG_RELEASE_DIR=\\\"$$(DIR_DEBUG_RELEASE)\\\"
|
||||
|
||||
SOURCES += \
|
||||
main.cpp \
|
||||
MainWindow.cpp
|
||||
|
||||