!6 update upstream version
From: @peijiankang Reviewed-by: @dou33 Signed-off-by: @dou33
This commit is contained in:
commit
7b8ca7c9f1
@ -1,39 +1,40 @@
|
||||
From 5e46fb35016c8ae73fbd31cc64a9f1354b304541 Mon Sep 17 00:00:00 2001
|
||||
From dd86aeec69a1e6c594cb761cbf1ec7145a7b8584 Mon Sep 17 00:00:00 2001
|
||||
From: peijiankang <peijiankang@kylinos.cn>
|
||||
Date: Mon, 30 May 2022 14:51:29 +0800
|
||||
Date: Fri, 24 Jun 2022 09:55:22 +0800
|
||||
Subject: [PATCH] modify version of kylin-scanner is null
|
||||
|
||||
---
|
||||
src/main.cpp | 18 +++++++++++++++++-
|
||||
1 file changed, 17 insertions(+), 1 deletion(-)
|
||||
src/main.cpp | 18 +++++++++++++++---
|
||||
1 file changed, 15 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/main.cpp b/src/main.cpp
|
||||
index 48ae229..6de4eca 100644
|
||||
index cbf0f6a..2d270b2 100644
|
||||
--- a/src/main.cpp
|
||||
+++ b/src/main.cpp
|
||||
@@ -140,7 +140,23 @@ static QString getSystemArchitecture()
|
||||
|
||||
@@ -372,10 +372,22 @@ static bool checkStarted()
|
||||
static QString getAppVersion()
|
||||
{
|
||||
- QString versionResult = execCmd(QString("dpkg-parsechangelog -l %1 --show-field Version").arg(ChangelogFilePath));
|
||||
+ QString versionResult;
|
||||
+ QProcess process;
|
||||
QProcess process;
|
||||
- process.start(QString("dpkg-parsechangelog -l %1 --show-field Version").arg(CHANGELOG_PATH));
|
||||
+ QString result;
|
||||
+ QStringList options;
|
||||
+ options << "-q" << "kylin-scanner";
|
||||
+ process.start("rpm", options);
|
||||
+ process.waitForFinished();
|
||||
process.waitForFinished();
|
||||
- QByteArray result = process.readAllStandardOutput();
|
||||
- result = result.left(result.length()-1);
|
||||
+ QString dpkgInfo = process.readAll();
|
||||
+ QStringList infoList = dpkgInfo.split("\n");
|
||||
+ for (int n = 0; n < infoList.size(); n++) {
|
||||
+ QString strInfoLine = infoList[n];
|
||||
+ if (strInfoLine.contains("kylin-scanner")) {
|
||||
+ QStringList lineInfoList = strInfoLine.split(QRegExp("-"));
|
||||
+ if (lineInfoList.size() >= 3) {
|
||||
+ versionResult = lineInfoList[2];
|
||||
+ QString strInfoLine = infoList[n];
|
||||
+ if (strInfoLine.contains("kylin-scanner")) {
|
||||
+ QStringList lineInfoList = strInfoLine.split(QRegExp("-"));
|
||||
+ if (lineInfoList.size() >= 3) {
|
||||
+ result = lineInfoList[2];
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
return versionResult;
|
||||
return result;
|
||||
}
|
||||
|
||||
--
|
||||
|
||||
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
%define debug_package %{nil}
|
||||
Name: kylin-scanner
|
||||
Version: 1.0.3
|
||||
Release: 3
|
||||
Release: 4
|
||||
Summary: Kylin Scanner is an interface-friendly scanning software developed with Qt5.
|
||||
License: BSL-1.0 and Libpng and zlib and GPL-2.0-or-later
|
||||
URL: https://github.com/UbuntuKylin/kylin-scanner
|
||||
@ -14,9 +14,6 @@ BuildRequires: libX11-devel
|
||||
BuildRequires: gsettings-qt-devel
|
||||
BuildRequires: sane-backends-devel
|
||||
BuildRequires: opencv
|
||||
BuildRequires: giflib-devel
|
||||
BuildRequires: libpng-devel
|
||||
BuildRequires: freeimage-devel
|
||||
BuildRequires: tesseract-devel
|
||||
BuildRequires: leptonica-devel leptonica
|
||||
BuildRequires: qt5-qtbase-devel
|
||||
@ -53,10 +50,12 @@ and text recognition, etc.
|
||||
%{_bindir}/kylin-scanner
|
||||
%{_datadir}/applications/kylin-scanner.desktop
|
||||
%{_datadir}/kylin-scanner/translations/*.qm
|
||||
%{_datadir}/kylin-user-guide/data/guide/kylin-scanner
|
||||
%{_datadir}/pixmaps/scanner.png
|
||||
|
||||
%changelog
|
||||
* Fri Jun 24 2022 peijiankang <peijiankang@kylinos.cn> - 1.0.3-4
|
||||
- update upstream version
|
||||
|
||||
* Mon May 30 2022 peijiankang <peijiankang@kylinos.cn> - 1.0.3-3
|
||||
- modify version of kylin-scanner is null
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user