merged develop

This commit is contained in:
Luis Ángel San Martín 2016-06-16 19:23:36 +02:00
commit edbb642cee
8 changed files with 80 additions and 52 deletions

View File

@ -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

View File

@ -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)

View File

@ -141,7 +141,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)));

View File

@ -5,11 +5,11 @@
TEMPLATE = app
TARGET = YACReaderLibraryServer
CONFIG += console
DEPENDPATH += .
INCLUDEPATH += .
DEPENDPATH += ../YACReaderLibrary
INCLUDEPATH += ../YACReaderLibrary
INCLUDEPATH += ../common \
./server \
./db
../YACReaderLibrary/server \
../YACReaderLibrary/db
DEFINES += SERVER_RELEASE NOMINMAX YACREADER_LIBRARY QT_NO_DEBUG_OUTPUT
QMAKE_MAC_SDK = macosx10.11
@ -46,14 +46,14 @@ CONFIG += c++11
#CONFIG += release
CONFIG -= flat
QT += core sql network script
QT += core sql network
# Input
HEADERS += library_creator.h \
package_manager.h \
bundle_creator.h \
db_helper.h \
./db/data_base_management.h \
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 \
@ -61,36 +61,36 @@ HEADERS += library_creator.h \
../common/bookmarks.h \
../common/qnaturalsorting.h \
../common/yacreader_global.h \
yacreader_local_server.h \
comics_remover.h \
../YACReaderLibrary/yacreader_local_server.h \
../YACReaderLibrary/comics_remover.h \
../common/http_worker.h \
yacreader_libraries.h \
comic_files_manager.h \
headless/console_ui_library_creator.h
../YACReaderLibrary/yacreader_libraries.h \
../YACReaderLibrary/comic_files_manager.h \
../YACReaderLibrary/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 \
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 \
yacreader_local_server.cpp \
comics_remover.cpp \
../YACReaderLibrary/yacreader_local_server.cpp \
../YACReaderLibrary/comics_remover.cpp \
../common/http_worker.cpp \
../common/yacreader_global.cpp \
yacreader_libraries.cpp \
comic_files_manager.cpp \
headless/console_ui_library_creator.cpp
../YACReaderLibrary/yacreader_libraries.cpp \
../YACReaderLibrary/comic_files_manager.cpp \
../YACReaderLibrary/headless/console_ui_library_creator.cpp
include(./server/server.pri)
include(../YACReaderLibrary/server/server.pri)
CONFIG(7zip){
include(../compressed_archive/wrapper.pri)
} else:CONFIG(unarr) {
@ -111,7 +111,7 @@ TRANSLATIONS = yacreaderlibraryserver_es.ts \
yacreaderlibraryserver_source.ts
RESOURCES += headless/images.qrc
RESOURCES += ../YACReaderLibrary/headless/images.qrc
Release:DESTDIR = ../release
@ -131,7 +131,17 @@ DATADIR = $$PREFIX/share
DEFINES += "LIBDIR=\\\"$$LIBDIR\\\"" "DATADIR=\\\"$$DATADIR\\\"" "BINDIR=\\\"$$BINDIR\\\""
#MAKE INSTALL
INSTALLS += bin server translation #manpage
CONFIG(server_standalone) {
INSTALLS += bin server translation
}
else:CONFIG(server_bundled) {
INSTALLS += bin
}
else {
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.")
}
bin.path = $$BINDIR
isEmpty(DESTDIR) {

View File

@ -31,41 +31,41 @@ lessThan(QT_VER_MIN, 3){
unix {
!macx {
packagesExist(QtCore) {
message("Found QtCore")
packagesExist(Qt5Core) {
message("Found Qt5Core")
}
else: {
error("Missing dependency: QtCore")
message("Missing dependency: Qt5Core")
}
packagesExist(QtGui) {
message("Found QtGui")
packagesExist(Qt5Gui) {
message("Found Qt5Gui")
}
else: {
error("Missing dependency: QtGui")
message("Missing dependency: Qt5Gui")
}
packagesExist(poppler-qt5) {
message("Found poppler-qt5")
}
else: {
error("Missing dependency: poppler-qt5")
message("Missing dependency: poppler-qt5")
}
packagesExist(QtNetwork) {
message("Found QtNetwork")
packagesExist(Qt5Network) {
message("Found Qt5Network")
}
else: {
error("Missing dependency: QtNetwork")
message("Missing dependency: Qt5Network")
}
packagesExist(QtSql) {
message("Found QtSql")
packagesExist(Qt5Sql) {
message("Found Qt5Sql")
}
else: {
error("Missing dependency: QtSql")
message("Missing dependency: Qt5Sql")
}
packagesExist(sqlite3) {
message("Found sqlite3")
}
else: {
error("Missing dependency: sqlite3")
message("Missing dependency: sqlite3")
}
}
}

View File

@ -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);

View File

@ -7,7 +7,7 @@
#include <QDesktopServices>
#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"

View File

@ -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.6
if [ -f Makefile ]
then
make distclean