From 544cfbd2975e5ae62d6e26a90eff8faf47db7dda Mon Sep 17 00:00:00 2001 From: Felix Kauselmann <2039670+selmf@users.noreply.github.com> Date: Wed, 6 Apr 2016 23:58:58 +0200 Subject: [PATCH 01/18] give YACReaderLibraryServer build structure it's own directory --- .../YACReaderLibraryServer.pro | 151 ++++++++++++++++++ YACReaderLibraryServer/headless_config.pri | 71 ++++++++ 2 files changed, 222 insertions(+) create mode 100644 YACReaderLibraryServer/YACReaderLibraryServer.pro create mode 100644 YACReaderLibraryServer/headless_config.pri diff --git a/YACReaderLibraryServer/YACReaderLibraryServer.pro b/YACReaderLibraryServer/YACReaderLibraryServer.pro new file mode 100644 index 00000000..3e390e88 --- /dev/null +++ b/YACReaderLibraryServer/YACReaderLibraryServer.pro @@ -0,0 +1,151 @@ +###################################################################### +# Automatically generated by qmake (2.01a) dom 12. oct 20:47:48 2008 +###################################################################### + +TEMPLATE = app +TARGET = YACReaderLibraryServer +CONFIG += console +DEPENDPATH += ../YACReaderLibrary +INCLUDEPATH += ../YACReaderLibrary +INCLUDEPATH += ../common \ + ../YACReaderLibrary/server \ + ../YACReaderLibrary/db + +DEFINES += SERVER_RELEASE NOMINMAX YACREADER_LIBRARY QT_NO_DEBUG_OUTPUT +QMAKE_MAC_SDK = macosx10.11 +#load default build flags +#do a basic dependency check +include(headless_config.pri) + +win32 { + LIBS += -L../dependencies/poppler/lib -loleaut32 -lole32 -lshell32 -luser32 + LIBS += -lpoppler-qt5 + INCLUDEPATH += ../dependencies/poppler/include/qt5 + + QMAKE_CXXFLAGS_RELEASE += /MP /Ob2 /Oi /Ot /GT /GL + QMAKE_LFLAGS_RELEASE += /LTCG + CONFIG -= embed_manifest_exe +} + +unix:!macx{ +INCLUDEPATH += /usr/include/poppler/qt5 +LIBS += -L/usr/lib -lpoppler-qt5 +} + +macx{ +LIBS += -framework Foundation -framework ApplicationServices -framework AppKit + +OBJECTIVE_SOURCES += $$PWD/../common/pdf_comic.mm +HEADERS += $$PWD/../common/pdf_comic.h +CONFIG += objective_c +} + +unix{ +CONFIG += c++11 +} + +#CONFIG += release +CONFIG -= flat +QT += core sql network script + +# Input +HEADERS += ../YACReaderLibrary/library_creator.h \ + ../YACReaderLibrary/package_manager.h \ + ../YACReaderLibrary/bundle_creator.h \ + ../YACReaderLibrary/db_helper.h \ + ../YACReaderLibrary/db/data_base_management.h \ + ../common/comic_db.h \ + ../common/folder.h \ + ../common/library_item.h \ + ../common/comic.h \ + ../common/bookmarks.h \ + ../common/qnaturalsorting.h \ + ../common/yacreader_global.h \ + ../YACReaderLibrary/yacreader_local_server.h \ + ../YACReaderLibrary/comics_remover.h \ + ../common/http_worker.h \ + ../YACReaderLibrary/yacreader_libraries.h \ + ../YACReaderLibrary/comic_files_manager.h \ + ../YACReaderLibrary/headless/console_ui_library_creator.h + + +SOURCES += ../YACReaderLibrary/library_creator.cpp \ + ../YACReaderLibrary/headless\main.cpp \ + ../YACReaderLibrary/package_manager.cpp \ + ../YACReaderLibrary/bundle_creator.cpp \ + ../YACReaderLibrary/db_helper.cpp \ + ../YACReaderLibrary/db/data_base_management.cpp \ + ../common/comic_db.cpp \ + ../common/folder.cpp \ + ../common/library_item.cpp \ + ../common/comic.cpp \ + ../common/bookmarks.cpp \ + ../common/qnaturalsorting.cpp \ + ../YACReaderLibrary/yacreader_local_server.cpp \ + ../YACReaderLibrary/comics_remover.cpp \ + ../common/http_worker.cpp \ + ../common/yacreader_global.cpp \ + ../YACReaderLibrary/yacreader_libraries.cpp \ + ../YACReaderLibrary/comic_files_manager.cpp \ + ../YACReaderLibrary/headless/console_ui_library_creator.cpp + + +include(../YACReaderLibrary/server/server.pri) +CONFIG(7zip){ +include(../compressed_archive/wrapper.pri) +} else:CONFIG(unarr) { +include(../compressed_archive/unarr/unarr-wrapper.pri) +} else { + error(No compression backend specified. Did you mess with the build system?) +} +include(../QsLog/QsLog.pri) + + +TRANSLATIONS = yacreaderlibraryserver_es.ts \ + yacreaderlibraryserver_ru.ts \ + yacreaderlibraryserver_pt.ts \ + yacreaderlibraryserver_fr.ts \ + yacreaderlibraryserver_nl.ts \ + yacreaderlibraryserver_tr.ts \ + yacreaderlibraryserver_de.ts \ + yacreaderlibraryserver_source.ts + + +RESOURCES += ../YACReaderLibrary/headless/images.qrc + + +Release:DESTDIR = ../release +Debug:DESTDIR = ../debug + + +unix:!macx { +#set install prefix if it's empty +isEmpty(PREFIX) { + PREFIX = /usr +} + +BINDIR = $$PREFIX/bin +LIBDIR = $$PREFIX/lib +DATADIR = $$PREFIX/share + +DEFINES += "LIBDIR=\\\"$$LIBDIR\\\"" "DATADIR=\\\"$$DATADIR\\\"" "BINDIR=\\\"$$BINDIR\\\"" + +#MAKE INSTALL +INSTALLS += bin server translation #manpage + +bin.path = $$BINDIR +isEmpty(DESTDIR) { + bin.files = YACReaderLibraryServer +} else { + bin.files = $$DESTDIR/YACReaderLibraryServer +} + +server.path = $$DATADIR/yacreader +server.files = ../release/server + +translation.path = $$DATADIR/yacreader/languages +translation.files = ../release/languages/yacreaderlibrary_* + +#manpage.path = $$DATADIR/man/man1 +#manpage.files = ../YACReaderLibrary.1 +} diff --git a/YACReaderLibraryServer/headless_config.pri b/YACReaderLibraryServer/headless_config.pri new file mode 100644 index 00000000..ab1e2c65 --- /dev/null +++ b/YACReaderLibraryServer/headless_config.pri @@ -0,0 +1,71 @@ +#functions to automatically initialize some of YACReader's build options to +#default values if they're not set on build time +#for a more detailed description, see INSTALL.TXT + +#check Qt version +QT_VERSION = $$[QT_VERSION] +QT_VERSION = $$split(QT_VERSION, ".") +QT_VER_MAJ = $$member(QT_VERSION, 0) +QT_VER_MIN = $$member(QT_VERSION, 1) + +lessThan(QT_VER_MAJ, 5) { +error(YACReader requires Qt 5 or newer but Qt $$[QT_VERSION] was detected.) + } +lessThan(QT_VER_MIN, 3){ + error ("You need at least Qt 5.3 to build YACReader or YACReaderLibrary") + } +!CONFIG(unarr):!CONFIG(7zip) { + unix { + !macx { + CONFIG+=unarr + } + else { + CONFIG+=7zip + } + + } + win32 { + CONFIG+=7zip + } +} + +unix { + !macx { + packagesExist(QtCore) { + message("Found QtCore") + } + else: { + error("Missing dependency: QtCore") + } + packagesExist(QtGui) { + message("Found QtGui") + } + else: { + error("Missing dependency: QtGui") + } + packagesExist(poppler-qt5) { + message("Found poppler-qt5") + } + else: { + error("Missing dependency: poppler-qt5") + } + packagesExist(QtNetwork) { + message("Found QtNetwork") + } + else: { + error("Missing dependency: QtNetwork") + } + packagesExist(QtSql) { + message("Found QtSql") + } + else: { + error("Missing dependency: QtSql") + } + packagesExist(sqlite3) { + message("Found sqlite3") + } + else: { + error("Missing dependency: sqlite3") + } + } +} \ No newline at end of file From e003c19d02d8b6624290d9aab191ad55676813e6 Mon Sep 17 00:00:00 2001 From: Felix Kauselmann <2039670+selmf@users.noreply.github.com> Date: Thu, 7 Apr 2016 00:01:16 +0200 Subject: [PATCH 02/18] Update tarball script --- mktarball.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mktarball.sh b/mktarball.sh index d1a84f8c..0e1c404c 100755 --- a/mktarball.sh +++ b/mktarball.sh @@ -2,7 +2,7 @@ #Script to create a source tarball for YACReader distribution and packaging #This should be run from YACReaders top source directory -YACVERSION=8.0 +YACVERSION=8.5 if [ -f Makefile ] then make distclean From 64e1c031d10c15bfb1401bd524232ef0a015187d Mon Sep 17 00:00:00 2001 From: Felix Kauselmann <2039670+selmf@users.noreply.github.com> Date: Thu, 7 Apr 2016 00:03:50 +0200 Subject: [PATCH 03/18] Manpage update --- YACReader.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YACReader.1 b/YACReader.1 index 9777636f..8b37afb4 100644 --- a/YACReader.1 +++ b/YACReader.1 @@ -25,7 +25,7 @@ Display this text and exit. .BR \-v, \-\- version Display version information and exit. .SH FEATURES -- rar, zip, cbr, cbz, tar, pdf, 7z and cb7 comics support with compatibility for jpeg, gif, png, tiff and bmp images. +- rar, zip, cbr, cbz, tar, and pdf comics support with compatibility for jpeg, gif, png, tiff, webp and bmp images. .TP - Fast and easy to use. .TP From 04ce6db7054184c0b11c2fea231b436121403fd6 Mon Sep 17 00:00:00 2001 From: Felix Kauselmann <2039670+selmf@users.noreply.github.com> Date: Thu, 7 Apr 2016 00:13:11 +0200 Subject: [PATCH 04/18] Fix manpage typo. --- YACReader.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YACReader.1 b/YACReader.1 index 8b37afb4..4f3d7987 100644 --- a/YACReader.1 +++ b/YACReader.1 @@ -25,7 +25,7 @@ Display this text and exit. .BR \-v, \-\- version Display version information and exit. .SH FEATURES -- rar, zip, cbr, cbz, tar, and pdf comics support with compatibility for jpeg, gif, png, tiff, webp and bmp images. +- rar, zip, cbr, cbz, tar and pdf comics support with compatibility for jpeg, gif, png, tiff, webp and bmp images. .TP - Fast and easy to use. .TP From 801f94bee80bbffc8bf4c8790457fca75ddc27b9 Mon Sep 17 00:00:00 2001 From: Felix Kauselmann <2039670+selmf@users.noreply.github.com> Date: Thu, 7 Apr 2016 00:15:39 +0200 Subject: [PATCH 05/18] headless build system cleanup --- YACReaderLibrary/YACReaderLibraryServer.pro | 151 -------------------- YACReaderLibrary/headless_config.pri | 71 --------- 2 files changed, 222 deletions(-) delete mode 100644 YACReaderLibrary/YACReaderLibraryServer.pro delete mode 100644 YACReaderLibrary/headless_config.pri diff --git a/YACReaderLibrary/YACReaderLibraryServer.pro b/YACReaderLibrary/YACReaderLibraryServer.pro deleted file mode 100644 index d377d567..00000000 --- a/YACReaderLibrary/YACReaderLibraryServer.pro +++ /dev/null @@ -1,151 +0,0 @@ -###################################################################### -# Automatically generated by qmake (2.01a) dom 12. oct 20:47:48 2008 -###################################################################### - -TEMPLATE = app -TARGET = YACReaderLibraryServer -CONFIG += console -DEPENDPATH += . -INCLUDEPATH += . -INCLUDEPATH += ../common \ - ./server \ - ./db - -DEFINES += SERVER_RELEASE NOMINMAX YACREADER_LIBRARY QT_NO_DEBUG_OUTPUT -QMAKE_MAC_SDK = macosx10.11 -#load default build flags -#do a basic dependency check -include(headless_config.pri) - -win32 { - LIBS += -L../dependencies/poppler/lib -loleaut32 -lole32 -lshell32 -luser32 - LIBS += -lpoppler-qt5 - INCLUDEPATH += ../dependencies/poppler/include/qt5 - - QMAKE_CXXFLAGS_RELEASE += /MP /Ob2 /Oi /Ot /GT /GL - QMAKE_LFLAGS_RELEASE += /LTCG - CONFIG -= embed_manifest_exe -} - -unix:!macx{ -INCLUDEPATH += /usr/include/poppler/qt5 -LIBS += -L/usr/lib -lpoppler-qt5 -} - -macx{ -LIBS += -framework Foundation -framework ApplicationServices -framework AppKit - -OBJECTIVE_SOURCES += $$PWD/../common/pdf_comic.mm -HEADERS += $$PWD/../common/pdf_comic.h -CONFIG += objective_c -} - -unix{ -CONFIG += c++11 -} - -#CONFIG += release -CONFIG -= flat -QT += core sql network script - -# Input -HEADERS += library_creator.h \ - package_manager.h \ - bundle_creator.h \ - db_helper.h \ - ./db/data_base_management.h \ - ../common/comic_db.h \ - ../common/folder.h \ - ../common/library_item.h \ - ../common/comic.h \ - ../common/bookmarks.h \ - ../common/qnaturalsorting.h \ - ../common/yacreader_global.h \ - yacreader_local_server.h \ - comics_remover.h \ - ../common/http_worker.h \ - yacreader_libraries.h \ - comic_files_manager.h \ - headless/console_ui_library_creator.h - - -SOURCES += library_creator.cpp \ - .\headless\main.cpp \ - package_manager.cpp \ - bundle_creator.cpp \ - db_helper.cpp \ - ./db/data_base_management.cpp \ - ../common/comic_db.cpp \ - ../common/folder.cpp \ - ../common/library_item.cpp \ - ../common/comic.cpp \ - ../common/bookmarks.cpp \ - ../common/qnaturalsorting.cpp \ - yacreader_local_server.cpp \ - comics_remover.cpp \ - ../common/http_worker.cpp \ - ../common/yacreader_global.cpp \ - yacreader_libraries.cpp \ - comic_files_manager.cpp \ - headless/console_ui_library_creator.cpp - - -include(./server/server.pri) -CONFIG(7zip){ -include(../compressed_archive/wrapper.pri) -} else:CONFIG(unarr) { -include(../compressed_archive/unarr/unarr-wrapper.pri) -} else { - error(No compression backend specified. Did you mess with the build system?) -} -include(../QsLog/QsLog.pri) - - -TRANSLATIONS = yacreaderlibraryserver_es.ts \ - yacreaderlibraryserver_ru.ts \ - yacreaderlibraryserver_pt.ts \ - yacreaderlibraryserver_fr.ts \ - yacreaderlibraryserver_nl.ts \ - yacreaderlibraryserver_tr.ts \ - yacreaderlibraryserver_de.ts \ - yacreaderlibraryserver_source.ts - - -RESOURCES += headless/images.qrc - - -Release:DESTDIR = ../release -Debug:DESTDIR = ../debug - - -unix:!macx { -#set install prefix if it's empty -isEmpty(PREFIX) { - PREFIX = /usr -} - -BINDIR = $$PREFIX/bin -LIBDIR = $$PREFIX/lib -DATADIR = $$PREFIX/share - -DEFINES += "LIBDIR=\\\"$$LIBDIR\\\"" "DATADIR=\\\"$$DATADIR\\\"" "BINDIR=\\\"$$BINDIR\\\"" - -#MAKE INSTALL -INSTALLS += bin server translation #manpage - -bin.path = $$BINDIR -isEmpty(DESTDIR) { - bin.files = YACReaderLibraryServer -} else { - bin.files = $$DESTDIR/YACReaderLibraryServer -} - -server.path = $$DATADIR/yacreader -server.files = ../release/server - -translation.path = $$DATADIR/yacreader/languages -translation.files = ../release/languages/yacreaderlibrary_* - -#manpage.path = $$DATADIR/man/man1 -#manpage.files = ../YACReaderLibrary.1 -} diff --git a/YACReaderLibrary/headless_config.pri b/YACReaderLibrary/headless_config.pri deleted file mode 100644 index ab1e2c65..00000000 --- a/YACReaderLibrary/headless_config.pri +++ /dev/null @@ -1,71 +0,0 @@ -#functions to automatically initialize some of YACReader's build options to -#default values if they're not set on build time -#for a more detailed description, see INSTALL.TXT - -#check Qt version -QT_VERSION = $$[QT_VERSION] -QT_VERSION = $$split(QT_VERSION, ".") -QT_VER_MAJ = $$member(QT_VERSION, 0) -QT_VER_MIN = $$member(QT_VERSION, 1) - -lessThan(QT_VER_MAJ, 5) { -error(YACReader requires Qt 5 or newer but Qt $$[QT_VERSION] was detected.) - } -lessThan(QT_VER_MIN, 3){ - error ("You need at least Qt 5.3 to build YACReader or YACReaderLibrary") - } -!CONFIG(unarr):!CONFIG(7zip) { - unix { - !macx { - CONFIG+=unarr - } - else { - CONFIG+=7zip - } - - } - win32 { - CONFIG+=7zip - } -} - -unix { - !macx { - packagesExist(QtCore) { - message("Found QtCore") - } - else: { - error("Missing dependency: QtCore") - } - packagesExist(QtGui) { - message("Found QtGui") - } - else: { - error("Missing dependency: QtGui") - } - packagesExist(poppler-qt5) { - message("Found poppler-qt5") - } - else: { - error("Missing dependency: poppler-qt5") - } - packagesExist(QtNetwork) { - message("Found QtNetwork") - } - else: { - error("Missing dependency: QtNetwork") - } - packagesExist(QtSql) { - message("Found QtSql") - } - else: { - error("Missing dependency: QtSql") - } - packagesExist(sqlite3) { - message("Found sqlite3") - } - else: { - error("Missing dependency: sqlite3") - } - } -} \ No newline at end of file From 25ea29275ac936562fa6b451675366746dd697c4 Mon Sep 17 00:00:00 2001 From: Felix Kauselmann <2039670+selmf@users.noreply.github.com> Date: Thu, 7 Apr 2016 00:42:36 +0200 Subject: [PATCH 06/18] Disable server and translation install for headless to avoid packaging conflicts --- YACReaderLibraryServer/YACReaderLibraryServer.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YACReaderLibraryServer/YACReaderLibraryServer.pro b/YACReaderLibraryServer/YACReaderLibraryServer.pro index 3e390e88..c1420715 100644 --- a/YACReaderLibraryServer/YACReaderLibraryServer.pro +++ b/YACReaderLibraryServer/YACReaderLibraryServer.pro @@ -131,7 +131,7 @@ DATADIR = $$PREFIX/share DEFINES += "LIBDIR=\\\"$$LIBDIR\\\"" "DATADIR=\\\"$$DATADIR\\\"" "BINDIR=\\\"$$BINDIR\\\"" #MAKE INSTALL -INSTALLS += bin server translation #manpage +INSTALLS += bin #server #translation #manpage bin.path = $$BINDIR isEmpty(DESTDIR) { From 71ba1de373d4c15527a60b908594f1ab3bfa9e37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Tue, 26 Apr 2016 16:17:54 +0200 Subject: [PATCH 07/18] prevent crash is something goes wrong processing a PDF in OSX --- common/pdf_comic.mm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/common/pdf_comic.mm b/common/pdf_comic.mm index 7f9b32ce..3eda1c07 100644 --- a/common/pdf_comic.mm +++ b/common/pdf_comic.mm @@ -97,6 +97,15 @@ QImage MacOSXPDFComic::getPage(const int pageNum) lastPageData = (void *)dataRef; + if(!lastPageData) + { + QLOG_ERROR() << "Unable to extract image from PDF file using CGPDFDocument"; + CGImageRelease(image); + CGContextRelease(bitmapContext); + CGColorSpaceRelease(genericColorSpace); + return QImage(); + } + const uchar *bytes = (const uchar *)CFDataGetBytePtr(dataRef); qtImage = QImage(bytes, pageRect.size.width, pageRect.size.height, QImage::Format_ARGB32); From 4113d8781553953dc9aab7901df875f04588c991 Mon Sep 17 00:00:00 2001 From: Felix Kauselmann <2039670+selmf@users.noreply.github.com> Date: Tue, 10 May 2016 08:18:27 +0200 Subject: [PATCH 08/18] Actually check for qt5 packages in headless server build --- YACReaderLibraryServer/headless_config.pri | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/YACReaderLibraryServer/headless_config.pri b/YACReaderLibraryServer/headless_config.pri index ab1e2c65..d856def2 100644 --- a/YACReaderLibraryServer/headless_config.pri +++ b/YACReaderLibraryServer/headless_config.pri @@ -31,13 +31,13 @@ lessThan(QT_VER_MIN, 3){ unix { !macx { - packagesExist(QtCore) { + packagesExist(Qt5Core) { message("Found QtCore") } else: { error("Missing dependency: QtCore") } - packagesExist(QtGui) { + packagesExist(Qt5Gui) { message("Found QtGui") } else: { @@ -49,13 +49,13 @@ unix { else: { error("Missing dependency: poppler-qt5") } - packagesExist(QtNetwork) { + packagesExist(Qt5Network) { message("Found QtNetwork") } else: { error("Missing dependency: QtNetwork") } - packagesExist(QtSql) { + packagesExist(Qt5Sql) { message("Found QtSql") } else: { From 315063ba244e7764d86a1e7250c03e1fce032474 Mon Sep 17 00:00:00 2001 From: Felix Kauselmann <2039670+selmf@users.noreply.github.com> Date: Tue, 10 May 2016 09:17:14 +0200 Subject: [PATCH 09/18] Introduce server build types 'standalone' and 'bundled' --- YACReaderLibraryServer/YACReaderLibraryServer.pro | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/YACReaderLibraryServer/YACReaderLibraryServer.pro b/YACReaderLibraryServer/YACReaderLibraryServer.pro index c1420715..667817d4 100644 --- a/YACReaderLibraryServer/YACReaderLibraryServer.pro +++ b/YACReaderLibraryServer/YACReaderLibraryServer.pro @@ -131,7 +131,16 @@ DATADIR = $$PREFIX/share DEFINES += "LIBDIR=\\\"$$LIBDIR\\\"" "DATADIR=\\\"$$DATADIR\\\"" "BINDIR=\\\"$$BINDIR\\\"" #MAKE INSTALL -INSTALLS += bin #server #translation #manpage +CONFIG(server_standalone) { + INSTALLS += bin server translation manpage +} +else:CONFIG(server_bundled) { + INSTALLS += bin +} +else { + message(No build type specified. Defaulting to standalone server build.) +} + bin.path = $$BINDIR isEmpty(DESTDIR) { From 79a8a45895d68a369f52b6e1acecc948c21961e7 Mon Sep 17 00:00:00 2001 From: Felix Kauselmann <2039670+selmf@users.noreply.github.com> Date: Tue, 10 May 2016 18:25:36 +0200 Subject: [PATCH 10/18] Be more detailed when defaulting to standalone build in YACReaderLibraryServer --- YACReaderLibraryServer/YACReaderLibraryServer.pro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/YACReaderLibraryServer/YACReaderLibraryServer.pro b/YACReaderLibraryServer/YACReaderLibraryServer.pro index 667817d4..4f3a6af6 100644 --- a/YACReaderLibraryServer/YACReaderLibraryServer.pro +++ b/YACReaderLibraryServer/YACReaderLibraryServer.pro @@ -138,9 +138,9 @@ else:CONFIG(server_bundled) { INSTALLS += bin } else { - message(No build type specified. Defaulting to standalone server build.) + message("No build type specified. Defaulting to standalone server build (CONFIG+=server_bundled).") + message("If you wish to run YACReaderLibraryServer on a system with an existing install of YACReaderLibrary, please specify CONFIG+=server_bundled as an option when running qmake.") } - bin.path = $$BINDIR isEmpty(DESTDIR) { From ce8d6c3c293a27a583c39ef3a89897832f8a2b75 Mon Sep 17 00:00:00 2001 From: Felix Kauselmann <2039670+selmf@users.noreply.github.com> Date: Fri, 13 May 2016 19:49:29 +0200 Subject: [PATCH 11/18] Don't abort makefile generation on dependency check errors. --- YACReaderLibraryServer/headless_config.pri | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/YACReaderLibraryServer/headless_config.pri b/YACReaderLibraryServer/headless_config.pri index d856def2..2df837a1 100644 --- a/YACReaderLibraryServer/headless_config.pri +++ b/YACReaderLibraryServer/headless_config.pri @@ -35,37 +35,37 @@ unix { message("Found QtCore") } else: { - error("Missing dependency: QtCore") + message("Missing dependency: QtCore") } packagesExist(Qt5Gui) { message("Found QtGui") } else: { - error("Missing dependency: QtGui") + message("Missing dependency: QtGui") } packagesExist(poppler-qt5) { message("Found poppler-qt5") } else: { - error("Missing dependency: poppler-qt5") + message("Missing dependency: poppler-qt5") } packagesExist(Qt5Network) { message("Found QtNetwork") } else: { - error("Missing dependency: QtNetwork") + message("Missing dependency: QtNetwork") } packagesExist(Qt5Sql) { message("Found QtSql") } else: { - error("Missing dependency: QtSql") + message("Missing dependency: QtSql") } packagesExist(sqlite3) { message("Found sqlite3") } else: { - error("Missing dependency: sqlite3") + message("Missing dependency: sqlite3") } } } \ No newline at end of file From b2a0dc55811e575648e609f975f828dfa8db456d Mon Sep 17 00:00:00 2001 From: Felix Kauselmann <2039670+selmf@users.noreply.github.com> Date: Fri, 13 May 2016 19:51:11 +0200 Subject: [PATCH 12/18] Explicitely mention Qt5 in dependency check --- YACReaderLibraryServer/headless_config.pri | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/YACReaderLibraryServer/headless_config.pri b/YACReaderLibraryServer/headless_config.pri index 2df837a1..fd5601b8 100644 --- a/YACReaderLibraryServer/headless_config.pri +++ b/YACReaderLibraryServer/headless_config.pri @@ -32,16 +32,16 @@ lessThan(QT_VER_MIN, 3){ unix { !macx { packagesExist(Qt5Core) { - message("Found QtCore") + message("Found Qt5Core") } else: { - message("Missing dependency: QtCore") + message("Missing dependency: Qt5Core") } packagesExist(Qt5Gui) { - message("Found QtGui") + message("Found Qt5Gui") } else: { - message("Missing dependency: QtGui") + message("Missing dependency: Qt5Gui") } packagesExist(poppler-qt5) { message("Found poppler-qt5") @@ -50,16 +50,16 @@ unix { message("Missing dependency: poppler-qt5") } packagesExist(Qt5Network) { - message("Found QtNetwork") + message("Found Qt5Network") } else: { - message("Missing dependency: QtNetwork") + message("Missing dependency: Qt5Network") } packagesExist(Qt5Sql) { - message("Found QtSql") + message("Found Qt5Sql") } else: { - message("Missing dependency: QtSql") + message("Missing dependency: Qt5Sql") } packagesExist(sqlite3) { message("Found sqlite3") From e8ddfb8f4512c614afb686e38d9e0b0e20ebd0a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Fri, 20 May 2016 23:05:22 +0200 Subject: [PATCH 13/18] removed unneeded Qt module from YACReaderLibraryServer.pro --- YACReaderLibrary/YACReaderLibrary.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YACReaderLibrary/YACReaderLibrary.pro b/YACReaderLibrary/YACReaderLibrary.pro index 53db0a03..6f2efe01 100644 --- a/YACReaderLibrary/YACReaderLibrary.pro +++ b/YACReaderLibrary/YACReaderLibrary.pro @@ -81,7 +81,7 @@ CONFIG += c++11 #CONFIG += release CONFIG -= flat -QT += sql network widgets script +QT += sql network widgets !CONFIG(no_opengl) { QT += opengl } From 0d661fbf966d7c8e5bbda25d8b03d07fb60c9872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Fri, 20 May 2016 23:08:56 +0200 Subject: [PATCH 14/18] fixed previous commit, script module was removed from the wrong .pro file --- YACReaderLibrary/YACReaderLibrary.pro | 2 +- YACReaderLibraryServer/YACReaderLibraryServer.pro | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/YACReaderLibrary/YACReaderLibrary.pro b/YACReaderLibrary/YACReaderLibrary.pro index 6f2efe01..53db0a03 100644 --- a/YACReaderLibrary/YACReaderLibrary.pro +++ b/YACReaderLibrary/YACReaderLibrary.pro @@ -81,7 +81,7 @@ CONFIG += c++11 #CONFIG += release CONFIG -= flat -QT += sql network widgets +QT += sql network widgets script !CONFIG(no_opengl) { QT += opengl } diff --git a/YACReaderLibraryServer/YACReaderLibraryServer.pro b/YACReaderLibraryServer/YACReaderLibraryServer.pro index 4f3a6af6..f05621dc 100644 --- a/YACReaderLibraryServer/YACReaderLibraryServer.pro +++ b/YACReaderLibraryServer/YACReaderLibraryServer.pro @@ -46,7 +46,7 @@ CONFIG += c++11 #CONFIG += release CONFIG -= flat -QT += core sql network script +QT += core sql network # Input HEADERS += ../YACReaderLibrary/library_creator.h \ From be26b1a131124143081551409b8bf3b2ea1ba431 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Sat, 21 May 2016 19:00:25 +0200 Subject: [PATCH 15/18] fixed YACReaderLibraryServer server_standalone install --- YACReaderLibraryServer/YACReaderLibraryServer.pro | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/YACReaderLibraryServer/YACReaderLibraryServer.pro b/YACReaderLibraryServer/YACReaderLibraryServer.pro index f05621dc..1e6d1f7e 100644 --- a/YACReaderLibraryServer/YACReaderLibraryServer.pro +++ b/YACReaderLibraryServer/YACReaderLibraryServer.pro @@ -132,13 +132,14 @@ DEFINES += "LIBDIR=\\\"$$LIBDIR\\\"" "DATADIR=\\\"$$DATADIR\\\"" "BINDIR=\\\"$$ #MAKE INSTALL CONFIG(server_standalone) { - INSTALLS += bin server translation manpage + INSTALLS += bin server translation } else:CONFIG(server_bundled) { INSTALLS += bin } else { - message("No build type specified. Defaulting to standalone server build (CONFIG+=server_bundled).") + INSTALLS += bin server translation + message("No build type specified. Defaulting to standalone server build (CONFIG+=server_standalone).") message("If you wish to run YACReaderLibraryServer on a system with an existing install of YACReaderLibrary, please specify CONFIG+=server_bundled as an option when running qmake.") } From d011ea25865f9542a56bdadc0614d24f65fcd6bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Sat, 21 May 2016 19:02:04 +0200 Subject: [PATCH 16/18] fixed log output level in YACReaderLibraryServer --- YACReaderLibrary/headless/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YACReaderLibrary/headless/main.cpp b/YACReaderLibrary/headless/main.cpp index 5888208f..4f78d6a6 100644 --- a/YACReaderLibrary/headless/main.cpp +++ b/YACReaderLibrary/headless/main.cpp @@ -132,7 +132,7 @@ int main( int argc, char ** argv ) QDir().mkpath(YACReader::getSettingsPath()); Logger& logger = Logger::instance(); - logger.setLoggingLevel(QsLogging::TraceLevel); + logger.setLoggingLevel(QsLogging::InfoLevel); DestinationPtr fileDestination(DestinationFactory::MakeFileDestination( destLog, EnableLogRotation, MaxSizeBytes(1048576), MaxOldLogCount(2))); From 3b08264f6ae60c6cefd6d0b9af3341dab7b257cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Sat, 21 May 2016 21:11:04 +0200 Subject: [PATCH 17/18] fixed libraries paths in YACReaderLibraryServer --- .../headless/console_ui_library_creator.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/YACReaderLibrary/headless/console_ui_library_creator.cpp b/YACReaderLibrary/headless/console_ui_library_creator.cpp index e7e6adf0..aa133c6f 100644 --- a/YACReaderLibrary/headless/console_ui_library_creator.cpp +++ b/YACReaderLibrary/headless/console_ui_library_creator.cpp @@ -17,7 +17,10 @@ void ConsoleUILibraryCreator::createLibrary(const QString & name, const QString QEventLoop eventLoop; LibraryCreator * libraryCreator = new LibraryCreator(); - libraryCreator->createLibrary(QDir::cleanPath(path),QDir::cleanPath(path)+"/.yacreaderlibrary"); + QDir pathDir(path); + QString cleanPath = QDir::cleanPath(pathDir.absolutePath()); + + libraryCreator->createLibrary(cleanPath,QDir::cleanPath(pathDir.absolutePath()+"/.yacreaderlibrary")); connect(libraryCreator, &LibraryCreator::finished, this, &ConsoleUILibraryCreator::done); connect(libraryCreator, &LibraryCreator::comicAdded, this, &ConsoleUILibraryCreator::newComic); @@ -33,7 +36,7 @@ void ConsoleUILibraryCreator::createLibrary(const QString & name, const QString //TODO, at some point some checking is needed for avoiding duplicated libraries YACReaderLibraries yacreaderLibraries; yacreaderLibraries.load(); - yacreaderLibraries.addLibrary(name, path); + yacreaderLibraries.addLibrary(name, cleanPath); yacreaderLibraries.save(); } @@ -42,7 +45,10 @@ void ConsoleUILibraryCreator::updateLibrary(const QString & path) QEventLoop eventLoop; LibraryCreator * libraryCreator = new LibraryCreator(); - libraryCreator->updateLibrary(QDir::cleanPath(path),QDir::cleanPath(path)+"/.yacreaderlibrary"); + QDir pathDir(path); + QString cleanPath = QDir::cleanPath(pathDir.absolutePath()); + + libraryCreator->updateLibrary(cleanPath,QDir::cleanPath(pathDir.absolutePath()+"/.yacreaderlibrary")); connect(libraryCreator, &LibraryCreator::finished, this, &ConsoleUILibraryCreator::done); connect(libraryCreator, &LibraryCreator::comicAdded, this, &ConsoleUILibraryCreator::newComic); @@ -58,13 +64,16 @@ void ConsoleUILibraryCreator::updateLibrary(const QString & path) void ConsoleUILibraryCreator::addExistingLibrary(const QString & name, const QString & path) { + QDir pathDir(path); + QString cleanPath = QDir::cleanPath(pathDir.absolutePath()); + //TODO add error handling YACReaderLibraries yacreaderLibraries; yacreaderLibraries.load(); - yacreaderLibraries.addLibrary(name, path); + yacreaderLibraries.addLibrary(name, cleanPath); yacreaderLibraries.save(); - std::cout << "Library added : " << name.toUtf8().constData() << " at " << path.toUtf8().constData() << std::endl; + std::cout << "Library added : " << name.toUtf8().constData() << " at " << cleanPath.toUtf8().constData() << std::endl; } void ConsoleUILibraryCreator::removeLibrary(const QString & name) From 859c307324fba9464fb6522425908606d05b00b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Sat, 21 May 2016 21:46:24 +0200 Subject: [PATCH 18/18] bump version number to 8.6.0 --- common/yacreader_global.h | 2 +- mktarball.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/yacreader_global.h b/common/yacreader_global.h index d42e110d..c55a04c3 100644 --- a/common/yacreader_global.h +++ b/common/yacreader_global.h @@ -7,7 +7,7 @@ #include #endif -#define VERSION "8.5.0" +#define VERSION "8.6.0" #define USE_BACKGROUND_IMAGE_IN_GRID_VIEW "USE_BACKGROUND_IMAGE_IN_GRID_VIEW" #define OPACITY_BACKGROUND_IMAGE_IN_GRID_VIEW "OPACITY_BACKGROUND_IMAGE_IN_GRID_VIEW" diff --git a/mktarball.sh b/mktarball.sh index 0e1c404c..774cf038 100755 --- a/mktarball.sh +++ b/mktarball.sh @@ -2,7 +2,7 @@ #Script to create a source tarball for YACReader distribution and packaging #This should be run from YACReaders top source directory -YACVERSION=8.5 +YACVERSION=8.6 if [ -f Makefile ] then make distclean