增加华高中性版本

This commit is contained in:
luoliangyi 2023-04-18 14:34:06 +08:00
parent c8b4a18ec4
commit c2a73218ad
13 changed files with 105 additions and 59 deletions

View File

@ -63,6 +63,8 @@ HGResult VersionDll::Load()
strcat(dllPath, "ZJVersion.dll");
#elif defined(OEM_ZIGUANG)
strcat(dllPath, "ZGVersion.dll");
#elif defined(OEM_HUAGAO_NEU)
strcat(dllPath, "HGNeuVersion.dll");
#else
strcat(dllPath, "HGVersion.dll");
#endif
@ -77,6 +79,8 @@ HGResult VersionDll::Load()
strcpy(dllPath, "libZjVersion.so");
#elif defined(OEM_ZIGUANG)
strcpy(dllPath, "libZgVersion.so");
#elif defined(OEM_HUAGAO_NEU)
strcat(dllPath, "libHGNeuVersion.so");
#else
strcpy(dllPath, "libHGVersion.so");
#endif

View File

@ -239,6 +239,8 @@ void Dialog_AquireInto::setCfgBaseOnSection(QString section)
ui->lineEdit_fileName->setText(getCfgValue(section2.c_str(), "namePrefix", QString("ZJScan")));
#elif defined(OEM_ZIGUANG)
ui->lineEdit_fileName->setText(getCfgValue(section2.c_str(), "namePrefix", QString("ZGScan")));
#elif defined(OEM_HUAGAO_NEU)
ui->lineEdit_fileName->setText(getCfgValue(section2.c_str(), "namePrefix", QString("Scan")));
#else
ui->lineEdit_fileName->setText(getCfgValue(section2.c_str(), "namePrefix", QString("HGScan")));
#endif

View File

@ -35,6 +35,8 @@ void Dialog_Feedback::on_pbtn_submit_clicked()
oemName = HGVERSION_OEMNAME_MICROTEK;
#elif defined(OEM_ZIGUANG)
oemName = HGVERSION_OEMNAME_UNIS;
#elif defined(OEM_HUAGAO_NEU)
oemName = HGVERSION_OEMNAME_HUAGAO_NEU;
#else
oemName = HGVERSION_OEMNAME_HUAGO;
#endif

View File

