!12 update version to 1.0.4
From: @peijiankang Reviewed-by: @hua_yadong Signed-off-by: @hua_yadong
This commit is contained in:
commit
79b2afffd0
92
0001-fix-compile-error-of-kylin-scanner.patch
Normal file
92
0001-fix-compile-error-of-kylin-scanner.patch
Normal file
@ -0,0 +1,92 @@
|
||||
From 38f2497ce649f8bea166ee32b497d98017e41e25 Mon Sep 17 00:00:00 2001
|
||||
From: peijiankang <peijiankang@kylinos.cn>
|
||||
Date: Thu, 25 May 2023 16:33:00 +0800
|
||||
Subject: [PATCH] fix compile error of kylin-scanner
|
||||
|
||||
---
|
||||
autogen.sh | 2 +-
|
||||
codec/kylinimagecodec/image_load/image_load.cpp | 2 +-
|
||||
codec/kylinimagecodec/image_save/image_save.cpp | 2 +-
|
||||
codec/kylinimagecodec/kylinimagecodec.cpp | 4 ++--
|
||||
codec/kylinimagecodec/kylinimagecodec.pro | 2 +-
|
||||
translations/generate_translations_pm.sh | 2 +-
|
||||
6 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/autogen.sh b/autogen.sh
|
||||
index 05fe23e..9b66beb 100755
|
||||
--- a/autogen.sh
|
||||
+++ b/autogen.sh
|
||||
@@ -1,4 +1,4 @@
|
||||
#! /bin/sh
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
|
||||
-lrelease kylin-scanner.pro
|
||||
+lrelease-qt5 kylin-scanner.pro
|
||||
diff --git a/codec/kylinimagecodec/image_load/image_load.cpp b/codec/kylinimagecodec/image_load/image_load.cpp
|
||||
index a922bd7..985b83c 100644
|
||||
--- a/codec/kylinimagecodec/image_load/image_load.cpp
|
||||
+++ b/codec/kylinimagecodec/image_load/image_load.cpp
|
||||
@@ -15,7 +15,7 @@
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
-
|
||||
+#define STB_IMAGE_IMPLEMENTATION
|
||||
#include "kylinimagecodec.h"
|
||||
|
||||
MatResult KylinImageCodec::loadImageToMat(QString path)
|
||||
diff --git a/codec/kylinimagecodec/image_save/image_save.cpp b/codec/kylinimagecodec/image_save/image_save.cpp
|
||||
index 859275f..45d1b21 100644
|
||||
--- a/codec/kylinimagecodec/image_save/image_save.cpp
|
||||
+++ b/codec/kylinimagecodec/image_save/image_save.cpp
|
||||
@@ -15,7 +15,7 @@
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
-
|
||||
+#define STB_IMAGE_WRITE_IMPLEMENTATION
|
||||
#include "kylinimagecodec.h"
|
||||
|
||||
QStringList* KylinImageCodec::m_list = new QStringList;
|
||||
diff --git a/codec/kylinimagecodec/kylinimagecodec.cpp b/codec/kylinimagecodec/kylinimagecodec.cpp
|
||||
index 2745187..0746ba8 100644
|
||||
--- a/codec/kylinimagecodec/kylinimagecodec.cpp
|
||||
+++ b/codec/kylinimagecodec/kylinimagecodec.cpp
|
||||
@@ -89,8 +89,8 @@ QHash<QString, int> KylinImageCodec::creatFormats()
|
||||
tmpFormats.insert("DDS",FIF_DDS);
|
||||
tmpFormats.insert("GIF",FIF_GIF);
|
||||
tmpFormats.insert("HDR",FIF_HDR);
|
||||
- tmpFormats.insert("FAX",FIF_FAXG3);
|
||||
- tmpFormats.insert("G3",FIF_FAXG3);
|
||||
+// tmpFormats.insert("FAX",FIF_FAXG3);
|
||||
+// tmpFormats.insert("G3",FIF_FAXG3);
|
||||
tmpFormats.insert("SGI",FIF_SGI);
|
||||
tmpFormats.insert("CUT",FIF_CUT);
|
||||
tmpFormats.insert("JNG",FIF_JNG);
|
||||
diff --git a/codec/kylinimagecodec/kylinimagecodec.pro b/codec/kylinimagecodec/kylinimagecodec.pro
|
||||
index ccd0b28..44a44be 100644
|
||||
--- a/codec/kylinimagecodec/kylinimagecodec.pro
|
||||
+++ b/codec/kylinimagecodec/kylinimagecodec.pro
|
||||
@@ -24,7 +24,7 @@ LIBS += -lopencv_core \
|
||||
-lopencv_imgproc \
|
||||
|
||||
#stb
|
||||
-LIBS += -lstb \
|
||||
+#LIBS += -lstb \
|
||||
|
||||
#gif
|
||||
LIBS += -lgif \
|
||||
diff --git a/translations/generate_translations_pm.sh b/translations/generate_translations_pm.sh
|
||||
index a5e938e..2359710 100755
|
||||
--- a/translations/generate_translations_pm.sh
|
||||
+++ b/translations/generate_translations_pm.sh
|
||||
@@ -4,5 +4,5 @@ ts_file_list=(`ls translations/*.ts`)
|
||||
|
||||
for ts in "${ts_file_list[@]}"
|
||||
do
|
||||
- lrelease "${ts}"
|
||||
+ lrelease-qt5 "${ts}"
|
||||
done
|
||||
--
|
||||
2.39.1
|
||||
|
||||
@ -1,28 +1,27 @@
|
||||
From dd86aeec69a1e6c594cb761cbf1ec7145a7b8584 Mon Sep 17 00:00:00 2001
|
||||
From 45371bb3feb34876ab27ab6420e0d39c870a5e13 Mon Sep 17 00:00:00 2001
|
||||
From: peijiankang <peijiankang@kylinos.cn>
|
||||
Date: Fri, 24 Jun 2022 09:55:22 +0800
|
||||
Date: Thu, 25 May 2023 17:13:53 +0800
|
||||
Subject: [PATCH] modify version of kylin-scanner is null
|
||||
|
||||
---
|
||||
src/main.cpp | 18 +++++++++++++++---
|
||||
1 file changed, 15 insertions(+), 3 deletions(-)
|
||||
src/main.cpp | 18 +++++++++++++++++-
|
||||
1 file changed, 17 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main.cpp b/src/main.cpp
|
||||
index cbf0f6a..2d270b2 100644
|
||||
index 48ae229..fa6b2a8 100644
|
||||
--- a/src/main.cpp
|
||||
+++ b/src/main.cpp
|
||||
@@ -372,10 +372,22 @@ static bool checkStarted()
|
||||
@@ -140,7 +140,23 @@ static QString getSystemArchitecture()
|
||||
|
||||
static QString getAppVersion()
|
||||
{
|
||||
QProcess process;
|
||||
- process.start(QString("dpkg-parsechangelog -l %1 --show-field Version").arg(CHANGELOG_PATH));
|
||||
+ QString result;
|
||||
- QString versionResult = execCmd(QString("dpkg-parsechangelog -l %1 --show-field Version").arg(ChangelogFilePath));
|
||||
+ QProcess process;
|
||||
+ QString versionResult;
|
||||
+ QStringList options;
|
||||
+ options << "-q" << "kylin-scanner";
|
||||
+ process.start("rpm", options);
|
||||
process.waitForFinished();
|
||||
- QByteArray result = process.readAllStandardOutput();
|
||||
- result = result.left(result.length()-1);
|
||||
+ process.waitForFinished();
|
||||
+ QString dpkgInfo = process.readAll();
|
||||
+ QStringList infoList = dpkgInfo.split("\n");
|
||||
+ for (int n = 0; n < infoList.size(); n++) {
|
||||
@ -30,13 +29,13 @@ index cbf0f6a..2d270b2 100644
|
||||
+ if (strInfoLine.contains("kylin-scanner")) {
|
||||
+ QStringList lineInfoList = strInfoLine.split(QRegExp("-"));
|
||||
+ if (lineInfoList.size() >= 3) {
|
||||
+ result = lineInfoList[2];
|
||||
+ versionResult = lineInfoList[2];
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
return result;
|
||||
return versionResult;
|
||||
}
|
||||
|
||||
--
|
||||
2.33.0
|
||||
2.39.1
|
||||
|
||||
Binary file not shown.
BIN
kylin-scanner-1.0.4.tar.gz
Normal file
BIN
kylin-scanner-1.0.4.tar.gz
Normal file
Binary file not shown.
@ -1,11 +1,12 @@
|
||||
Name: kylin-scanner
|
||||
Version: 1.0.3
|
||||
Release: 5
|
||||
Version: 1.0.4
|
||||
Release: 1
|
||||
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
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Patch01: 0001-modify-version-of-kylin-scanner-is-null.patch
|
||||
Patch01: 0001-fix-compile-error-of-kylin-scanner.patch
|
||||
Patch02: 0002-modify-version-of-kylin-scanner-is-null.patch
|
||||
|
||||
BuildRequires: qt5-qtsvg-devel
|
||||
BuildRequires: glib2-devel
|
||||
@ -13,6 +14,10 @@ BuildRequires: libX11-devel
|
||||
BuildRequires: gsettings-qt-devel
|
||||
BuildRequires: sane-backends-devel
|
||||
BuildRequires: opencv
|
||||
BuildRequires: stb-devel
|
||||
BuildRequires: giflib-devel
|
||||
BuildRequires: libpng-devel
|
||||
BuildRequires: freeimage-devel
|
||||
BuildRequires: tesseract-devel
|
||||
BuildRequires: leptonica-devel leptonica
|
||||
BuildRequires: qt5-qtbase-devel
|
||||
@ -37,6 +42,7 @@ and text recognition, etc.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch01 -p1
|
||||
%patch02 -p1
|
||||
|
||||
%build
|
||||
%{qmake_qt5}
|
||||
@ -50,8 +56,12 @@ and text recognition, etc.
|
||||
%{_datadir}/applications/kylin-scanner.desktop
|
||||
%{_datadir}/kylin-scanner/translations/*.qm
|
||||
%{_datadir}/pixmaps/scanner.png
|
||||
%{_datadir}/kylin-user-guide/data/guide/kylin-scanner
|
||||
|
||||
%changelog
|
||||
* Thu May 25 2023 peijiankang <peijiankang@kylinos.cn> - 1.0.4-1
|
||||
- update version to 1.0.4
|
||||
|
||||
* Mon Feb 06 2023 peijiankang <peijiankang@kylinos.cn> - 1.0.3-5
|
||||
- add build debuginfo and debugsource
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user