diff --git a/product/src/tools/upgrade/upgrade_install/CUpgradeWorker.cpp b/product/src/tools/upgrade/upgrade_install/CUpgradeWorker.cpp index 045c028e..c49cc3a0 100644 --- a/product/src/tools/upgrade/upgrade_install/CUpgradeWorker.cpp +++ b/product/src/tools/upgrade/upgrade_install/CUpgradeWorker.cpp @@ -338,8 +338,8 @@ void CUpgradeWorker::slotExeDb() connect(m_installHelperProcess,QOverload::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 "<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)); } diff --git a/product/src/tools/upgrade/upgrade_install/res/sys_upgrade.ico b/product/src/tools/upgrade/upgrade_install/res/sys_upgrade.ico index 5130bbf9..0b36ae0e 100644 Binary files a/product/src/tools/upgrade/upgrade_install/res/sys_upgrade.ico and b/product/src/tools/upgrade/upgrade_install/res/sys_upgrade.ico differ diff --git a/product/src/tools/upgrade/upgrade_install/sys_upgrade.ico b/product/src/tools/upgrade/upgrade_install/sys_upgrade.ico index 5130bbf9..0b36ae0e 100644 Binary files a/product/src/tools/upgrade/upgrade_install/sys_upgrade.ico and b/product/src/tools/upgrade/upgrade_install/sys_upgrade.ico differ diff --git a/product/src/tools/upgrade/upgrade_install/upgradeCommon.h b/product/src/tools/upgrade/upgrade_install/upgradeCommon.h index 9a77a05a..6547ac87 100644 --- a/product/src/tools/upgrade/upgrade_install/upgradeCommon.h +++ b/product/src/tools/upgrade/upgrade_install/upgradeCommon.h @@ -4,42 +4,16 @@ #pragma once #include +#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 diff --git a/product/src/tools/upgrade/upgrade_package/MainWindow.cpp b/product/src/tools/upgrade/upgrade_package/MainWindow.cpp index 3de26d89..4cf23d75 100644 --- a/product/src/tools/upgrade/upgrade_package/MainWindow.cpp +++ b/product/src/tools/upgrade/upgrade_package/MainWindow.cpp @@ -134,8 +134,8 @@ bool MainWindow::addDefaultEmptyDir(const QString &src_path) QString exePath = dir.currentPath(); QDir::setCurrent(src_path); qDebug()<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); diff --git a/product/src/tools/upgrade/upgrade_package/res/upgrade_package.ico b/product/src/tools/upgrade/upgrade_package/res/upgrade_package.ico index 1602d136..0b36ae0e 100644 Binary files a/product/src/tools/upgrade/upgrade_package/res/upgrade_package.ico and b/product/src/tools/upgrade/upgrade_package/res/upgrade_package.ico differ diff --git a/product/src/tools/upgrade/upgrade_package/upgrade_package.ico b/product/src/tools/upgrade/upgrade_package/upgrade_package.ico index 1602d136..0b36ae0e 100644 Binary files a/product/src/tools/upgrade/upgrade_package/upgrade_package.ico and b/product/src/tools/upgrade/upgrade_package/upgrade_package.ico differ diff --git a/product/src/tools/upgrade/upgrade_package/upgrade_package.pro b/product/src/tools/upgrade/upgrade_package/upgrade_package.pro index 76f3d3e4..761412b6 100644 --- a/product/src/tools/upgrade/upgrade_package/upgrade_package.pro +++ b/product/src/tools/upgrade/upgrade_package/upgrade_package.pro @@ -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