mirror of
https://github.com/YACReader/yacreader
synced 2025-07-27 09:24:57 -04:00
added an option for choosing between OpenGL/Angle at building time
This commit is contained in:
@ -24,16 +24,25 @@ CONFIG(legacy_gl_widget) {
|
||||
INCLUDEPATH += ../common/gl \
|
||||
}
|
||||
|
||||
#there are going to be two builds for windows, OpenGL based and ANGLE based
|
||||
win32 {
|
||||
CONFIG(force_angle) {
|
||||
message("using ANGLE")
|
||||
LIBS += -L../dependencies/poppler/lib -loleaut32 -lole32 -lshell32 -lopengl32 -lglu32 -luser32
|
||||
#linking extra libs are necesary for a successful compilation, a better approach should be
|
||||
#to remove any OpenGL (desktop) dependencies
|
||||
#the OpenGL stuff should be migrated to OpenGL ES
|
||||
DEFINES += FORCE_ANGLE
|
||||
} else {
|
||||
LIBS += -L../dependencies/poppler/lib -loleaut32 -lole32 -lshell32
|
||||
}
|
||||
|
||||
LIBS += -L../dependencies/poppler/lib -loleaut32 -lole32 -lshell32 -lopengl32 -lglu32 -luser32
|
||||
LIBS += -lpoppler-qt5
|
||||
INCLUDEPATH += ../dependencies/poppler/include/qt5
|
||||
|
||||
LIBS += -lpoppler-qt5
|
||||
INCLUDEPATH += ../dependencies/poppler/include/qt5
|
||||
|
||||
QMAKE_CXXFLAGS_RELEASE += /02 /MP /Ob2 /Oi /Ot /GT /GL
|
||||
QMAKE_LFLAGS_RELEASE += /LTCG
|
||||
CONFIG -= embed_manifest_exe
|
||||
QMAKE_CXXFLAGS_RELEASE += /MP /Ob2 /Oi /Ot /GT /GL
|
||||
QMAKE_LFLAGS_RELEASE += /LTCG
|
||||
CONFIG -= embed_manifest_exe
|
||||
}
|
||||
|
||||
unix:!macx{
|
||||
@ -250,9 +259,13 @@ TRANSLATIONS = yacreaderlibrary_es.ts \
|
||||
yacreaderlibrary_de.ts \
|
||||
yacreaderlibrary_source.ts
|
||||
|
||||
|
||||
Release:DESTDIR = ../release
|
||||
Debug:DESTDIR = ../debug
|
||||
CONFIG(force_angle) {
|
||||
Release:DESTDIR = ../release_angle
|
||||
Debug:DESTDIR = ../debug_angle
|
||||
} else {
|
||||
Release:DESTDIR = ../release
|
||||
Debug:DESTDIR = ../debug
|
||||
}
|
||||
|
||||
#QML/GridView
|
||||
QT += quick qml
|
||||
|
@ -16,6 +16,7 @@ ClassicComicsView::ClassicComicsView(QWidget *parent)
|
||||
settings->beginGroup("libraryConfig");
|
||||
//FLOW-----------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------
|
||||
//FORCE_ANGLE is not used here, because ComicFlowWidgetGL will use OpenGL ES in the future
|
||||
#ifndef NO_OPENGL
|
||||
if((settings->value(USE_OPEN_GL).toBool() == true))
|
||||
comicFlow = new ComicFlowWidgetGL(0);
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "db_helper.h"
|
||||
#include "yacreader_libraries.h"
|
||||
#include "exit_check.h"
|
||||
#include "opengl_checker.h"
|
||||
|
||||
#include "QsLog.h"
|
||||
#include "QsLogDest.h"
|
||||
@ -127,12 +128,16 @@ void logSystemAndConfig()
|
||||
else
|
||||
QLOG_INFO() << "OpenGL : disabled";
|
||||
|
||||
OpenGLChecker checker;
|
||||
QLOG_INFO() << "OpenGL version : " << checker.textVersionDescription();
|
||||
|
||||
QLOG_INFO() << "Libraries: " << DBHelper::getLibraries().getLibraries();
|
||||
QLOG_INFO() << "--------------------------------------------";
|
||||
}
|
||||
|
||||
int main( int argc, char ** argv )
|
||||
{
|
||||
|
||||
//fix for misplaced text in Qt4.8 and Mavericks
|
||||
#ifdef Q_OS_MAC
|
||||
#if QT_VERSION < 0x050000
|
||||
@ -144,9 +149,13 @@ int main( int argc, char ** argv )
|
||||
|
||||
QApplication app( argc, argv );
|
||||
|
||||
#ifdef FORCE_ANGLE
|
||||
app.setAttribute(Qt::AA_UseOpenGLES);
|
||||
#endif
|
||||
|
||||
app.setApplicationName("YACReaderLibrary");
|
||||
app.setOrganizationName("YACReader");
|
||||
qApp->setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
app.setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
//simple command line parser
|
||||
//will be replaced by QCommandLineParser in the future
|
||||
//TODO: --headless, --server=[on|off], support for file and directory arguments
|
||||
@ -212,7 +221,6 @@ int main( int argc, char ** argv )
|
||||
|
||||
if(settings->value(SERVER_ON,true).toBool())
|
||||
{
|
||||
|
||||
s->start();
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user