Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support qt6.8 #154

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Copyright: UnionTech Software Technology Co., Ltd.
License: CC0-1.0

# Project file
Files: *.pro *.prf *.pri *.qrc *CMakeLists.txt .tx/*
Files: *.pro *.prf *.pri *.qrc *CMakeLists.txt .tx/* *.cmake
Copyright: UnionTech Software Technology Co., Ltd.
License: CC0-1.0

Expand Down
31 changes: 19 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,36 @@ cmake_minimum_required(VERSION 3.0.0)

project(imageeditor)

set(CMAKE_C_FLAGS "-fPIC")
set(CMAKE_CXX_FLAGS "-fPIC")

execute_process(COMMAND uname -m OUTPUT_VARIABLE MACH
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)

set(CMAKE_C_FLAGS "-fPIC")
set(CMAKE_CXX_FLAGS "-fPIC")
set(CMAKE_EXPORT_COMPILE_COMMANDS on)

find_package(PkgConfig REQUIRED)

# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)

# check Qt version, support Qt5 default
find_package(Qt6 QUIET)
if (Qt6_FOUND)
set(SUPPORT_QT6 TRUE)
set(QT_VERSION_MAJOR 6)
set(DTK_VERSION_MAJOR 6)
# libimageeditor major version
set(IMGE_VERSION_MAJOR 6)
else()
set(QT_VERSION_MAJOR 5)
endif()

find_package(PkgConfig REQUIRED)

include_directories(${PROJECT_BINARY_DIR})
include_directories(${PROJECT_SOURCE_DIR})

message(STATUS ${CMAKE_CXX_FLAGS})
add_subdirectory(libimageviewer)
add_subdirectory(libimagevisualresult)

option(DOTEST "option for test" OFF)
if(DOTEST OR CMAKE_BUILD_TYPE STREQUAL "Debug")
add_subdirectory(tests)
# add_subdirectory(tests)
endif()

add_subdirectory(libimageviewer)
add_subdirectory(libimagevisualresult)

60 changes: 32 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,44 @@ Image editor is a public library for deepin-image-viewer and deepin-album devel

_The **master** branch is current development branch, build dependencies may changes without update README.md, refer to `./debian/control` for a working build depends list_

* Qt (>=5.11)
* debhelper (>= 11),
* cmake,
* qtbase5-dev,
* debhelper (>= 11),
* cmake,
* pkg-config,
* libexif-dev,
* qtbase5-dev,
* qtbase5-private-dev,
* qttools5-dev,
* qttools5-dev-tools,
* qtmultimedia5-dev,
* libqt5svg5-dev,
* libqt5x11extras5-dev,
* libsqlite3-dev,
* qttools5-dev-tools,
* qttools5-dev,
* libxcb-util0-dev,
* qt6-base-dev,
* qt6-base-private-dev,
* qt6-tools-dev,
* qt6-tools-dev-tools,
* qt6-multimedia-dev,
* libqt6svg6-dev,
* libqt6opengl6-dev,
* libexif-dev,
* libsqlite3-dev,
* libxcb-util0-dev,
* libstartup-notification0-dev,
* libraw-dev,
* libqt5opengl5-dev,
* qtbase5-private-dev,
* qtmultimedia5-dev,
* x11proto-xext-dev,
* libmtdev-dev,
* libraw-dev,
* x11proto-xext-dev,
* libmtdev-dev,
* libegl1-mesa-dev,
* libudev-dev,
* libfontconfig1-dev,
* libfreetype6-dev,
* libglib2.0-dev,
* libxrender-dev,
* libudev-dev,
* libfontconfig1-dev,
* libfreetype6-dev,
* libxrender-dev,
* libdtkwidget-dev,
* libdtkwidget5-bin,
* libdtkcore5-bin,
* libgio-qt-dev,
* libudisks2-qt5-dev,
* libopencv-dev,
* libdtk6widget-dev,
* libdtk6core-bin,
* libmediainfo-dev,
* libgstreamer1.0-dev,
* libtiff-dev
* libffmpegthumbnailer-dev,
* libtiff-dev,
* libdfm6-io-dev | hello,
* libdfm-io-dev | hello

## Installation

Expand All @@ -58,13 +62,13 @@ $ sudo apt-get build-dep image-editor
```
or
``` shell
$ sudo apt install cmake qtbase5-dev pkg-config libexif-dev libqt5svg5-dev libqt5x11extras5-dev libsqlite3-dev qttools5-dev-tools qttools5-dev libxcb-util0-dev libstartup-notification0-dev libraw-dev libqt5opengl5-dev qtbase5-private-dev qtmultimedia5-dev x11proto-xext-dev libmtdev-dev libegl1-mesa-dev libudev-dev libfontconfig1-dev libfreetype6-dev libglib2.0-dev libxrender-dev libdtkwidget-dev libdtkwidget5-bin libdtkcore5-bin libgio-qt-dev libudisks2-qt5-dev libmediainfo-dev libopencv-dev libgstreamer1.0-dev
$ sudo apt install cmake pkg-config qtbase5-dev qtbase5-private-dev qttools5-dev qttools5-dev-tools qtmultimedia5-dev libqt5svg5-dev libqt5x11extras5-dev qt6-base-dev qt6-base-private-dev qt6-tools-dev qt6-tools-dev-tools qt6-multimedia-dev libqt6svg6-dev libqt6opengl6-dev libexif-dev libsqlite3-dev libxcb-util0-dev libstartup-notification0-dev libraw-dev x11proto-xext-dev libmtdev-dev libegl1-mesa-dev libudev-dev libfontconfig1-dev libfreetype6-dev libxrender-dev libdtkwidget-dev libdtkcore5-bin libdtk6widget-dev libdtk6core-bin libmediainfo-dev libffmpegthumbnailer-dev libtiff-dev libdfm6-io-dev libdfm-io-dev
```

2. Build:

```
$ cd draw
$ cd image-editor
$ mkdir Build
$ cd Build
$ cmake ../
Expand Down
58 changes: 31 additions & 27 deletions README.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,44 @@ Image editor 是深度开发的用于 deepin-image-viewer 和 deepin-album 的

_**master**分支是当前开发分支,编译依赖可能在未更新README.md文件的情况下变更,请参考./debian/control文件获取有效的编译依赖列表_

* Qt (>=5.11)
* debhelper (>= 11),
* cmake,
* qtbase5-dev,
* debhelper (>= 11),
* cmake,
* pkg-config,
* libexif-dev,
* qtbase5-dev,
* qtbase5-private-dev,
* qttools5-dev,
* qttools5-dev-tools,
* qtmultimedia5-dev,
* libqt5svg5-dev,
* libqt5x11extras5-dev,
* libsqlite3-dev,
* qttools5-dev-tools,
* qttools5-dev,
* libxcb-util0-dev,
* qt6-base-dev,
* qt6-base-private-dev,
* qt6-tools-dev,
* qt6-tools-dev-tools,
* qt6-multimedia-dev,
* libqt6svg6-dev,
* libqt6opengl6-dev,
* libexif-dev,
* libsqlite3-dev,
* libxcb-util0-dev,
* libstartup-notification0-dev,
* libraw-dev,
* libqt5opengl5-dev,
* qtbase5-private-dev,
* qtmultimedia5-dev,
* x11proto-xext-dev,
* libmtdev-dev,
* libraw-dev,
* x11proto-xext-dev,
* libmtdev-dev,
* libegl1-mesa-dev,
* libudev-dev,
* libfontconfig1-dev,
* libfreetype6-dev,
* libglib2.0-dev,
* libxrender-dev,
* libudev-dev,
* libfontconfig1-dev,
* libfreetype6-dev,
* libxrender-dev,
* libdtkwidget-dev,
* libdtkwidget5-bin,
* libdtkcore5-bin,
* libgio-qt-dev,
* libudisks2-qt5-dev,
* libopencv-dev,
* libdtk6widget-dev,
* libdtk6core-bin,
* libmediainfo-dev,
* libgstreamer1.0-dev,
* libtiff-dev
* libffmpegthumbnailer-dev,
* libtiff-dev,
* libdfm6-io-dev | hello,
* libdfm-io-dev | hello

## 安装

Expand All @@ -58,7 +62,7 @@ $ sudo apt-get build-dep image-editor
```
或者手动安装
``` shell
$ sudo apt install cmake qtbase5-dev pkg-config libexif-dev libqt5svg5-dev libqt5x11extras5-dev libsqlite3-dev qttools5-dev-tools qttools5-dev libxcb-util0-dev libstartup-notification0-dev libraw-dev libqt5opengl5-dev qtbase5-private-dev qtmultimedia5-dev x11proto-xext-dev libmtdev-dev libegl1-mesa-dev libudev-dev libfontconfig1-dev libfreetype6-dev libglib2.0-dev libxrender-dev libdtkwidget-dev libdtkwidget5-bin libdtkcore5-bin libgio-qt-dev libudisks2-qt5-dev libmediainfo-dev libopencv-dev libgstreamer1.0-dev
$ sudo apt install cmake pkg-config qtbase5-dev qtbase5-private-dev qttools5-dev qttools5-dev-tools qtmultimedia5-dev libqt5svg5-dev libqt5x11extras5-dev qt6-base-dev qt6-base-private-dev qt6-tools-dev qt6-tools-dev-tools qt6-multimedia-dev libqt6svg6-dev libqt6opengl6-dev libexif-dev libsqlite3-dev libxcb-util0-dev libstartup-notification0-dev libraw-dev x11proto-xext-dev libmtdev-dev libegl1-mesa-dev libudev-dev libfontconfig1-dev libfreetype6-dev libxrender-dev libdtkwidget-dev libdtkcore5-bin libdtk6widget-dev libdtk6core-bin libmediainfo-dev libffmpegthumbnailer-dev libtiff-dev libdfm6-io-dev libdfm-io-dev
```

2. 构建:
Expand Down
65 changes: 48 additions & 17 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,76 @@ Maintainer: Deepin Packages Builder <[email protected]>
Build-Depends:
debhelper (>= 11),
cmake,
qtbase5-dev,
pkg-config,
# Qt5
qtbase5-dev,
qtbase5-private-dev,
qttools5-dev,
qttools5-dev-tools,
qtmultimedia5-dev,
libqt5svg5-dev,
libqt5x11extras5-dev,
# Qt6
qt6-base-dev,
qt6-base-private-dev,
qt6-tools-dev,
qt6-tools-dev-tools,
qt6-multimedia-dev,
libqt6svg6-dev,
libqt6opengl6-dev,
libexif-dev,
libqt5svg5-dev,
libqt5x11extras5-dev,
libsqlite3-dev,
qttools5-dev-tools,
qttools5-dev,
libxcb-util0-dev,
libstartup-notification0-dev,
libraw-dev,
libqt5opengl5-dev,
qtbase5-private-dev,
qtmultimedia5-dev,
x11proto-xext-dev,
libmtdev-dev,
libegl1-mesa-dev,
libudev-dev,
libfontconfig1-dev,
libfreetype6-dev,
libxrender-dev,
libdtkwidget-dev,
libdtkwidget5-bin,
# DTK
libdtkwidget-dev,
libdtkcore5-bin,
libgio-qt-dev,
libudisks2-qt5-dev,
# Disable opencv, not used now.
# libopencv-dev,
libdtk6widget-dev,
libdtk6core-bin,
libmediainfo-dev,
libffmpegthumbnailer-dev,
libtiff-dev,
# Enable use dfm io to copy MTP mount file, Use `|`(or) relationship to
# compatible different environments, qttools5-private-dev will not be used.
# WARNING: control file changes may cause qttools5-private-dev to be installed
# compatible different environments, hello will not be used.
# WARNING: control file changes may cause hello to be installed
# instead of libdfm-io-dev.
libdfm-io-dev | qttools5-private-dev
libdfm6-io-dev | hello,
libdfm-io-dev | hello
Standards-Version: 3.9.8
Homepage: http://www.deepin.org

# Support Qt5
Package: libimageeditor6
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Conflicts:
libimage-viewer
Replaces:
libimage-viewer
Recommends: libqt6libqgtk2, kimageformat6-plugins, deepin-ocr, ffmpegthumbnailer, ffmpeg
Description: Image Viewer library.
Deepin Image Viewer library.

Package: libimageeditor6-dev
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, libimageeditor(=${binary:Version})
Conflicts:
libimage-viewer-dev
Replaces:
libimage-viewer-dev
Recommends: libqt6libgtk2, kimageformat6-plugins, deepin-ocr
Description: Image Viewer library development headers.
Deepin Image Viewer library development headers.

# Support Qt5
Package: libimageeditor
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Expand Down
2 changes: 1 addition & 1 deletion debian/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Copyright: UnionTech Software Technology Co., Ltd.
License: CC0-1.0

# Project file
Files: *.pro *.prf *.pri *.qrc *CMakeLists.txt .tx/*
Files: *.pro *.prf *.pri *.qrc *CMakeLists.txt .tx/* *.cmake
Copyright: UnionTech Software Technology Co., Ltd.
License: CC0-1.0

Expand Down
35 changes: 35 additions & 0 deletions debian/image-editor6.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.\" This file is processed to generate manpages in the
.\" build diretory.
.TH image-editor6 1 "2020-11-17" "Deepin"

.SH NAME
imageeditor6 \- the picture manager from UOS, based on Qt6.

.SH SYNOPSIS
.B image-editor6
[\fIPATH\fR]

.SH DESCRIPTION
Deepin Image Viewer is a fashion photo manager for viewing and organizing pictures.

.PP
This program does not accept any command line options.

If the \fIPATH\fR is specified, open that picture with Image Viewer.
If the \fIPATH\fR is omitted, open Image Viewer and show all pictures in it.
If Image Viewer has been launched, open the picture with Image Viewer.
Otherwise, launch Image Viewer and open the picture with it.

.SH SEE ALSO
https://www.deepin.org/en/original/image-editor/

.SH AUTHOR
.PP
.B imageeditor
is written by Deepin Technology Co., Ltd.
.PP
This manual page was written by
.MT liuminghang@\:uniontech.com
Liu Ming Hang
.ME
for the Debian Project (but may be used by others).
2 changes: 1 addition & 1 deletion debian/libimageeditor.install
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ usr/lib/*/libimageviewer.so
usr/share/libimageviewer/translations/*.qm
usr/lib/*/libimagevisualresult.so.*
usr/share/libimagevisualresult/filter_cube/*.CUBE
usr/share/libimagevisualresult/filter_cube/*.dat
usr/share/libimagevisualresult/filter_cube/*.dat
1 change: 1 addition & 0 deletions debian/libimageeditor.manpages
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
debian/image-editor.1
5 changes: 5 additions & 0 deletions debian/libimageeditor6-dev.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
usr/include/libimageviewer6/*.h
usr/lib/*/pkgconfig/libimageviewer6.pc
usr/include/libimagevisualresult6/*.h
usr/lib/*/libimagevisualresult6.so
usr/lib/*/pkgconfig/libimagevisualresult6.pc
6 changes: 6 additions & 0 deletions debian/libimageeditor6.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
usr/lib/*/libimageviewer6.so.*
usr/lib/*/libimageviewer6.so
usr/share/libimageviewer6/translations/*.qm
usr/lib/*/libimagevisualresult6.so.*
usr/share/libimagevisualresult6/filter_cube/*.CUBE
usr/share/libimagevisualresult6/filter_cube/*.dat
1 change: 1 addition & 0 deletions debian/libimageeditor6.manpages
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
debian/image-editor6.1
1 change: 0 additions & 1 deletion debian/manpages

This file was deleted.

Loading
Loading