@ -29,6 +29,8 @@ Dialog_upgrade::Dialog_upgrade(class VersionDll *versionDll, HGVersionInfo *vers
oemName = HGVERSION_OEMNAME_MICROTEK;
#elif defined(OEM_ZIGUANG)
oemName = HGVERSION_OEMNAME_UNIS;
#elif defined(OEM_HUAGAO_NEU)
oemName = HGVERSION_OEMNAME_HUAGAO_NEU;
#else
oemName = HGVERSION_OEMNAME_HUAGO;
#endif

View File

@ -120,6 +120,10 @@ MainWindow::MainWindow(const QString& appLang, QWidget *parent)
this->setWindowIcon(QIcon(":images/image_rsc/logo/uniscan.ico"));
this->setWindowTitle(tr("UniScan"));
m_oemName = HGVERSION_OEMNAME_UNIS;
#elif defined(OEM_HUAGO_NEU)
this->setWindowIcon(QIcon(":images/image_rsc/logo/RightWay_logo.ico"));
this->setWindowTitle(tr("Scan"));
m_oemName = HGVERSION_OEMNAME_HUAGO_NEU;
#else
this->setWindowIcon(QIcon(":images/image_rsc/logo/logo.ico"));
this->setWindowTitle(tr("HuaGoScan"));
@ -139,7 +143,7 @@ MainWindow::MainWindow(const QString& appLang, QWidget *parent)
ui->actionact_update->setVisible(false);
ui->act_feedback->setVisible(false);
#if !defined(OEM_HANWANG) && !defined(OEM_LISICHENG) && !defined(OEM_CANGTIAN) && !defined(OEM_ZHONGJING) && !defined(OEM_ZIGUANG)
#if !defined(OEM_HANWANG) && !defined(OEM_LISICHENG) && !defined(OEM_CANGTIAN) && !defined(OEM_ZHONGJING) && !defined(OEM_ZIGUANG) && !defined(OEM_HUAGAO_NEU)
if (m_versionDll->IsValid())
{
ui->actionact_update->setVisible(true);
@ -368,6 +372,8 @@ MainWindow::MainWindow(const QString& appLang, QWidget *parent)
m_password = "microtek";
#elif defined(OEM_ZIGUANG)
m_password = "uniscan";
#elif defined(OEM_HUAGAO_NEU)
m_password = "scan";
#else
m_password = "huagoscan";
#endif
@ -3258,6 +3264,8 @@ void MainWindow::on_act_help_triggered()
QString filename = QApplication::applicationDirPath() + "/MicrotekScan_App_Help_manual.pdf";
#elif defined(OEM_ZIGUANG)
QString filename = QApplication::applicationDirPath() + "/UniScan_App_Help_manual.pdf";
#elif defined(OEM_HUAGAO_NEU)
QString filename = QApplication::applicationDirPath() + "/HGScan_App_Help_manual.pdf";
#else
QString filename = QApplication::applicationDirPath() + "/HuaGoScan_App_Help_manual.pdf";
#endif
@ -3278,33 +3286,37 @@ void MainWindow::on_act_help_triggered()
if (osName.find("UnionTech") != std::string::npos)
{
#if defined(OEM_HANWANG)
filename = "/opt/apps/com.hanvonchina.hanvonscan/entries/help/HanvonScan_App_Help_manual.pdf";
filename = QApplication::applicationDirPath() + "/../../entries/help/HanvonScan_App_Help_manual.pdf";
#elif defined(OEM_LISICHENG)
filename = "/opt/apps/com.lanxumchina.lanxumscan/entries/help/LanxumScan_App_Help_manual.pdf";
filename = QApplication::applicationDirPath() + "/../../entries/help/LanxumScan_App_Help_manual.pdf";
#elif defined(OEM_CANGTIAN)
filename = "/opt/apps/com.cumtennchina.cumtennscan/entries/help/CumtennScan_App_Help_manual.pdf";
filename = QApplication::applicationDirPath() + "/../../entries/help/CumtennScan_App_Help_manual.pdf";
#elif defined(OEM_ZHONGJING)
filename = "/opt/apps/com.microtekchina.microtekscan-ex/entries/help/MicrotekScan_App_Help_manual.pdf";
filename = QApplication::applicationDirPath() + "/../../entries/help/MicrotekScan_App_Help_manual.pdf";
#elif defined(OEM_ZIGUANG)
filename = "/opt/apps/com.unischina.uniscan/entries/help/UniScan_App_Help_manual.pdf";
filename = QApplication::applicationDirPath() + "/../../entries/help/UniScan_App_Help_manual.pdf";
#elif defined(OEM_HUAGAO_NEU)
filename = QApplication::applicationDirPath() + "/../../entries/help/HGScan_App_Help_manual.pdf";
#else
filename = "/opt/apps/com.huagaochina.huagoscan/entries/help/HuaGoScan_App_Help_manual.pdf";
filename = QApplication::applicationDirPath() + "/../../entries/help/HuaGoScan_App_Help_manual.pdf";
#endif
}
else
{
#if defined(OEM_HANWANG)
filename = "/opt/apps/scanner-driver-hanvon/doc/HanvonScan_App_Help_manual.pdf";
filename = QApplication::applicationDirPath() + "/../doc/HanvonScan_App_Help_manual.pdf";
#elif defined(OEM_LISICHENG)
filename = "/opt/apps/scanner-driver-lanxum/doc/LanxumScan_App_Help_manual.pdf";
filename = QApplication::applicationDirPath() + "/../doc/LanxumScan_App_Help_manual.pdf";
#elif defined(OEM_CANGTIAN)
filename = "/opt/apps/scanner-driver-cumtenn/doc/CumtennScan_App_Help_manual.pdf";
filename = QApplication::applicationDirPath() + "/../doc/CumtennScan_App_Help_manual.pdf";
#elif defined(OEM_ZHONGJING)
filename = "/opt/apps/scanner-driver-microtek-ex/doc/MicrotekScan_App_Help_manual.pdf";
filename = QApplication::applicationDirPath() + "/../doc/MicrotekScan_App_Help_manual.pdf";
#elif defined(OEM_ZIGUANG)
filename = "/opt/apps/scanner-driver-unis/doc/UniScan_App_Help_manual.pdf";
filename = QApplication::applicationDirPath() + "/../doc/UniScan_App_Help_manual.pdf";
#elif defined(OEM_HUAGAO_NEU)
filename = QApplication::applicationDirPath() + "/../doc/HGScan_App_Help_manual.pdf";
#else
filename = "/opt/apps/scanner-driver-huagao/doc/HuaGoScan_App_Help_manual.pdf";
filename = QApplication::applicationDirPath() + "/../doc/HuaGoScan_App_Help_manual.pdf";
#endif
}
#endif
@ -3982,21 +3994,20 @@ void MainWindow::upgradeApp(QString pkgPath)
// QFile::copy(curPath + "ZJBase.dll", tmpPath + "ZJBase.dll");
// QFile::remove(tmpPath + "ZJVersion.dll");
// QFile::copy(curPath + "ZJVersion.dll", tmpPath + "ZJVersion.dll");
// #elif defined(OEM_ZIGUANG)
// QFile::remove(tmpPath + "ZGUpgradeApp.exe");
// QFile::copy(curPath + "ZGUpgradeApp.exe", tmpPath + "ZGUpgradeApp.exe");
// QFile::remove(tmpPath + "ZGBase.dll");
// QFile::copy(curPath + "ZGBase.dll", tmpPath + "ZGBase.dll");
// QFile::remove(tmpPath + "ZGVersion.dll");
// QFile::copy(curPath + "ZGVersion.dll", tmpPath + "ZGVersion.dll");
// #elif defined(OEM_ZIGUANG)
// QFile::remove(tmpPath + "ZGUpgradeApp.exe");
// QFile::copy(curPath + "ZGUpgradeApp.exe", tmpPath + "ZGUpgradeApp.exe");
// QFile::remove(tmpPath + "ZGBase.dll");
// QFile::copy(curPath + "ZGBase.dll", tmpPath + "ZGBase.dll");
// QFile::remove(tmpPath + "ZGVersion.dll");
// QFile::copy(curPath + "ZGVersion.dll", tmpPath + "ZGVersion.dll");
// #else
QFile::remove(tmpPath + "HGUpgradeApp.exe");
QFile::copy(curPath + "HGUpgradeApp.exe", tmpPath + "HGUpgradeApp.exe");
QFile::remove(tmpPath + "HGBase.dll");
QFile::copy(curPath + "HGBase.dll", tmpPath + "HGBase.dll");
QFile::remove(tmpPath + "HGVersion.dll");
QFile::copy(curPath + "HGVersion.dll", tmpPath + "HGVersion.dll");
QFile::remove(tmpPath + "HGUpgradeApp.exe");
QFile::copy(curPath + "HGUpgradeApp.exe", tmpPath + "HGUpgradeApp.exe");
QFile::remove(tmpPath + "HGBase.dll");
QFile::copy(curPath + "HGBase.dll", tmpPath + "HGBase.dll");
QFile::remove(tmpPath + "HGVersion.dll");
QFile::copy(curPath + "HGVersion.dll", tmpPath + "HGVersion.dll");
// #endif
QFile::remove(tmpPath + "msvcp140.dll");
@ -4024,38 +4035,38 @@ void MainWindow::upgradeApp(QString pkgPath)
// #if defined(OEM_HANWANG)
// QFile::remove(tmpPath + "HwUpgradeApp");
// QFile::copy(curPath + "HwUpgradeApp", tmpPath + "HwUpgradeApp");
// //QFile::remove(tmpPath + "libHwBase.so");
// //QFile::copy(curPath + "libHwBase.so", tmpPath + "libHwBase.so");
// //QFile::remove(tmpPath + "libHwVersion.so");
// //QFile::copy(curPath + "libHwVersion.so", tmpPath + "libHwVersion.so");
// QFile::remove(tmpPath + "libHwBase.so");
// QFile::copy(curPath + "libHwBase.so", tmpPath + "libHwBase.so");
// QFile::remove(tmpPath + "libHwVersion.so");
// QFile::copy(curPath + "libHwVersion.so", tmpPath + "libHwVersion.so");
// #elif defined(OEM_LISICHENG)
// QFile::remove(tmpPath + "LscUpgradeApp");
// QFile::copy(curPath + "LscUpgradeApp", tmpPath + "LscUpgradeApp");
// //QFile::remove(tmpPath + "libLscBase.so");
// //QFile::copy(curPath + "libLscBase.so", tmpPath + "libLscBase.so");
// //QFile::remove(tmpPath + "libLscVersion.so");
// //QFile::copy(curPath + "libLscVersion.so", tmpPath + "libLscVersion.so");
// QFile::remove(tmpPath + "libLscBase.so");
// QFile::copy(curPath + "libLscBase.so", tmpPath + "libLscBase.so");
// QFile::remove(tmpPath + "libLscVersion.so");
// QFile::copy(curPath + "libLscVersion.so", tmpPath + "libLscVersion.so");
// #elif defined(OEM_CANGTIAN)
// QFile::remove(tmpPath + "CtsUpgradeApp");
// QFile::copy(curPath + "CtsUpgradeApp", tmpPath + "CtsUpgradeApp");
// //QFile::remove(tmpPath + "libCtsBase.so");
// //QFile::copy(curPath + "libCtsBase.so", tmpPath + "libCtsBase.so");
// //QFile::remove(tmpPath + "libCtsVersion.so");
// //QFile::copy(curPath + "libCtsVersion.so", tmpPath + "libCtsVersion.so");
// QFile::remove(tmpPath + "libCtsBase.so");
// QFile::copy(curPath + "libCtsBase.so", tmpPath + "libCtsBase.so");
// QFile::remove(tmpPath + "libCtsVersion.so");
// QFile::copy(curPath + "libCtsVersion.so", tmpPath + "libCtsVersion.so");
// #elif defined(OEM_ZHONGJING)
// QFile::remove(tmpPath + "ZjUpgradeApp");
// QFile::copy(curPath + "ZjUpgradeApp", tmpPath + "ZjUpgradeApp");
// //QFile::remove(tmpPath + "libZjBase.so");
// //QFile::copy(curPath + "libZjBase.so", tmpPath + "libZjBase.so");
// //QFile::remove(tmpPath + "libZjVersion.so");
// //QFile::copy(curPath + "libZjVersion.so", tmpPath + "libZjVersion.so");
// #elif defined(OEM_ZIGUANG)
// QFile::remove(tmpPath + "ZgUpgradeApp");
// QFile::copy(curPath + "ZgUpgradeApp", tmpPath + "ZgUpgradeApp");
// //QFile::remove(tmpPath + "libZgBase.so");
// //QFile::copy(curPath + "libZgBase.so", tmpPath + "libZgBase.so");
// //QFile::remove(tmpPath + "libZgVersion.so");
// //QFile::copy(curPath + "libZgVersion.so", tmpPath + "libZgVersion.so");
// QFile::remove(tmpPath + "libZjBase.so");
// QFile::copy(curPath + "libZjBase.so", tmpPath + "libZjBase.so");
// QFile::remove(tmpPath + "libZjVersion.so");
// QFile::copy(curPath + "libZjVersion.so", tmpPath + "libZjVersion.so");
// #elif defined(OEM_ZIGUANG)
// QFile::remove(tmpPath + "ZgUpgradeApp");
// QFile::copy(curPath + "ZgUpgradeApp", tmpPath + "ZgUpgradeApp");
// QFile::remove(tmpPath + "libZgBase.so");
// QFile::copy(curPath + "libZgBase.so", tmpPath + "libZgBase.so");
// QFile::remove(tmpPath + "libZgVersion.so");
// QFile::copy(curPath + "libZgVersion.so", tmpPath + "libZgVersion.so");
// #else
QFile::remove(tmpPath + "HGUpgradeApp");
QFile::copy(curPath + "HGUpgradeApp", tmpPath + "HGUpgradeApp");

View File

@ -36,7 +36,11 @@ if (contains(DEFINES, OEM_HANWANG)) {
if (contains(DEFINES, OEM_ZIGUANG)) {
RC_ICONS = ../../../app/demo/image_rsc/logo/uniscan.ico
} else {
RC_ICONS = ../../../app/demo/image_rsc/logo/logo.ico
if (contains(DEFINES, OEM_HUAGAO_NEU)) {
RC_ICONS = ../../../app/demo/image_rsc/logo/RightWay_logo.ico
} else {
RC_ICONS = ../../../app/demo/image_rsc/logo/logo.ico
}
}
}
}

View File

@ -36,7 +36,11 @@ if (contains(DEFINES, OEM_HANWANG)) {
if (contains(DEFINES, OEM_ZIGUANG)) {
RC_ICONS = ../../../app/fwupgrade/image_rsc/logo/uniscan.ico
} else {
RC_ICONS = ../../../app/fwupgrade/image_rsc/logo/logo.ico
if (contains(DEFINES, OEM_HUAGAO_NEU)) {
RC_ICONS = ../../../app/fwupgrade/image_rsc/logo/RightWay_logo.ico
} else {
RC_ICONS = ../../../app/fwupgrade/image_rsc/logo/logo.ico
}
}
}
}

