Compare commits
12 Commits
17f68c8e86
...
8ad6542650
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8ad6542650 | ||
|
|
0fa0b5b4e5 | ||
|
|
79b2afffd0 | ||
|
|
9353be4e69 | ||
|
|
0cd807603f | ||
|
|
85991c105f | ||
|
|
7b8ca7c9f1 | ||
|
|
e046ecfa40 | ||
|
|
1043c3ea15 | ||
|
|
949cac1d90 | ||
|
|
9105c244ea | ||
|
|
8c56d54c9c |
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
|
||||
|
||||
@ -0,0 +1,50 @@
|
||||
From e44752c6e0c7dfd08e847b5b4b499818c5443276 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=E4=BE=AF=E7=BA=A2=E5=8B=8B?= <houhongxun@kylinos.cn>
|
||||
Date: Tue, 23 Apr 2024 09:54:24 +0800
|
||||
Subject: [PATCH] kylin-scanner: fix some build warnings and code problems
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: 侯红勋 <houhongxun@kylinos.cn>
|
||||
---
|
||||
src/rectify.cpp | 2 +-
|
||||
src/showimagewidget.cpp | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/rectify.cpp b/src/rectify.cpp
|
||||
index 32828e2..9d58cb5 100644
|
||||
--- a/src/rectify.cpp
|
||||
+++ b/src/rectify.cpp
|
||||
@@ -141,7 +141,7 @@ double CalcDegree(const Mat &srcImage, Mat &dst)
|
||||
//依次画出每条线段
|
||||
size_t i = 0;
|
||||
|
||||
- int loop = 300;
|
||||
+ size_t loop = 300;
|
||||
if (lines.size() > loop) {
|
||||
loop = 300;
|
||||
} else {
|
||||
diff --git a/src/showimagewidget.cpp b/src/showimagewidget.cpp
|
||||
index 0a3e059..7cf46df 100644
|
||||
--- a/src/showimagewidget.cpp
|
||||
+++ b/src/showimagewidget.cpp
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <ukui-log4qt.h>
|
||||
|
||||
ShowImageWidget::ShowImageWidget(QWidget *parent) : QWidget(parent)
|
||||
+ , scannerImagePath(g_config_signal->m_scannerImagePath)
|
||||
, m_stackImage (new QImage())
|
||||
, m_editImage (new QImage())
|
||||
, m_normalImage (new QImage())
|
||||
@@ -29,7 +30,6 @@ ShowImageWidget::ShowImageWidget(QWidget *parent) : QWidget(parent)
|
||||
, m_showImageHLayout (new QHBoxLayout())
|
||||
, m_toolbarWidget (new ToolBarWidget())
|
||||
, m_mainVLayout (new QVBoxLayout())
|
||||
- , scannerImagePath(g_config_signal->m_scannerImagePath)
|
||||
{
|
||||
setupGui();
|
||||
initConnect();
|
||||
--
|
||||
2.43.0
|
||||
|
||||
41
0002-modify-version-of-kylin-scanner-is-null.patch
Normal file
41
0002-modify-version-of-kylin-scanner-is-null.patch
Normal file
@ -0,0 +1,41 @@
|
||||
From 45371bb3feb34876ab27ab6420e0d39c870a5e13 Mon Sep 17 00:00:00 2001
|
||||
From: peijiankang <peijiankang@kylinos.cn>
|
||||
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, 17 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main.cpp b/src/main.cpp
|
||||
index 48ae229..fa6b2a8 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));
|
||||
+ QProcess process;
|
||||
+ QString versionResult;
|
||||
+ 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.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,13 @@
|
||||
%define debug_package %{nil}
|
||||
Name: kylin-scanner
|
||||
Version: 1.0.3
|
||||
Version: 1.0.4
|
||||
Release: 2
|
||||
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-fix-compile-error-of-kylin-scanner.patch
|
||||
Patch02: 0002-modify-version-of-kylin-scanner-is-null.patch
|
||||
Patch03: 0001-kylin-scanner-fix-some-build-warnings-and-code-probl.patch
|
||||
|
||||
BuildRequires: qt5-qtsvg-devel
|
||||
BuildRequires: glib2-devel
|
||||
@ -13,7 +15,8 @@ BuildRequires: libX11-devel
|
||||
BuildRequires: gsettings-qt-devel
|
||||
BuildRequires: sane-backends-devel
|
||||
BuildRequires: opencv
|
||||
BuildRequires: giflib-devel
|
||||
BuildRequires: stb-devel
|
||||
BuildRequires: giflib-devel
|
||||
BuildRequires: libpng-devel
|
||||
BuildRequires: freeimage-devel
|
||||
BuildRequires: tesseract-devel
|
||||
@ -38,7 +41,7 @@ and text recognition, etc.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%autosetup -n %{name}-%{version} -p1
|
||||
|
||||
%build
|
||||
%{qmake_qt5}
|
||||
@ -51,10 +54,25 @@ 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
|
||||
%{_datadir}/kylin-user-guide/data/guide/kylin-scanner
|
||||
|
||||
%changelog
|
||||
* Tue Apr 23 2024 houhongxun <houhongxun@kylinos.cn> - 1.0.4-2
|
||||
- fix some build warnings and code problems
|
||||
|
||||
* 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
|
||||
|
||||
* 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
|
||||
|
||||
* Thu May 26 2022 peijiankang <peijiankang@kylinos.cn> - 1.0.3-2
|
||||
- remove {%if 0 and %endif}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user