!4 modify version of kylin-scanner is null
From: @peijiankang Reviewed-by: @dou33 Signed-off-by: @dou33
This commit is contained in:
commit
1043c3ea15
41
0001-modify-version-of-kylin-scanner-is-null.patch
Normal file
41
0001-modify-version-of-kylin-scanner-is-null.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
From 5e46fb35016c8ae73fbd31cc64a9f1354b304541 Mon Sep 17 00:00:00 2001
|
||||||
|
From: peijiankang <peijiankang@kylinos.cn>
|
||||||
|
Date: Mon, 30 May 2022 14:51:29 +0800
|
||||||
|
Subject: [PATCH] modify version of kylin-scanner is null
|
||||||
|
|
||||||
|
---
|
||||||
|
src/main.cpp | 18 +++++++++++++++++-
|
||||||
|
1 file changed, 17 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/main.cpp b/src/main.cpp
|
||||||
|
index 48ae229..6de4eca 100644
|
||||||
|
--- a/src/main.cpp
|
||||||
|
+++ b/src/main.cpp
|
||||||
|
@@ -140,7 +140,23 @@ static QString getSystemArchitecture()
|
||||||
|
|
||||||
|
static QString getAppVersion()
|
||||||
|
{
|
||||||
|
- QString versionResult = execCmd(QString("dpkg-parsechangelog -l %1 --show-field Version").arg(ChangelogFilePath));
|
||||||
|
+ QString versionResult;
|
||||||
|
+ QProcess process;
|
||||||
|
+ QStringList options;
|
||||||
|
+ options << "-q" << "kylin-scanner";
|
||||||
|
+ process.start("rpm", options);
|
||||||
|
+ process.waitForFinished();
|
||||||
|
+ 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];
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
return versionResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -1,11 +1,12 @@
|
|||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
Name: kylin-scanner
|
Name: kylin-scanner
|
||||||
Version: 1.0.3
|
Version: 1.0.3
|
||||||
Release: 2
|
Release: 3
|
||||||
Summary: Kylin Scanner is an interface-friendly scanning software developed with Qt5.
|
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
|
License: BSL-1.0 and Libpng and zlib and GPL-2.0-or-later
|
||||||
URL: https://github.com/UbuntuKylin/kylin-scanner
|
URL: https://github.com/UbuntuKylin/kylin-scanner
|
||||||
Source0: %{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
|
Patch01: 0001-modify-version-of-kylin-scanner-is-null.patch
|
||||||
|
|
||||||
BuildRequires: qt5-qtsvg-devel
|
BuildRequires: qt5-qtsvg-devel
|
||||||
BuildRequires: glib2-devel
|
BuildRequires: glib2-devel
|
||||||
@ -39,6 +40,7 @@ and text recognition, etc.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch01 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{qmake_qt5}
|
%{qmake_qt5}
|
||||||
@ -55,6 +57,9 @@ and text recognition, etc.
|
|||||||
%{_datadir}/pixmaps/scanner.png
|
%{_datadir}/pixmaps/scanner.png
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon May 30 2022 peijiankang <peijiankang@kylinos.cn> - 1.0.3-3
|
||||||
|
- modify version of kylin-scanner is null
|
||||||
|
|
||||||
* Thu May 26 2022 peijiankang <peijiankang@kylinos.cn> - 1.0.3-2
|
* Thu May 26 2022 peijiankang <peijiankang@kylinos.cn> - 1.0.3-2
|
||||||
- remove {%if 0 and %endif}
|
- remove {%if 0 and %endif}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user