diff --git a/app/scanner/Scanner_zh_CN.qm b/app/scanner/Scanner_zh_CN.qm index ada8edd5..f1a38dcc 100644 Binary files a/app/scanner/Scanner_zh_CN.qm and b/app/scanner/Scanner_zh_CN.qm differ diff --git a/app/scanner/Scanner_zh_CN.ts b/app/scanner/Scanner_zh_CN.ts index 2f4cff73..63168743 100644 --- a/app/scanner/Scanner_zh_CN.ts +++ b/app/scanner/Scanner_zh_CN.ts @@ -317,25 +317,25 @@ 所有页 - - - - + + + + e.g. '%1%2' 例如.“%1%2” - + ok 确定 - + cancel 取消 - + Browse directory 文件夹路径 @@ -483,14 +483,12 @@ Continue to clear? Dialog_Export - ok - 确定 + 确定 - cancel - 取消 + 取消 @@ -543,9 +541,9 @@ Page range will be "Chosen Pages". 多页保存(TIFF/PDF/OFD/GIF) - - - + + + Input is not valid. Page range will be 'Chosen Pages'. 输入无效。 @@ -565,17 +563,17 @@ Page range will be 'Chosen Pages'. 停止导出 - + export failed: 导出失败: - + tip 提示 - + export succeed 导出完成 @@ -1582,12 +1580,12 @@ Please make sure the two passwords are the same. - + save, do not remind again 保存并不再提醒 - + modified, save it? 图像已被修改,是否保存修改? @@ -2229,49 +2227,49 @@ bug description: 删除选中项 - + HuaGoScan 华高扫描软件 - + Grid 多列显示 - + Move To... 移动到... - + Insert files 插入文件 - - - + + + nodevice 没有发现扫描仪 - - + - - + + + Question 询问 - + modified, save it? 图像已被修改。 是否保存修改? - + file lost, remove it? 文件已丢失,是否删除? @@ -2280,7 +2278,7 @@ bug description: 已连接 - + disconnected 已断开连接 @@ -2297,17 +2295,17 @@ bug description: 扫描完成 - + Clear, then start scan 清空并启动扫描 - + Do NOT clear, then start scan 不清空并启动扫描 - + Already exist images in image list. Do you want to clear? 图像列表中已存在图像。 @@ -2322,12 +2320,12 @@ Do you want to clear? 磁盘空间不足,请删除不需要的文件,以保证有足够的空间 - + Open images 打开图片 - + Insert images 插入图片 @@ -2340,259 +2338,265 @@ Do you want to clear? 保存失败 - + binary 黑白 - + gray 256级灰度 - + rgb 24位彩色 - - - - - - - - - - + + + + + + + + + + Please wake up the device manually 请手动唤醒设备 - + thumbnailBar enabled 显示缩略图栏 - + thumbnailBar hidden 隐藏缩略图栏 - + cancel 取消 - - - + + + save succeed 保存成功 - - + + find savePath in thumbnail 图片名在列表中已存在 - + Please select at least one picture before export 请至少选中一张图片再进行导出 - + File name 文件名 - + File path 文件路径 - + File size 文件大小 - + Creation date/time 创建时间 - + Modified date/time 修改时间 - + Accessed date/time 访问时间 - + Format 格式 - + Width 宽度 - + Height 高度 - + depth 深度 - + Color model 色彩模式 - + DPI 每英寸像素点 - + Print size 打印尺寸 - + Frame - + None - + Mono 黑白 - + Gray 灰度 - + Color 彩色 - + Warning 警告 - + Device is Running! Please finish scanning first. 设备正在运行! 请先结束扫描。 - + + cache path folder limit:%1 + 无法访问当前缓存路径:%1 +请尝试在【用户】菜单登录管理员账户,前往【缓存设置】更改缓存路径。 + + + + aquireinto folder limit:%1 + 无法访问当前缓存路径:%1 +请尝试在【扫描到】更改缓存路径。 + + + Image processing failed 图像处理失败 - + Ocr init failed OCR初始化错误 - + Ocr failed OCR错误 - + File does not exist 文件不存在 - + Failed to load dynamic library 加载动态库失败 - + File data error 文件数据错误 - + Image format processing error 图像格式处理错误 - + Out of memory 内存不足 - + Failed 错误 - + The language switch is successful and takes effect the next time the software is started! 语言切换成功,下次启动软件时生效! - + Are you sure to delete selected file? 您确定彻底删除选中项文件? - - - - - - - - - - + + + + + + + + + + already waked up device 已唤醒设备 - + be ready 就绪 - - - - - - folder limit - 无法访问“我的文档”, -请前往“扫描至”更换可访问的扫描目录再进行扫描。 + 无法访问当前缓存路径 +请尝试在【用户】菜单登录管理员账户,前往【缓存设置】更改缓存路径 - + Insufficient access rights 文件访问权限不足 @@ -2605,47 +2609,46 @@ Please finish scanning first. 图像处理失败 - + Are you sure to close 您确定要断开设备: - + ? 吗? - - + + close 关闭 - + tip 提示 - + Other versions not available 未获取到其他版本 - - + + The device does not support this operation 设备不支持该操作 - - + + IO error IO错误 - - - + + error 错误 @@ -2660,17 +2663,17 @@ Continue to close? 是否继续关闭? - + Sure to sign out administrator account? 是否确定登出管理员账户? - + confirm the operation 确认操作 - + Are you sure to clear the rollor acount? 你确定要清除滚轴计数吗 @@ -2679,36 +2682,36 @@ Continue to close? 请重新进入关于界面以获取最新值 - - + + <p>%1: <a href='%2'>%3</a> - - + + <p>%1: %2 - + roller number 滚轴张数 - + open scanner 打开扫描仪 - - + + app name 华高扫描软件 - - + + success 成功 @@ -2725,22 +2728,22 @@ Continue to close? 失败 - - + + failed 失败 - - - + + + warning 警告 - - - + + + the disk space in the current path is unsufficient, please select a new path or clear the disk space in time. 当前路径磁盘空间不足, 请重新选择路径或及时清理磁盘空间。 @@ -2750,116 +2753,116 @@ Continue to close? 配置丢失 - + apply setting 应用配置 - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + start failed 启动失败 - + HanvonScan 汉王扫描软件 - + LanxumScan 立思辰扫描软件 - + CumtennScan 沧田扫描软件 - + MicrotekScan Microtek DocWizard EX 扫描软件 - + menu_language 语言 - + act_simpCN 简体中文 - + act_English English - + auto save 自动保存 - + when switching pictures, save the edited pictures directly without reminding 切换图片时,不提醒,直接保存编辑过的图片 - + statusBar displayed 显示状态栏 - + statusBar hidden 隐藏状态栏 - + toolBar displayed 显示工具栏 - + toolBar hidden 隐藏工具栏 - + colorInfo enabled 启用图像信息 - + colorInfo disenabled 关闭图像信息 - + enabling automatic saving 启用自动保存 - + cancel auto save 取消自动保存 - + Automatically save the edited the edited iamge when switching pictures. To cancel, uncheck the menu item: image-> automatically save 切换图片时,自动保存编辑过的图像。若想取消,请取消勾选菜单项:图像->自动保存 @@ -2880,26 +2883,26 @@ Continue to close? 发现设备 - + reconnected 重新连接 - + already connected, but open faild 已经连接,但打开失败 - - + + save image failed: 存图失败: - - - - + + + + create savepath failed: 创建文件夹失败: @@ -2908,102 +2911,102 @@ Continue to close? %1%2%3.%4 - - + + create image doc failed: 创建图片文件失败: - - - - - - - - - - - - - + + + + + + + + + + + + + save image doc failed: 保存图片文件失败: - + start failed! 启动安装程序失败! - + There are pictures that have not been saved. Are you sure to close? 有图像未保存,确定关闭? - + found device : %1 发现设备 : %1 - - - - - - - - - - - + + + + + + + + + + - + + tips 提示 - + Are you sure to close? 确定关闭应用软件? - + confirm operation 确认操作 - + are you sure to clear the roller count? 您确定要清除滚轴计数吗 - - - + + + hint 提示 - - + + Roller scanned count has been set to 0. 辊轴计数已置零 - - + + Roller scanned count reset failed. 重置滚轴计数失败 - + Error 错误 - + Document missing! It would be deleted or renamed. 文档丢失!文档可能已被删除或被重命名。 @@ -3044,21 +3047,21 @@ Are you sure to close? <p>%1</p><p>版本: %2<br>版权: &#169; %3</p><p>%4%5%6%7%8%9</p> - - + + about %1 关于 %1 - - + + <p>Version: %1</p> <p>版本: %1</p> <p>版本: %1</p> - - + + <p>CopyRight: &#169; %1</p> <p>版权: &#169; %1</p> <p>版权: &#169; %1</p> diff --git a/app/scanner/Scanner_zh_EN.qm b/app/scanner/Scanner_zh_EN.qm index 9fd1b1ac..f8a66a9e 100644 Binary files a/app/scanner/Scanner_zh_EN.qm and b/app/scanner/Scanner_zh_EN.qm differ diff --git a/app/scanner/Scanner_zh_EN.ts b/app/scanner/Scanner_zh_EN.ts index 672ea0d4..5572be5d 100644 --- a/app/scanner/Scanner_zh_EN.ts +++ b/app/scanner/Scanner_zh_EN.ts @@ -313,25 +313,25 @@ User custom pages - - - - + + + + e.g. '%1%2' For example"%1%2" - + ok OK - + cancel Cancel - + Browse directory Folder path @@ -514,19 +514,17 @@ The page range will be “selected pages” Compression options - ok - OK + OK - cancel - Cancel + Cancel - - - + + + Input is not valid. Page range will be 'Chosen Pages'. Input invalid. @@ -546,17 +544,17 @@ The page range will be “selected pages” Stop exporting - + export succeed Export completed - + export failed: Export failed: - + tip Prompt @@ -1502,12 +1500,12 @@ Please make sure the two passwords are the same. No - + save, do not remind again Save and do not prompt again - + modified, save it? Image modified, save changes? @@ -2072,133 +2070,133 @@ Please make sure the two passwords are the same. Delete selected item - + HanvonScan Hanvon scanning software - + LanxumScan LANXUM scanning software - + CumtennScan CUMTENN scanning software - + MicrotekScan Microtek DocWizard EX V1.0 - + HuaGoScan HUAGOSCAN scanning software - + menu_language Language - + act_simpCN 简体中文 - + act_English English - + Grid Multi-column display - + Move To... Move to... - + Insert files Insert file - - - + + + nodevice No scanner detected - + auto save Auto save - + when switching pictures, save the edited pictures directly without reminding Do not show prompt and save the edited images directly when switching images. - + statusBar displayed Show status bar - + statusBar hidden Hide status bar - + toolBar displayed Show toolbar - + toolBar hidden Hide toolbar - + colorInfo enabled Enable image information - + colorInfo disenabled Disable image information - + enabling automatic saving Enable auto save - + cancel auto save Cancel auto save - + Automatically save the edited the edited iamge when switching pictures. To cancel, uncheck the menu item: image-> automatically save Save edited images automatically when switching images. If you want to cancel, please deselect the menu item: Auto save images. - - + - - + + + Question Ask - + modified, save it? Image modified, save changes? @@ -2215,7 +2213,7 @@ Please make sure the two passwords are the same. No - + file lost, remove it? File lost; delete? @@ -2224,383 +2222,395 @@ Please make sure the two passwords are the same. Device discovered - + found device : %1 Device discovered: %1 - + reconnected reconnect - + already connected, but open faild connected, but failed to open - + disconnected disconnected - - - + + + the disk space in the current path is unsufficient, please select a new path or clear the disk space in time. Insufficient disk space for the current path. Please reselect a path or clear disk space immediately. - - - + + + warning Warning - - + + save image failed: Failed to save image: - - - - + + + + create savepath failed: Failed to create folder: - - + + create image doc failed: Failed to create image file: - - - - - - - - - - - - - + + + + + + + + + + + + + save image doc failed: Failed to save image: - + binary Black and white - + gray Grayscale - + rgb Color - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + start failed Failed to start - - - - - - - - - - + + + + + + + + + + Please wake up the device manually Please wake up the device manually - - - - - - - - - - + + + + + + + + + + already waked up device Device is awake - + thumbnailBar enabled Show thumbnail bar - + thumbnailBar hidden Hide thumbnail bar - + Clear, then start scan Clear and start scan - + Do NOT clear, then start scan Do not clear and start scan - + cancel Cancel - + Already exist images in image list. Do you want to clear? Image already exists in the list of images. Clear? - + Open images Open image - + Insert images Insert image - - - - - - - - - - - + + + + + + + + + + - + + tips prompt - - - + + + save succeed Saved successfully - - + + find savePath in thumbnail Image name already exists in the list - + Please select at least one picture before export Please select at least one image and then export - + File name File name - + File path File path - + File size File size - + Creation date/time Creation time - + Modified date/time Modification time - + Accessed date/time Access time - + Format Format - + Width Width - + Height Height - + depth Depth - + Color model Color mode - + DPI Pixels per inch - + Print size Print size - + Frame Frame - + None None - + Mono Black and white - + Gray Gray scale - + Color Color - + Warning Warning - + Device is Running! Please finish scanning first. Device is currently running! Please stop scanning first. - + There are pictures that have not been saved. Are you sure to close? There are unsaved images; are you sure you want to close? - + Are you sure to close? Are you sure you want to close? - + Sure to sign out administrator account? Are you sure you want to log out of the administrator account? - + confirm operation Confirm operation - + are you sure to clear the roller count? Are you sure you want to clear the roller count? - - - + + + hint Prompt - - + + Roller scanned count has been set to 0. Roller count reset to zero. - - + + Roller scanned count reset failed. Failed to reset roller count. - + Error Error - + Document missing! It would be deleted or renamed. File lost! File may be deleted or renamed. - + confirm the operation Confirm operation - + Are you sure to clear the rollor acount? Are you sure you want to clear the roller count? + + + cache path folder limit:%1 + Unable to access the current path:%1 +Please try to log in to the administrator account in the [User] menu and go to the [Cache settings] to change the cache path. + + + + aquireinto folder limit:%1 + Unable to access the current path:%1 +Please try to change the cache path in [Scan to]. + About %1 About %1 @@ -2610,192 +2620,185 @@ Are you sure to close? <p>%1</p><p>Version: %2<br>Copyright: &#169; %3</p><p>%4%5%6%7%8%9</p> - - + + about %1 About %1 - - + + <p>Version: %1</p> <p>Version: %1</p> - - + + <p>CopyRight: &#169; %1</p> <p>Copyright: &#169; %1</p> - - + + <p>%1: <a href='%2'>%3</a> <p>%1: <a href='%2'>%3</a> - - + + <p>%1: %2 <p>%1: %2 - + roller number Number of rollers - + open scanner Open scanner - - + + app name HUAGOSCAN scanning software - - + + success successfully - + be ready Ready - - + + failed failed - - - + + error Error - + start failed! Failed to start! - - - - - - folder limit - Cannot access “My Documents”. + Cannot access “My Documents”. Please go to “Scan to” and change the accessible scan folder and then perform the scan. - + Insufficient access rights Insufficient file access permissions - + Image processing failed Image processing failed - + Ocr init failed OCR initialization error - + Ocr failed OCR failed - + File does not exist File does not exist - + Failed to load dynamic library Failed to load dynamic library - + File data error File data error - + Image format processing error Image format processing error - + Out of memory Insufficient memory - + Failed Failed - + apply setting Apply configuration - + Are you sure to close Are you sure you want to disconnect device: - + ? ? - - + + close Close - + tip Prompt - + Other versions not available No other versions obtained - - + + The device does not support this operation Device does not support this operation - - + + IO error IO error - + The language switch is successful and takes effect the next time the software is started! The language switch is successful and takes effect the next time the software is started! - + Are you sure to delete selected file? Are you sure to delete the selected file completely? diff --git a/app/scanner/mainwindow.cpp b/app/scanner/mainwindow.cpp index f1bb9451..ebffc003 100644 --- a/app/scanner/mainwindow.cpp +++ b/app/scanner/mainwindow.cpp @@ -128,15 +128,17 @@ MainWindow::MainWindow(const QString& appLang, QWidget *parent) resize(950, 720); } - if (!m_versionDll->IsValid()) - { - ui->actionact_update->setVisible(false); - ui->act_feedback->setVisible(false); - } - else + ui->actionact_update->setVisible(false); + ui->act_feedback->setVisible(false); + +#if defined(OEM_HUAGAO) + if (m_versionDll->IsValid()) { + ui->actionact_update->setVisible(true); + ui->act_feedback->setVisible(true); m_versionDll->PostUserOpenInfo(HGVERSION_APPNAME_SCANNER, m_oemName); } +#endif HGChar cfgpath[512] = {0}; QString old; @@ -1309,9 +1311,19 @@ void MainWindow::on_export_scanned_image(void) void MainWindow::on_continueScan() { - if(!isLimitAccessFolder("")) + if (1 == m_scanType) { - return; + if(!isLimitAccessFolder(1)) + { + return; + } + } + else if (2 == m_scanType) + { + if(!isLimitAccessFolder(2)) + { + return; + } } if (!dev_que_.is_online() || m_isScanning || 0 == m_scanType) @@ -3218,7 +3230,7 @@ void MainWindow::on_act_scannerSettings_triggered() void MainWindow::on_act_acquire_triggered() { - if(!isLimitAccessFolder("")) + if(!isLimitAccessFolder(1)) { return; } @@ -3296,7 +3308,7 @@ void MainWindow::on_act_acquire_triggered() void MainWindow::on_act_acquireSingle_triggered() { - if(!isLimitAccessFolder("")) + if(!isLimitAccessFolder(1)) { return; } @@ -3408,7 +3420,7 @@ void MainWindow::on_act_acquireInto_triggered() // m_aquireIntoSaveParam.m_savePath = getStdFileName(m_aquireIntoSaveParam.m_savePath + dateTime.toString("yyyyMMddhhmmss") + "/"); - if(!isLimitAccessFolder(m_aquireIntoSaveParam.m_savePath)) + if(!isLimitAccessFolder(2)) { return; } @@ -3469,7 +3481,7 @@ void MainWindow::on_act_acquireInto_triggered() void MainWindow::on_act_insertFromScanner_triggered() { - if(!isLimitAccessFolder("")) + if(!isLimitAccessFolder(1)) { return; } @@ -3733,42 +3745,43 @@ void MainWindow::upgradeApp(QString pkgPath) QString tmpPath(tmpPath2); #if defined(HG_CMP_MSC) - #if defined(OEM_HANWANG) - QFile::remove(tmpPath + "HwUpgradeApp.exe"); - QFile::copy(curPath + "HwUpgradeApp.exe", tmpPath + "HwUpgradeApp.exe"); - QFile::remove(tmpPath + "HwBase.dll"); - QFile::copy(curPath + "HwBase.dll", tmpPath + "HwBase.dll"); - QFile::remove(tmpPath + "HwVersion.dll"); - QFile::copy(curPath + "HwVersion.dll", tmpPath + "HwVersion.dll"); - #elif defined(OEM_LISICHENG) - QFile::remove(tmpPath + "LscUpgradeApp.exe"); - QFile::copy(curPath + "LscUpgradeApp.exe", tmpPath + "LscUpgradeApp.exe"); - QFile::remove(tmpPath + "LscBase.dll"); - QFile::copy(curPath + "LscBase.dll", tmpPath + "LscBase.dll"); - QFile::remove(tmpPath + "LscVersion.dll"); - QFile::copy(curPath + "LscVersion.dll", tmpPath + "LscVersion.dll"); - #elif defined(OEM_CANGTIAN) - QFile::remove(tmpPath + "CtsUpgradeApp.exe"); - QFile::copy(curPath + "CtsUpgradeApp.exe", tmpPath + "CtsUpgradeApp.exe"); - QFile::remove(tmpPath + "CtsBase.dll"); - QFile::copy(curPath + "CtsBase.dll", tmpPath + "CtsBase.dll"); - QFile::remove(tmpPath + "CtsVersion.dll"); - QFile::copy(curPath + "CtsVersion.dll", tmpPath + "CtsVersion.dll"); - #elif defined(OEM_ZHONGJING) - QFile::remove(tmpPath + "ZJUpgradeApp.exe"); - QFile::copy(curPath + "ZJUpgradeApp.exe", tmpPath + "ZJUpgradeApp.exe"); - QFile::remove(tmpPath + "ZJBase.dll"); - QFile::copy(curPath + "ZJBase.dll", tmpPath + "ZJBase.dll"); - QFile::remove(tmpPath + "ZJVersion.dll"); - QFile::copy(curPath + "ZJVersion.dll", tmpPath + "ZJVersion.dll"); - #else +// #if defined(OEM_HANWANG) +// QFile::remove(tmpPath + "HwUpgradeApp.exe"); +// QFile::copy(curPath + "HwUpgradeApp.exe", tmpPath + "HwUpgradeApp.exe"); +// QFile::remove(tmpPath + "HwBase.dll"); +// QFile::copy(curPath + "HwBase.dll", tmpPath + "HwBase.dll"); +// QFile::remove(tmpPath + "HwVersion.dll"); +// QFile::copy(curPath + "HwVersion.dll", tmpPath + "HwVersion.dll"); +// #elif defined(OEM_LISICHENG) +// QFile::remove(tmpPath + "LscUpgradeApp.exe"); +// QFile::copy(curPath + "LscUpgradeApp.exe", tmpPath + "LscUpgradeApp.exe"); +// QFile::remove(tmpPath + "LscBase.dll"); +// QFile::copy(curPath + "LscBase.dll", tmpPath + "LscBase.dll"); +// QFile::remove(tmpPath + "LscVersion.dll"); +// QFile::copy(curPath + "LscVersion.dll", tmpPath + "LscVersion.dll"); +// #elif defined(OEM_CANGTIAN) +// QFile::remove(tmpPath + "CtsUpgradeApp.exe"); +// QFile::copy(curPath + "CtsUpgradeApp.exe", tmpPath + "CtsUpgradeApp.exe"); +// QFile::remove(tmpPath + "CtsBase.dll"); +// QFile::copy(curPath + "CtsBase.dll", tmpPath + "CtsBase.dll"); +// QFile::remove(tmpPath + "CtsVersion.dll"); +// QFile::copy(curPath + "CtsVersion.dll", tmpPath + "CtsVersion.dll"); +// #elif defined(OEM_ZHONGJING) +// QFile::remove(tmpPath + "ZJUpgradeApp.exe"); +// QFile::copy(curPath + "ZJUpgradeApp.exe", tmpPath + "ZJUpgradeApp.exe"); +// QFile::remove(tmpPath + "ZJBase.dll"); +// QFile::copy(curPath + "ZJBase.dll", tmpPath + "ZJBase.dll"); +// QFile::remove(tmpPath + "ZJVersion.dll"); +// QFile::copy(curPath + "ZJVersion.dll", tmpPath + "ZJVersion.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"); - #endif +// #endif QFile::remove(tmpPath + "msvcp140.dll"); QFile::copy(curPath + "msvcp140.dll", tmpPath + "msvcp140.dll"); @@ -3792,42 +3805,42 @@ void MainWindow::upgradeApp(QString pkgPath) QFile::remove(tmpPath + "imageformats/qgif.dll"); QFile::copy(curPath + "imageformats/qgif.dll", tmpPath + "imageformats/qgif.dll"); #else - #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"); - #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"); - #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"); - #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"); - #else +// #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"); +// #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"); +// #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"); +// #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"); +// #else QFile::remove(tmpPath + "HGUpgradeApp"); QFile::copy(curPath + "HGUpgradeApp", tmpPath + "HGUpgradeApp"); //QFile::remove(tmpPath + "libHGBase.so"); //QFile::copy(curPath + "libHGBase.so", tmpPath + "libHGBase.so"); //QFile::remove(tmpPath + "libHGVersion.so"); //QFile::copy(curPath + "libHGVersion.so", tmpPath + "libHGVersion.so"); - #endif +// #endif #endif QProcess proc; @@ -3840,29 +3853,29 @@ void MainWindow::upgradeApp(QString pkgPath) argList.push_back(QString("-language=%1").arg(m_currLang.toStdString().c_str())); #if defined(HG_CMP_MSC) - #if defined(OEM_HANWANG) - isSuccessdStart = proc.startDetached(tmpPath + "HwUpgradeApp.exe", argList); - #elif defined(OEM_LISICHENG) - isSuccessdStart = proc.startDetached(tmpPath + "LscUpgradeApp.exe", argList); - #elif defined(OEM_CANGTIAN) - isSuccessdStart = proc.startDetached(tmpPath + "CtsUpgradeApp.exe", argList); - #elif defined(OEM_ZHONGJING) - isSuccessdStart = proc.startDetached(tmpPath + "ZJUpgradeApp.exe", argList); - #else +// #if defined(OEM_HANWANG) +// isSuccessdStart = proc.startDetached(tmpPath + "HwUpgradeApp.exe", argList); +// #elif defined(OEM_LISICHENG) +// isSuccessdStart = proc.startDetached(tmpPath + "LscUpgradeApp.exe", argList); +// #elif defined(OEM_CANGTIAN) +// isSuccessdStart = proc.startDetached(tmpPath + "CtsUpgradeApp.exe", argList); +// #elif defined(OEM_ZHONGJING) +// isSuccessdStart = proc.startDetached(tmpPath + "ZJUpgradeApp.exe", argList); +// #else isSuccessdStart = proc.startDetached(tmpPath + "HGUpgradeApp.exe", argList); - #endif +// #endif #else - #if defined(OEM_HANWANG) - isSuccessdStart = proc.startDetached(tmpPath + "HwUpgradeApp", argList); - #elif defined(OEM_LISICHENG) - isSuccessdStart = proc.startDetached(tmpPath + "LscUpgradeApp", argList); - #elif defined(OEM_CANGTIAN) - isSuccessdStart = proc.startDetached(tmpPath + "CtsUpgradeApp", argList); - #elif defined(OEM_ZHONGJING) - isSuccessdStart = proc.startDetached(tmpPath + "ZjUpgradeApp", argList); - #else +// #if defined(OEM_HANWANG) +// isSuccessdStart = proc.startDetached(tmpPath + "HwUpgradeApp", argList); +// #elif defined(OEM_LISICHENG) +// isSuccessdStart = proc.startDetached(tmpPath + "LscUpgradeApp", argList); +// #elif defined(OEM_CANGTIAN) +// isSuccessdStart = proc.startDetached(tmpPath + "CtsUpgradeApp", argList); +// #elif defined(OEM_ZHONGJING) +// isSuccessdStart = proc.startDetached(tmpPath + "ZjUpgradeApp", argList); +// #else isSuccessdStart = proc.startDetached(tmpPath + "HGUpgradeApp", argList); - #endif +// #endif #endif if (isSuccessdStart) @@ -3879,49 +3892,45 @@ void MainWindow::upgradeApp(QString pkgPath) } } -bool MainWindow::isLimitAccessFolder(QString filePath) +bool MainWindow::isLimitAccessFolder(int type) { - HGChar documentsPath[512]; - HGBase_GetDocumentsPath(documentsPath, 512); - HGChar procName[512]; - HGBase_GetProcessName(procName, 512); - strcat(documentsPath, procName); - HGBase_CreateDir(getStdString(documentsPath).c_str()); + QString cachePath = Dialog_ClrCache::getCachePath(); + QString aquireIntoPath = m_aquireIntoSaveParam.m_savePath; + QString filePath; HGChar uuid[512]; HGBase_GetUuid(uuid, 512); - strcat(documentsPath, "/"); - strcat(documentsPath, uuid); - HGResult ret = HGBase_CreateDir(getStdString(documentsPath).c_str()); - if(ret != HGBASE_ERR_OK) + + if (1 == type) { - if(!filePath.isEmpty()) + filePath = cachePath + uuid; + } + else if (2 == type) + { + filePath = aquireIntoPath + uuid; + } + + HGResult ret = HGBase_CreateDir(getStdString(filePath).c_str()); + if (ret != HGBASE_ERR_OK) + { + QString info; + if (1 == type) { - HGChar uuid2[512]; - HGBase_GetUuid(uuid2, 512); - filePath += uuid2; - ret = HGBase_CreateDir(getStdString(filePath).c_str()); - if (ret != HGBASE_ERR_OK) - { - QMessageBox::critical(this, tr("error"), tr("folder limit")); - m_dialogLog->addLog(tr("folder limit"), true); - m_wndStatusBar->setDeviceStatusInfo(tr("folder limit"), true); - return false; - } - else - { - HGBase_DeleteDir(getStdString(filePath).c_str()); - } - return true; + info = tr("cache path folder limit:%1").arg(cachePath); } - QMessageBox::critical(this, tr("error"), tr("folder limit")); - m_dialogLog->addLog(tr("folder limit"), true); - m_wndStatusBar->setDeviceStatusInfo(tr("folder limit"), true); + else if (2 == type) + { + info = tr("aquireinto folder limit:%1").arg(aquireIntoPath); + } + + QMessageBox::critical(this, tr("error"), info); + m_dialogLog->addLog(info, true); + m_wndStatusBar->setDeviceStatusInfo(info, true); return false; } else { - HGBase_DeleteDir(getStdString(documentsPath).c_str()); + HGBase_DeleteDir(getStdString(filePath).c_str()); } return true; } diff --git a/app/scanner/mainwindow.h b/app/scanner/mainwindow.h index 9bf95592..5ce10320 100644 --- a/app/scanner/mainwindow.h +++ b/app/scanner/mainwindow.h @@ -268,7 +268,7 @@ private: bool open_scanner(const QString& name, const QString& scheme); bool judgeDiskSpace(QString currentPath, bool showDlg = true); void upgradeApp(QString pkgPath); - bool isLimitAccessFolder(QString filePath); + bool isLimitAccessFolder(int type); //type:1-aquire,2-aquireInto static QString GetDevType(const QString& fwVersion, bool &canLock); void upgradeFwAndLockDevice(); void deleteOverdueLogFile(const QString& logFilePath);