update for windows builds

This commit is contained in:
Justin Hammond 2019-10-14 16:56:14 +08:00
parent 0c5cf70fe6
commit ad30fd4857
4 changed files with 22 additions and 5 deletions

View file

@ -15,7 +15,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _WIN32
#include <unistd.h>
#endif
#include <QApplication>
#include <QDir>

View file

@ -198,7 +198,9 @@ MainWindow::MainWindow(QWidget *parent) :
QFileInfo directory(dir);
qDebug() << directory.absoluteFilePath();
if (directory.exists()) {
#ifndef _WIN32
copyConfigDatabase(directory.absoluteFilePath().append("/"));
#endif
m_configpath.setPath(directory.absoluteFilePath().append("/config/"));
m_userpath.setPath(directory.absoluteFilePath().append("/config/"));
settings.setValue("openzwave/ConfigPath", m_configpath.absolutePath());

View file

@ -33,11 +33,26 @@ RESOURCES += \
LIBS += ../devicedb-lib/libdevicedb-lib.a ../ozwadmin-widgets/libozwadmin-widgets.a
#LIBS += ../devicedb-lib/libdevicedb-lib.a ../ozwadmin-widgets/libozwadmin-widgets.a
unix {
LIBS += -L../devicedb-lib/ -ldevicedb-lib -L../ozwadmin-widgets/ -lozwadmin-widgets
LIBS += -L../../qt-openzwave/qt-openzwave/ -lqt-openzwave -L../../qt-openzwave/qt-openzwavedatabase -lqt-openzwavedatabase
}
windows {
CONFIG(debug, debug|release) {
LIBS += -L..\devicedb-lib\debug\ -L..\ozwadmin-widgets\debug\ -L..\..\qt-openzwave\qt-openzwave\debug\
} else {
LIBS += -L..\devicedb-lib\release\ -L..\ozwadmin-widgets\release\ -L..\..\qt-openzwave\qt-openzwave\release\
}
LIBS += -ldevicedb-lib -lozwadmin-widgets -lqt-openzwave1
message($$LIBS)
message($$PWD)
}
INCLUDEPATH += ../devicedb-lib ../ozwadmin-widgets
INCLUDEPATH += ../../qt-openzwave/qt-openzwave/include/ ../../qt-openzwave/qt-openzwavedatabase/include/
LIBS += -L../../qt-openzwave/qt-openzwave/ -lqt-openzwave -L../../qt-openzwave/qt-openzwavedatabase -lqt-openzwavedatabase
macx: {
LIBS += -framework IOKit -framework CoreFoundation

View file

@ -4,9 +4,7 @@
#
#-------------------------------------------------
QT += core gui xml svg
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
QT += core gui xml svg remoteobjects widgets
TARGET = ozwadmin-widgets
TEMPLATE = lib