update to version 1.2.0
This commit is contained in:
parent
2ae7d73482
commit
e40ac61d1f
@ -1,40 +0,0 @@
|
||||
From 9e00da4394cc3159edec55b95019e172772ecea0 Mon Sep 17 00:00:00 2001
|
||||
From: peijiankang <peijiankang@kylinos.cn>
|
||||
Date: Thu, 9 Jun 2022 11:34:59 +0800
|
||||
Subject: [PATCH] Fix the version of kylin-photo-viewer
|
||||
|
||||
---
|
||||
src/view/menumodule.cpp | 17 +++++++++++++++++
|
||||
1 file changed, 17 insertions(+)
|
||||
|
||||
diff --git a/src/view/menumodule.cpp b/src/view/menumodule.cpp
|
||||
index a974db7..28e7aaa 100644
|
||||
--- a/src/view/menumodule.cpp
|
||||
+++ b/src/view/menumodule.cpp
|
||||
@@ -207,6 +207,23 @@ QHBoxLayout* menuModule::initTitleBar(){
|
||||
|
||||
QVBoxLayout* menuModule::initBody(){
|
||||
m_appVersion = VERSION_NEM;
|
||||
+ QProcess proc;
|
||||
+ QStringList options;
|
||||
+ options << "-qa" << "|" << "grep" << "kylin-photo-viewer";
|
||||
+ proc.start("rpm", options);
|
||||
+ proc.waitForFinished();
|
||||
+ QString dpkgInfo = proc.readAll();
|
||||
+ QStringList infoList = dpkgInfo.split("\n");
|
||||
+ for (int n = 0; n < infoList.size(); n++) {
|
||||
+ QString strInfoLine = infoList[n];
|
||||
+ if (strInfoLine.contains("kylin-photo-viewer")) {
|
||||
+ QStringList lineInfoList = strInfoLine.split(QRegExp("-"));
|
||||
+ if (lineInfoList.size() >= 3) {
|
||||
+ m_appVersion = lineInfoList[3];
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
// QLabel* bodyIcon = new QLabel();
|
||||
QPushButton *bodyIcon = new QPushButton();
|
||||
bodyIcon->setFixedSize(MICON_SIZEB);
|
||||
--
|
||||
2.33.0
|
||||
|
||||
61
0001-fix-compile-error-of-kylin-photo-viewer.patch
Normal file
61
0001-fix-compile-error-of-kylin-photo-viewer.patch
Normal file
@ -0,0 +1,61 @@
|
||||
From f91d8c6daf58bd43e7e9619ca4536f3b1e970264 Mon Sep 17 00:00:00 2001
|
||||
From: peijiankang <peijiankang@kylinos.cn>
|
||||
Date: Tue, 7 Feb 2023 14:19:25 +0800
|
||||
Subject: [PATCH] fix compile error of kylin-photo-viewer
|
||||
|
||||
---
|
||||
codec/kylinimagecodec/image_load/image_load.cpp | 1 +
|
||||
codec/kylinimagecodec/image_save/image_save.cpp | 1 +
|
||||
codec/kylinimagecodec/kylinimagecodec.cpp | 4 ++--
|
||||
codec/kylinimagecodec/kylinimagecodec.pro | 2 +-
|
||||
4 files changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/codec/kylinimagecodec/image_load/image_load.cpp b/codec/kylinimagecodec/image_load/image_load.cpp
|
||||
index ae4c559..4d6c182 100644
|
||||
--- a/codec/kylinimagecodec/image_load/image_load.cpp
|
||||
+++ b/codec/kylinimagecodec/image_load/image_load.cpp
|
||||
@@ -1,3 +1,4 @@
|
||||
+#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 62ebd95..2d57ce7 100644
|
||||
--- a/codec/kylinimagecodec/image_save/image_save.cpp
|
||||
+++ b/codec/kylinimagecodec/image_save/image_save.cpp
|
||||
@@ -1,3 +1,4 @@
|
||||
+#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 24a429b..09b9962 100644
|
||||
--- a/codec/kylinimagecodec/kylinimagecodec.cpp
|
||||
+++ b/codec/kylinimagecodec/kylinimagecodec.cpp
|
||||
@@ -71,8 +71,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 49413d6..1db55c5 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 \
|
||||
--
|
||||
2.33.0
|
||||
|
||||
Binary file not shown.
BIN
kylin-photo-viewer-1.2.0.tar.gz
Normal file
BIN
kylin-photo-viewer-1.2.0.tar.gz
Normal file
Binary file not shown.
@ -1,20 +1,19 @@
|
||||
%define debug_package %{nil}
|
||||
Name: kylin-photo-viewer
|
||||
Version: 1.0.2
|
||||
Release: 4
|
||||
Version: 1.2.0
|
||||
Release: 2
|
||||
Summary: kylin-photo-viewer
|
||||
License: BSL-1.0 and Libpng and zlib and GPL-2.0-or-later
|
||||
URL: https://github.com/UbuntuKylin/kylin-photo-viewer
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Patch01: 0001-Fix-the-version-of-kylin-photo-viewer.patch
|
||||
Patch01: 0001-fix-compile-error-of-kylin-photo-viewer.patch
|
||||
|
||||
BuildRequires: qt5-qtbase-devel
|
||||
BuildRequires: qtchooser
|
||||
BuildRequires: qt5-qtscript-devel
|
||||
BuildRequires: qt5-qttools-devel
|
||||
BuildRequires: qt5-linguist
|
||||
BuildRequires: opencv
|
||||
BuildRequires: qt5-qtsvg-devel
|
||||
BuildRequires: stb-devel
|
||||
BuildRequires: giflib-devel
|
||||
BuildRequires: libpng-devel
|
||||
BuildRequires: freeimage-devel
|
||||
@ -30,8 +29,7 @@ Photo viewer, support to view, zoom and rotate images of various formats
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
|
||||
%patch01 -p1
|
||||
|
||||
%build
|
||||
export PATH=%{_qt5_bindir}:$PATH
|
||||
@ -50,14 +48,15 @@ mkdir -p %{buildroot}/usr/share/kylin-user-guide/data/guide
|
||||
|
||||
cp -r %{_builddir}/%{name}-%{version}/data/pictures %{buildroot}/usr/share/kylin-user-guide/data/guide/
|
||||
|
||||
%post
|
||||
glib-compile-schemas /usr/share/glib-2.0/schemas &> /dev/null ||:
|
||||
|
||||
%files
|
||||
%{_bindir}/kylin-photo-viewer
|
||||
%{_includedir}/kylin_image_codec/kylinimagecodec.h
|
||||
%{_includedir}/kylin_image_codec/kylinimagecodec_global.h
|
||||
%{_includedir}/kylin_image_codec/loadmovie.h
|
||||
%{_includedir}/kylin_image_codec/savemovie.h
|
||||
%{_includedir}/kylin_image_codec/stb_image.h
|
||||
%{_includedir}/kylin_image_codec/stb_image_write.h
|
||||
%{_prefix}/lib/libkylinimagecodec.so
|
||||
%{_prefix}/lib/libkylinimagecodec.so.1
|
||||
%{_prefix}/lib/libkylinimagecodec.so.1.0
|
||||
@ -68,10 +67,17 @@ cp -r %{_builddir}/%{name}-%{version}/data/pictures %{buildroot}/usr/share/kylin
|
||||
%{_datadir}/glib-2.0/schemas/org.kylin.photo.viewer.gschema.xml
|
||||
%{_datadir}/glib-2.0/schemas/org.ukui.log4qt.kylin-photo-viewer.gschema.xml
|
||||
%{_datadir}/kylin-photo-viewer/translations/kylin-photo-viewer_zh_CN.qm
|
||||
%{_datadir}/kylin-photo-viewer/translations/kylin-photo-viewer_bo_CN.qm
|
||||
%{_datadir}/pixmaps/kyview_logo.png
|
||||
%{_datadir}/kylin-user-guide/data/guide/
|
||||
|
||||
%changelog
|
||||
* Wed Feb 1 2023 peijiankang <peijiankang@kylinos.cn> - 1.2.0-2
|
||||
- add build debuginfo and debugsource
|
||||
|
||||
* Mon Oct 24 2022 tanyulong <tanyulong@kylinos.cn> - 1.2.0-1
|
||||
- update upstream version 1.2.0
|
||||
|
||||
* Thu Jun 9 2022 peijiankang <peijiankang@kylinos.cn> - 1.0.2-4
|
||||
- add kylin-user-guide file
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user