1
0
mirror of https://gitlab.com/pholy/OSCAR-code.git synced 2025-04-07 11:40:42 +00:00

Allow Help-less builds on Qt 5.7

This commit is contained in:
Phil Olynyk 2019-02-11 17:40:24 -05:00
parent f578cee0e8
commit 2d3179d8c5
2 changed files with 46 additions and 26 deletions

View File

@ -1,9 +1,12 @@
lessThan(QT_MAJOR_VERSION,5)|lessThan(QT_MINOR_VERSION,9) { lessThan(QT_MAJOR_VERSION,5)|lessThan(QT_MINOR_VERSION,9) {
error("You need to Qt 5.9 or newer to build SleepyHead"); message("You need to Qt 5.9 or newer to build OSCR with Help Pages")
lessThan(QT_MAJOR_VERSION,5)|lessThan(QT_MINOR_VERSION,7) {
error("You need Qt 5.7 or newer to build OSCR")
}
} }
TEMPLATE = subdirs TEMPLATE = subdirs
SUBDIRS += sleepyhead SUBDIRS += oscr
CONFIG += ordered CONFIG += ordered

View File

@ -5,16 +5,23 @@
#------------------------------------------------- #-------------------------------------------------
lessThan(QT_MAJOR_VERSION,5)|lessThan(QT_MINOR_VERSION,9) { lessThan(QT_MAJOR_VERSION,5)|lessThan(QT_MINOR_VERSION,9) {
error("You need to Qt 5.9 or newer to build SleepyHead"); message("You need Qt 5.9 to build OSCR with Help Pages")
DEFINES += helpless
}
lessThan(QT_MAJOR_VERSION,5)|lessThan(QT_MINOR_VERSION,7) {
error("You need Qt 5.7 or newer to build OSCR");
} }
QT += core gui network xml printsupport serialport widgets help QT += core gui network xml printsupport serialport widgets help
contains(DEFINES, helpless) {
QT -= help
}
DEFINES += QT_DEPRECATED_WARNINGS DEFINES += QT_DEPRECATED_WARNINGS
#SleepyHead requires OpenGL 2.0 support to run smoothly #OSRC requires OpenGL 2.0 support to run smoothly
#On platforms where it's not available, it can still be built to work #On platforms where it's not available, it can still be built to work
#provided the BrokenGL DEFINES flag is passed to qmake (eg, qmake [specs] /path/to/SleepyHeadQT.pro DEFINES+=BrokenGL) (hint, Projects button on the left) #provided the BrokenGL DEFINES flag is passed to qmake (eg, qmake [specs] /path/to/OSCR_QT.pro DEFINES+=BrokenGL) (hint, Projects button on the left)
contains(DEFINES, NoGL) { contains(DEFINES, NoGL) {
message("Building with QWidget gGraphView to support systems without ANY OpenGL") message("Building with QWidget gGraphView to support systems without ANY OpenGL")
DEFINES += BROKEN_OPENGL_BUILD DEFINES += BROKEN_OPENGL_BUILD
@ -43,7 +50,7 @@ contains(DEFINES, STATIC) {
} }
} }
TARGET = SleepyHead TARGET = Oscr
unix:!macx:!haiku { unix:!macx:!haiku {
TARGET.path=/usr/bin TARGET.path=/usr/bin
} }
@ -64,13 +71,15 @@ win32 {
PRE_TARGETDEPS += git_info.h PRE_TARGETDEPS += git_info.h
QMAKE_EXTRA_TARGETS += gitinfotarget QMAKE_EXTRA_TARGETS += gitinfotarget
!contains(DEFINES, helpless) {
#Build the help documentation #Build the help documentation
message("Generating help files"); message("Generating help files");
qtPrepareTool(QCOLGENERATOR, qcollectiongenerator) qtPrepareTool(QCOLGENERATOR, qcollectiongenerator)
command=$$QCOLGENERATOR $$PWD/help/index.qhcp -o $$PWD/help/index.qhc command=$$QCOLGENERATOR $$PWD/help/index.qhcp -o $$PWD/help/index.qhc
system($$command)|error("Failed to run: $$command") system($$command)|error("Failed to run: $$command")
message("Finished generating help files"); message("Finished generating help files");
}
macx { macx {
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7 QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7
@ -86,12 +95,12 @@ macx {
DEFINES += WINVER=0x0501 # needed for mingw to pull in appropriate dbt business...probably a better way to do this DEFINES += WINVER=0x0501 # needed for mingw to pull in appropriate dbt business...probably a better way to do this
LIBS += -lsetupapi LIBS += -lsetupapi
QMAKE_TARGET_PRODUCT = SleepyHead QMAKE_TARGET_PRODUCT = Oscr
QMAKE_TARGET_COMPANY = Jedimark QMAKE_TARGET_COMPANY = Nightowl Software
QMAKE_TARGET_COPYRIGHT = Copyright (c)2011-2018 Mark Watkins QMAKE_TARGET_COPYRIGHT = Copyright (c)2011-2018 Mark Watkins & (c) 2019 Nightowl Software
QMAKE_TARGET_DESCRIPTION = "OpenSource CPAP Research & Review" QMAKE_TARGET_DESCRIPTION = "OpenSource CPAP Review"
VERSION = 1.1.0.0 VERSION = 1.0.0
RC_ICONS = ./icons/bob-v3.0.ico RC_ICONS = ./icons/logo-v3.0.ico
INCLUDEPATH += $$PWD INCLUDEPATH += $$PWD
INCLUDEPATH += $$[QT_INSTALL_PREFIX]/../src/qtbase/src/3rdparty/zlib INCLUDEPATH += $$[QT_INSTALL_PREFIX]/../src/qtbase/src/3rdparty/zlib
@ -243,8 +252,10 @@ SOURCES += \
profileselector.cpp \ profileselector.cpp \
SleepLib/loader_plugins/edfparser.cpp \ SleepLib/loader_plugins/edfparser.cpp \
aboutdialog.cpp \ aboutdialog.cpp \
welcome.cpp \ welcome.cpp
help.cpp !contains(DEFINES, helpless) {
SOURCES += help.cpp
}
HEADERS += \ HEADERS += \
common_gui.h \ common_gui.h \
@ -313,8 +324,10 @@ HEADERS += \
aboutdialog.h \ aboutdialog.h \
welcome.h \ welcome.h \
mytextbrowser.h \ mytextbrowser.h \
help.h \
git_info.h git_info.h
!contains(DEFINES, helpless) {
HEADERS += help.h
}
FORMS += \ FORMS += \
daily.ui \ daily.ui \
@ -330,8 +343,10 @@ FORMS += \
oximeterimport.ui \ oximeterimport.ui \
profileselector.ui \ profileselector.ui \
aboutdialog.ui \ aboutdialog.ui \
welcome.ui \ welcome.ui
help.ui !contains(DEFINES, helpless) {
FORMS += help.ui
}
RESOURCES += \ RESOURCES += \
Resources.qrc Resources.qrc
@ -356,8 +371,9 @@ OTHER_FILES += \
update_gitinfo.sh update_gitinfo.sh
DISTFILES += \ DISTFILES += \
../README \ ../README
help/default.css \ !contains(DEFINES, helpless) {
DISTFILES += help/default.css \
help/help_en/daily.html \ help/help_en/daily.html \
help/help_en/glossary.html \ help/help_en/glossary.html \
help/help_en/import.html \ help/help_en/import.html \
@ -382,6 +398,7 @@ DISTFILES += \
help/help_nl/tipsntricks.html \ help/help_nl/tipsntricks.html \
help/help_en/reportingbugs.html \ help/help_en/reportingbugs.html \
win_icon.rc \ win_icon.rc \
help/help_nl/SleepyHeadGuide_nl.qhp \ help/help_nl/OSCR_Guide_nl.qhp \
help/help_en/SleepyHeadGuide_en.qhp \ help/help_en/OSCR_Guide_en.qhp \
help/index.qhcp help/index.qhcp
}