View File

@ -31,10 +31,17 @@ if (contains(DEFINES, OEM_HANWANG)) {
OEM_PREFIX3 = zg
OEM_NAME = unis
} else {
OEM_PREFIX = HG
OEM_PREFIX2 = HG
OEM_PREFIX3 = hg
OEM_NAME = huagao
if (contains(DEFINES, OEM_HUAGAO_NEU)) {
OEM_PREFIX = HGNeu
OEM_PREFIX2 = HGNeu
OEM_PREFIX3 = hgneu
OEM_NAME = huagaoneu
} else {
OEM_PREFIX = HG
OEM_PREFIX2 = HG
OEM_PREFIX3 = hg
OEM_NAME = huagao
}
}
}
}

View File

@ -41,8 +41,13 @@ if (contains(DEFINES, OEM_HANWANG)) {
RC_ICONS = ../../../app/scanner/image_rsc/logo/uniscan.ico
TARGET = UniScan
} else {
RC_ICONS = ../../../app/scanner/image_rsc/logo/logo.ico
TARGET = HuaGoScan
if (contains(DEFINES, OEM_HUAGAO_NEU)) {
RC_ICONS = ../../../app/scanner/image_rsc/logo/RightWay_logo.ico
TARGET = HGScan
} else {
RC_ICONS = ../../../app/scanner/image_rsc/logo/logo.ico
TARGET = HuaGoScan
}
}
}
}

View File

@ -36,7 +36,11 @@ if (contains(DEFINES, OEM_HANWANG)) {
if (contains(DEFINES, OEM_ZIGUANG)) {
RC_ICONS = ../../../app/upgrade/image_rsc/logo/uniscan.ico
} else {
RC_ICONS = ../../../app/upgrade/image_rsc/logo/logo.ico
if (contains(DEFINES, OEM_HUAGAO_NEU)) {
RC_ICONS = ../../../app/upgrade/image_rsc/logo/RightWay_logo.ico
} else {
RC_ICONS = ../../../app/upgrade/image_rsc/logo/logo.ico
}
}
}
}

Binary file not shown.

Binary file not shown.

View File

@ -9,6 +9,7 @@ HG_DECLARE_HANDLE(HGVersionMgr);
#define HGVERSION_APPNAME_SCANNER "Scanner"
#define HGVERSION_OEMNAME_HUAGO "Huago"
#define HGVERSION_OEMNAME_HUAGAO_NEU "HuagoNeu"
#define HGVERSION_OEMNAME_HANVON "Hanvon"
#define HGVERSION_OEMNAME_LANXUM "Lanxum"
#define HGVERSION_OEMNAME_CUMTENN "Cumtenn"