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 @@
所有页
-
-
-
-
+
+
+
+
例如.“%1%2”
-
+
确定
-
+
取消
-
+
文件夹路径
@@ -483,14 +483,12 @@ Continue to clear?
Dialog_Export
-
- 确定
+ 确定
-
- 取消
+ 取消
@@ -543,9 +541,9 @@ Page range will be "Chosen Pages".
多页保存(TIFF/PDF/OFD/GIF)
-
-
-
+
+
+
输入无效。
@@ -565,17 +563,17 @@ Page range will be 'Chosen Pages'.
停止导出
-
+
导出失败:
-
+
提示
-
+
导出完成
@@ -1582,12 +1580,12 @@ Please make sure the two passwords are the same.
否
-
+
保存并不再提醒
-
+
图像已被修改,是否保存修改?
@@ -2229,49 +2227,49 @@ bug description:
删除选中项
-
+
华高扫描软件
-
+
多列显示
-
+
移动到...
-
+
插入文件
-
-
-
+
+
+
没有发现扫描仪
-
-
+
-
-
+
+
+
询问
-
+
图像已被修改。
是否保存修改?
-
+
文件已丢失,是否删除?
@@ -2280,7 +2278,7 @@ bug description:
已连接
-
+
已断开连接
@@ -2297,17 +2295,17 @@ bug description:
扫描完成
-
+
清空并启动扫描
-
+
不清空并启动扫描
-
+
图像列表中已存在图像。
@@ -2322,12 +2320,12 @@ Do you want to clear?
磁盘空间不足,请删除不需要的文件,以保证有足够的空间
-
+
打开图片
-
+
插入图片
@@ -2340,259 +2338,265 @@ Do you want to clear?
保存失败
-
+
黑白
-
+
256级灰度
-
+
24位彩色
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
请手动唤醒设备
-
+
显示缩略图栏
-
+
隐藏缩略图栏
-
+
取消
-
-
-
+
+
+
保存成功
-
-
+
+
图片名在列表中已存在
-
+
请至少选中一张图片再进行导出
-
+
文件名
-
+
文件路径
-
+
文件大小
-
+
创建时间
-
+
修改时间
-
+
访问时间
-
+
格式
-
+
宽度
-
+
高度
-
+
深度
-
+
色彩模式
-
+
每英寸像素点
-
+
打印尺寸
-
+
帧
-
+
无
-
+
黑白
-
+
灰度
-
+
彩色
-
+
警告
-
+
设备正在运行!
请先结束扫描。
-
+
+
+ 无法访问当前缓存路径:%1
+请尝试在【用户】菜单登录管理员账户,前往【缓存设置】更改缓存路径。
+
+
+
+
+ 无法访问当前缓存路径:%1
+请尝试在【扫描到】更改缓存路径。
+
+
+
图像处理失败
-
+
OCR初始化错误
-
+
OCR错误
-
+
文件不存在
-
+
加载动态库失败
-
+
文件数据错误
-
+
图像格式处理错误
-
+
内存不足
-
+
错误
-
+
语言切换成功,下次启动软件时生效!
-
+
您确定彻底删除选中项文件?
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
已唤醒设备
-
+
就绪
-
-
-
-
-
-
- 无法访问“我的文档”,
-请前往“扫描至”更换可访问的扫描目录再进行扫描。
+ 无法访问当前缓存路径
+请尝试在【用户】菜单登录管理员账户,前往【缓存设置】更改缓存路径
-
+
文件访问权限不足
@@ -2605,47 +2609,46 @@ Please finish scanning first.
图像处理失败
-
+
您确定要断开设备:
-
+
吗?
-
-
+
+
关闭
-
+
提示
-
+
未获取到其他版本
-
-
+
+
设备不支持该操作
-
-
+
+
IO错误
-
-
-
+
+
错误
@@ -2660,17 +2663,17 @@ Continue to close?
是否继续关闭?
-
+
是否确定登出管理员账户?
-
+
确认操作
-
+
你确定要清除滚轴计数吗
@@ -2679,36 +2682,36 @@ Continue to close?
请重新进入关于界面以获取最新值
-
-
+
+
-
-
+
+
-
+
滚轴张数
-
+
打开扫描仪
-
-
+
+
华高扫描软件
-
-
+
+
成功
@@ -2725,22 +2728,22 @@ Continue to close?
失败
-
-
+
+
失败
-
-
-
+
+
+
警告
-
-
-
+
+
+
当前路径磁盘空间不足,
请重新选择路径或及时清理磁盘空间。
@@ -2750,116 +2753,116 @@ Continue to close?
配置丢失
-
+
应用配置
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
启动失败
-
+
汉王扫描软件
-
+
立思辰扫描软件
-
+
沧田扫描软件
-
+
Microtek DocWizard EX 扫描软件
-
+
语言
-
+
简体中文
-
+
English
-
+
自动保存
-
+
切换图片时,不提醒,直接保存编辑过的图片
-
+
显示状态栏
-
+
隐藏状态栏
-
+
显示工具栏
-
+
隐藏工具栏
-
+
启用图像信息
-
+
关闭图像信息
-
+
启用自动保存
-
+
取消自动保存
-
+
切换图片时,自动保存编辑过的图像。若想取消,请取消勾选菜单项:图像->自动保存
@@ -2880,26 +2883,26 @@ Continue to close?
发现设备
-
+
重新连接
-
+
已经连接,但打开失败
-
-
+
+
存图失败:
-
-
-
-
+
+
+
+
创建文件夹失败:
@@ -2908,102 +2911,102 @@ Continue to close?
%1%2%3.%4
-
-
+
+
创建图片文件失败:
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
保存图片文件失败:
-
+
启动安装程序失败!
-
+
有图像未保存,确定关闭?
-
+
发现设备 : %1
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
+
提示
-
+
确定关闭应用软件?
-
+
确认操作
-
+
您确定要清除滚轴计数吗
-
-
-
+
+
+
提示
-
-
+
+
辊轴计数已置零
-
-
+
+
重置滚轴计数失败
-
+
错误
-
+
文档丢失!文档可能已被删除或被重命名。
@@ -3044,21 +3047,21 @@ Are you sure to close?
<p>%1</p><p>版本: %2<br>版权: © %3</p><p>%4%5%6%7%8%9</p>
-
-
+
+
关于 %1
-
-
+
+
<p>版本: %1</p>
<p>版本: %1</p>
-
-
+
+
<p>版权: © %1</p>
<p>版权: © %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
-
-
-
-
+
+
+
+
For example"%1%2"
-
+
OK
-
+
Cancel
-
+
Folder path
@@ -514,19 +514,17 @@ The page range will be “selected pages”
Compression options
-
- OK
+ OK
-
- Cancel
+ Cancel
-
-
-
+
+
+
Input invalid.
@@ -546,17 +544,17 @@ The page range will be “selected pages”
Stop exporting
-
+
Export completed
-
+
Export failed:
-
+
Prompt
@@ -1502,12 +1500,12 @@ Please make sure the two passwords are the same.
No
-
+
Save and do not prompt again
-
+
Image modified, save changes?
@@ -2072,133 +2070,133 @@ Please make sure the two passwords are the same.
Delete selected item
-
+
Hanvon scanning software
-
+
LANXUM scanning software
-
+
CUMTENN scanning software
-
+
Microtek DocWizard EX V1.0
-
+
HUAGOSCAN scanning software
-
+
Language
-
+
简体中文
-
+
English
-
+
Multi-column display
-
+
Move to...
-
+
Insert file
-
-
-
+
+
+
No scanner detected
-
+
Auto save
-
+
Do not show prompt and save the edited images directly when switching images.
-
+
Show status bar
-
+
Hide status bar
-
+
Show toolbar
-
+
Hide toolbar
-
+
Enable image information
-
+
Disable image information
-
+
Enable auto save
-
+
Cancel auto save
-
+
Save edited images automatically when switching images. If you want to cancel, please deselect the menu item: Auto save images.
-
-
+
-
-
+
+
+
Ask
-
+
Image modified, save changes?
@@ -2215,7 +2213,7 @@ Please make sure the two passwords are the same.
No
-
+
File lost; delete?
@@ -2224,383 +2222,395 @@ Please make sure the two passwords are the same.
Device discovered
-
+
Device discovered: %1
-
+
reconnect
-
+
connected, but failed to open
-
+
disconnected
-
-
-
+
+
+
Insufficient disk space for the current path.
Please reselect a path or clear disk space immediately.
-
-
-
+
+
+
Warning
-
-
+
+
Failed to save image:
-
-
-
-
+
+
+
+
Failed to create folder:
-
-
+
+
Failed to create image file:
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
Failed to save image:
-
+
Black and white
-
+
Grayscale
-
+
Color
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Failed to start
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
Please wake up the device manually
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
Device is awake
-
+
Show thumbnail bar
-
+
Hide thumbnail bar
-
+
Clear and start scan
-
+
Do not clear and start scan
-
+
Cancel
-
+
Image already exists in the list of images.
Clear?
-
+
Open image
-
+
Insert image
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
+
prompt
-
-
-
+
+
+
Saved successfully
-
-
+
+
Image name already exists in the list
-
+
Please select at least one image and then export
-
+
File name
-
+
File path
-
+
File size
-
+
Creation time
-
+
Modification time
-
+
Access time
-
+
Format
-
+
Width
-
+
Height
-
+
Depth
-
+
Color mode
-
+
Pixels per inch
-
+
Print size
-
+
Frame
-
+
None
-
+
Black and white
-
+
Gray scale
-
+
Color
-
+
Warning
-
+
Device is currently running!
Please stop scanning first.
-
+
There are unsaved images; are you sure you want to close?
-
+
Are you sure you want to close?
-
+
Are you sure you want to log out of the administrator account?
-
+
Confirm operation
-
+
Are you sure you want to clear the roller count?
-
-
-
+
+
+
Prompt
-
-
+
+
Roller count reset to zero.
-
-
+
+
Failed to reset roller count.
-
+
Error
-
+
File lost! File may be deleted or renamed.
-
+
Confirm operation
-
+
Are you sure you want to clear the roller count?
+
+
+
+ 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.
+
+
+
+
+ Unable to access the current path:%1
+Please try to change the cache path in [Scan to].
+
About %1
@@ -2610,192 +2620,185 @@ Are you sure to close?
<p>%1</p><p>Version: %2<br>Copyright: © %3</p><p>%4%5%6%7%8%9</p>
-
-
+
+
About %1
-
-
+
+
<p>Version: %1</p>
-
-
+
+
<p>Copyright: © %1</p>
-
-
+
+
<p>%1: <a href='%2'>%3</a>
-
-
+
+
<p>%1: %2
-
+
Number of rollers
-
+
Open scanner
-
-
+
+
HUAGOSCAN scanning software
-
-
+
+
successfully
-
+
Ready
-
-
+
+
failed
-
-
-
+
+
Error
-
+
Failed to start!
-
-
-
-
-
-
- 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 file access permissions
-
+
Image processing failed
-
+
OCR initialization error
-
+
OCR failed
-
+
File does not exist
-
+
Failed to load dynamic library
-
+
File data error
-
+
Image format processing error
-
+
Insufficient memory
-
+
Failed
-
+
Apply configuration
-
+
Are you sure you want to disconnect device:
-
+
?
-
-
+
+
Close
-
+
Prompt
-
+
No other versions obtained
-
-
+
+
Device does not support this operation
-
-
+
+
IO error
-
+
The language switch is successful and takes effect the next time the software is started!
-
+
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);