diff --git a/client/ostinato.pro b/client/ostinato.pro index 60e2266..bee8308 100644 --- a/client/ostinato.pro +++ b/client/ostinato.pro @@ -131,10 +131,20 @@ SOURCES += \ thememanager.cpp \ variablefieldswidget.cpp +THEMES += \ + themes/material-dark.qss \ + themes/material-dark.rcc \ + themes/material-light.qss \ + themes/material-light.rcc \ + themes/qds-dark.qss \ + themes/qds-dark.rcc \ + themes/qds-light.qss \ + themes/qds-light.rcc \ QMAKE_DISTCLEAN += object_script.* include(../install.pri) +include(../shared.pri) include(../version.pri) include(../options.pri) diff --git a/client/thememanager.cpp b/client/thememanager.cpp index 00696a3..6b4ef16 100644 --- a/client/thememanager.cpp +++ b/client/thememanager.cpp @@ -59,6 +59,7 @@ ThemeManager::ThemeManager() else if (themeDir_.contains(QRegularExpression("^/opt/.*/bin/"))) themeDir_.replace("/bin/", "/share/"); #endif + qDebug("Themes directory: %s", qPrintable(themeDir_)); } QStringList ThemeManager::themeList() diff --git a/shared.pri b/shared.pri new file mode 100644 index 0000000..f34dcaa --- /dev/null +++ b/shared.pri @@ -0,0 +1,29 @@ +# +# Qt qmake integration for installing files other than executables +# Author: Srivats P +# +# To install files other than executables, specify them in SHARED variable +# and include this file AFTER install.pri +# +# Example: +# SHARED = file1 file2 +# include(install.pri) +# include(shared.pri) +# + +macx { + shared.path = $${PREFIX}/Ostinato/Ostinato.app/Contents/SharedSupport/ +} else: unix { + shared.path = $${PREFIX}/share/ostinato/ +} else { + shared.path = $${PREFIX}/bin +} +shared.files = $${SHARED} + +INSTALLS += shared + +# Themes - need a subdir inside shared +themes.files = $${THEMES} +themes.path = $${shared.path}/themes + +INSTALLS += themes