2022-10-21 09:59:43 +08:00
|
|
|
#include (./codec/kylinimagecodec/kylinimagecodec.pro)
|
2022-06-22 18:44:03 +08:00
|
|
|
|
|
|
|
# QT modules
|
|
|
|
QT += \
|
|
|
|
core \
|
|
|
|
gui \
|
|
|
|
KWindowSystem \
|
|
|
|
dbus \
|
|
|
|
x11extras \
|
|
|
|
network \
|
|
|
|
printsupport \
|
|
|
|
concurrent \
|
|
|
|
svg
|
|
|
|
|
|
|
|
# 配置kysdk
|
2022-07-19 08:46:59 +08:00
|
|
|
PKGCONFIG += kysdk-kabase kysdk-waylandhelper kysdk-qtwidgets kysdk-waylandhelper kysdk-alm kysdk-ukenv kysdk-log kysdk-diagnostics
|
2022-06-22 18:44:03 +08:00
|
|
|
INCLUDEPATH += /usr/include/kysdk/applications/kabase/
|
2022-07-19 08:46:59 +08:00
|
|
|
INCLUDEPATH += kabase/ \
|
|
|
|
kabase/Qt
|
2022-06-22 18:44:03 +08:00
|
|
|
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
|
|
|
|
|
|
|
TARGET = kylin-scanner
|
|
|
|
|
|
|
|
TEMPLATE = app
|
|
|
|
|
|
|
|
PROJECT_ROOTDIR = $$PWD
|
|
|
|
|
|
|
|
DEFINES += APP_VERSION=\\\"$$VERSION\\\"
|
|
|
|
|
|
|
|
CONFIG += \
|
|
|
|
c++11 \
|
|
|
|
link_pkgconfig
|
|
|
|
|
|
|
|
PKGCONFIG += \
|
|
|
|
gio-2.0 \
|
|
|
|
gio-unix-2.0 \
|
|
|
|
opencv4 \
|
2023-03-28 17:33:43 +08:00
|
|
|
gsettings-qt \
|
|
|
|
libudev
|
2022-06-22 18:44:03 +08:00
|
|
|
|
|
|
|
LIBS += \
|
|
|
|
-llept \
|
|
|
|
-lpthread \
|
|
|
|
-ltesseract \
|
|
|
|
-lX11 \
|
|
|
|
# -ljpeg \
|
2023-03-28 17:33:43 +08:00
|
|
|
-L/usr/lib/libukui-log4qt.so.1.0.0 -lukui-log4qt\
|
|
|
|
-ltiff \
|
|
|
|
-lfreeimage
|
|
|
|
|
|
|
|
#opencv
|
|
|
|
INCLUDEPATH += /usr/include/opencv4/
|
|
|
|
LIBS += -lopencv_core \
|
|
|
|
-lopencv_imgcodecs \
|
|
|
|
-lopencv_imgproc \
|
2022-06-22 18:44:03 +08:00
|
|
|
|
|
|
|
#freeimage
|
|
|
|
#LIBS += -lkylinimagecodec
|
|
|
|
LIBS += -lfreeimage \
|
|
|
|
-lfreeimageplus \
|
|
|
|
|
|
|
|
unix:!macx: LIBS += -L$$PWD/../../../usr/lib/x86_64-linux-gnu/ -lsane
|
|
|
|
|
|
|
|
INCLUDEPATH += $$PWD/../../../usr/lib/x86_64-linux-gnu
|
|
|
|
DEPENDPATH += $$PWD/../../../usr/lib/x86_64-linux-gnu
|
|
|
|
|
|
|
|
# The following define makes your compiler emit warnings if you use
|
|
|
|
# any Qt feature that has been marked deprecated (the exact warnings
|
|
|
|
# depend on your compiler). Please consult the documentation of the
|
|
|
|
# deprecated API in order to know how to port your code away from it.
|
|
|
|
DEFINES += QT_DEPRECATED_WARNINGS
|
|
|
|
# MY_IMAGE_DEBUG
|
|
|
|
|
|
|
|
# You can also make your code fail to compile if it uses deprecated APIs.
|
|
|
|
# In order to do so, uncomment the following line.
|
|
|
|
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
|
|
|
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
|
|
|
|
|
|
|
SOURCES += \
|
|
|
|
src/beauty.cpp \
|
|
|
|
src/crop.cpp \
|
|
|
|
src/detectpagewidget.cpp \
|
|
|
|
src/displaywidget.cpp \
|
|
|
|
src/failedpagewidget.cpp \
|
|
|
|
src/global.cpp \
|
|
|
|
src/globalsignal.cpp \
|
2022-10-21 09:59:43 +08:00
|
|
|
src/imageBaseOP/loadimage.cpp \
|
|
|
|
src/imageBaseOP/savefilebase.cpp \
|
|
|
|
src/imageOp/imageoperationbase.cpp \
|
|
|
|
src/imageOp/imageoperationbeauty.cpp \
|
|
|
|
src/imageOp/imageoperationmirror.cpp \
|
|
|
|
src/imageOp/imageoperationocr.cpp \
|
|
|
|
src/imageOp/imageoperationrectify.cpp \
|
|
|
|
src/imageOp/imageoperationrotate.cpp \
|
|
|
|
src/imageOp/imageoperationwatermark.cpp \
|
2022-06-22 18:44:03 +08:00
|
|
|
src/leftimagehandlesuccesspagewidget.cpp \
|
|
|
|
src/leftsuccesspagewidget.cpp \
|
|
|
|
src/main.cpp \
|
|
|
|
src/mainwidget.cpp \
|
|
|
|
src/ocrobject.cpp \
|
|
|
|
src/rectify.cpp \
|
|
|
|
src/runningdialog.cpp \
|
|
|
|
src/saneobject.cpp \
|
|
|
|
src/scandialog.cpp \
|
|
|
|
src/scansettingswidget.cpp \
|
|
|
|
src/sendmail.cpp \
|
|
|
|
src/showimagewidget.cpp \
|
|
|
|
src/showocrwidget.cpp \
|
|
|
|
src/singleapplication.cpp \
|
|
|
|
src/successpagewidget.cpp \
|
|
|
|
src/svghandler.cpp \
|
|
|
|
src/thumbnaildelegate.cpp \
|
|
|
|
src/thumbnailwidget.cpp \
|
|
|
|
src/titlebar/titlebar.cpp \
|
|
|
|
src/toolbarwidget.cpp \
|
|
|
|
src/usb.cpp \
|
|
|
|
src/usbhotplugthread.cpp \
|
2022-10-21 09:59:43 +08:00
|
|
|
src/utils/HorizontalOrVerticalMode.cpp \
|
|
|
|
src/utils/copyoperation.cpp \
|
2022-06-22 18:44:03 +08:00
|
|
|
src/utils/daemondbus.cpp \
|
|
|
|
src/utils/login1_dbus.cpp \
|
2022-11-25 16:56:07 +08:00
|
|
|
src/utils/rotatechangeinfo.cpp \
|
2022-06-22 18:44:03 +08:00
|
|
|
src/utils/xatom-helper.cpp \
|
|
|
|
src/watermarkdialog.cpp
|
|
|
|
|
|
|
|
HEADERS += \
|
|
|
|
src/beauty.h \
|
|
|
|
src/crop.h \
|
|
|
|
src/detectpagewidget.h \
|
|
|
|
src/displaywidget.h \
|
|
|
|
src/failedpagewidget.h \
|
|
|
|
src/global.h \
|
|
|
|
src/globalsignal.h \
|
2022-10-21 09:59:43 +08:00
|
|
|
src/imageBaseOP/loadimage.h \
|
|
|
|
src/imageBaseOP/savefilebase.h \
|
|
|
|
src/imageOp/imageoperationbase.h \
|
|
|
|
src/imageOp/imageoperationbeauty.h \
|
|
|
|
src/imageOp/imageoperationmirror.h \
|
|
|
|
src/imageOp/imageoperationocr.h \
|
|
|
|
src/imageOp/imageoperationrectify.h \
|
|
|
|
src/imageOp/imageoperationrotate.h \
|
|
|
|
src/imageOp/imageoperationwatermark.h \
|
2022-06-22 18:44:03 +08:00
|
|
|
src/include/common.h \
|
|
|
|
src/include/theme.h \
|
|
|
|
src/leftimagehandlesuccesspagewidget.h \
|
|
|
|
src/leftsuccesspagewidget.h \
|
|
|
|
src/mainwidget.h \
|
|
|
|
src/ocrobject.h \
|
|
|
|
src/rectify.h \
|
|
|
|
src/runningdialog.h \
|
|
|
|
src/saneobject.h \
|
|
|
|
src/scandialog.h \
|
|
|
|
src/scansettingswidget.h \
|
|
|
|
src/sendmail.h \
|
|
|
|
src/showimagewidget.h \
|
|
|
|
src/showocrwidget.h \
|
|
|
|
src/singleapplication.h \
|
|
|
|
src/successpagewidget.h \
|
|
|
|
src/svghandler.h \
|
|
|
|
src/thumbnaildelegate.h \
|
|
|
|
src/thumbnailwidget.h \
|
|
|
|
src/titlebar/titlebar.h \
|
|
|
|
src/toolbarwidget.h \
|
|
|
|
src/usb.h \
|
|
|
|
src/usbhotplugthread.h \
|
2022-10-21 09:59:43 +08:00
|
|
|
src/utils/HorizontalOrVerticalMode.h \
|
|
|
|
src/utils/copyoperation.h \
|
2022-06-22 18:44:03 +08:00
|
|
|
src/utils/daemondbus.h \
|
|
|
|
src/utils/login1_dbus.h \
|
2022-11-25 16:56:07 +08:00
|
|
|
src/utils/rotatechangeinfo.h \
|
2022-06-22 18:44:03 +08:00
|
|
|
src/utils/xatom-helper.h \
|
|
|
|
src/watermarkdialog.h
|
|
|
|
|
|
|
|
# Manual
|
|
|
|
DISTFILES += \
|
|
|
|
man/kylin-scanner.1 \
|
|
|
|
src/icons/waiting/loading1.svg \
|
|
|
|
src/icons/waiting/loading2.svg \
|
|
|
|
src/icons/waiting/loading3.svg \
|
|
|
|
src/icons/waiting/loading4.svg \
|
|
|
|
src/icons/waiting/loading5.svg \
|
|
|
|
src/icons/waiting/loading6.svg \
|
|
|
|
src/icons/waiting/loading7.svg
|
|
|
|
|
|
|
|
# UI files
|
|
|
|
FORMS += \
|
|
|
|
src/about/about.ui \
|
|
|
|
src/titlebar/titlebar.ui
|
|
|
|
|
|
|
|
# Translation
|
|
|
|
TRANSLATIONS += \
|
|
|
|
translations/kylin-scanner_zh_CN.ts \
|
|
|
|
translations/kylin-scanner_bo_CN.ts \
|
|
|
|
translations/kylin-scanner_kk.ts \
|
|
|
|
translations/kylin-scanner_ky.ts \
|
|
|
|
translations/kylin-scanner_ug.ts
|
|
|
|
|
|
|
|
!system($$PWD/translations/generate_translations_pm.sh): error("Failed to generate pm")
|
|
|
|
system($$shell_path(cp $$PROJECT_ROOTDIR/translations/*.qm $$OUT_PWD/))
|
|
|
|
|
|
|
|
# custom variable: target
|
|
|
|
target.files += $$TARGET
|
|
|
|
target.path = /usr/bin/
|
|
|
|
|
|
|
|
# custom variable: desktop
|
|
|
|
desktop.files += data/kylin-scanner.desktop
|
|
|
|
desktop.path = /usr/share/applications/
|
|
|
|
|
|
|
|
# custom variable: icons
|
|
|
|
icons.files += data/scanner.png
|
|
|
|
icons.path = /usr/share/pixmaps/
|
|
|
|
|
|
|
|
# custom variable: qm_files
|
|
|
|
qm_files.files = translations/*.qm
|
|
|
|
qm_files.path = /usr/share/kylin-scanner/translations/
|
|
|
|
|
|
|
|
# custom variable: help_files
|
|
|
|
help_files.files = data/kylin-scanner/
|
|
|
|
help_files.path = /usr/share/kylin-user-guide/data/guide/
|
|
|
|
|
|
|
|
# Install file in system
|
|
|
|
INSTALLS += target desktop icons qm_files help_files
|
|
|
|
|
|
|
|
RESOURCES += \
|
|
|
|
src/icons/icons.qrc \
|
|
|
|
src/qss/scrollbar.qrc
|