From 35876d76cc9c1b395b50732603ea2c6c804dab1d Mon Sep 17 00:00:00 2001 From: vetlewi Date: Wed, 13 Jan 2016 17:20:47 +0100 Subject: [PATCH 1/4] Updates to the .pro files to build deb files as well --- Qkinz.pro | 10 +++++++++- app/app.pro | 25 ++++++++++++++++++++++++- defaults.pri | 4 +++- src/src.pro | 35 +++++++++-------------------------- tests/tests.pro | 16 +++++++++++++--- 5 files changed, 58 insertions(+), 32 deletions(-) diff --git a/Qkinz.pro b/Qkinz.pro index c1c14bf..3649c20 100644 --- a/Qkinz.pro +++ b/Qkinz.pro @@ -7,4 +7,12 @@ SUBDIRS = \ tests app.depends = src -tests.depends = src \ No newline at end of file +tests.depends = src + +QMAKE_DISTCLEAN += -r +QMAKE_DISTCLEAN += $$PWD/Makefile \ + $$PWD/src/Makefile \ + $$PWD/app/Makefile \ + $$PWD/tests/Makefile \ + $$PWD/*.pro.* \ + $$PWD/build \ No newline at end of file diff --git a/app/app.pro b/app/app.pro index 3675006..a2c81d7 100644 --- a/app/app.pro +++ b/app/app.pro @@ -7,6 +7,12 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport webkitwidgets TARGET = Qkinz TEMPLATE = app +DESTDIR = $$BUILDDIR/app +OBJECTS_DIR = $$BUILDDIR/app +MOC_DIR = $$BUILDDIR/app +RCC_DIR = $$BUILDDIR/app +UI_DIR = $$BUILDDIR/app + macx { QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9 QMAKE_CXXFLAGS += -std=c++11 #-O3 @@ -17,4 +23,21 @@ macx { SOURCES += main.cpp -LIBS += -L../src -lkinzgui +LIBS += -L$$BUILDDIR/src -lkinzgui + +linux-g++ { + binfile.files += $$BUILDDIR/app/$$TARGET + binfile.path += /usr/bin/ + icon.files += $$PWD/../Qkinz.png + icon.path += /usr/share/$$TARGET + desktop.path = /usr/share/applications/ + desktop.files = $$PWD/../Qkinz.desktop + INSTALLS += binfile + INSTALLS += icon + INSTALLS += desktop +} + +QMAKE_CLEAN += $$BUILDDIR/app/*.o \ + $$BUILDDIR/app/moc_* \ + $$BUILDDIR/app/qrc_* \ + $$BUILDDIR/app/ui_* \ No newline at end of file diff --git a/defaults.pri b/defaults.pri index ef9c22b..4fd6fa8 100644 --- a/defaults.pri +++ b/defaults.pri @@ -6,4 +6,6 @@ INCLUDEPATH += $$PWD/src \ $$PWD/src/support/include \ $$PWD/src/tables/include -SRC_DIR = $$PWD \ No newline at end of file +SRC_DIR = $$PWD + +BUILDDIR = $$PWD/build \ No newline at end of file diff --git a/src/src.pro b/src/src.pro index 90cc15d..59ff989 100644 --- a/src/src.pro +++ b/src/src.pro @@ -13,14 +13,11 @@ TEMPLATE = lib CONFIG += staticlib -#unix { -# BUILDDIR = $$PWD/../build -# DESTDIR = $$BUILDDIR -# OBJECTS_DIR = $$BUILDDIR -# MOC_DIR = $$BUILDDIR -# RCC_DIR = $$BUILDDIR -# UI_DIR = $$BUILDDIR -#} +DESTDIR = $$BUILDDIR/src +OBJECTS_DIR = $$BUILDDIR/src/objects +MOC_DIR = $$BUILDDIR/src/moc +RCC_DIR = $$BUILDDIR/src/rcc +UI_DIR = $$BUILDDIR/src/ui macx { QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9 @@ -110,21 +107,7 @@ FORMS += gui/forms/mainwindow.ui \ RESOURCES += ../resources/resorces.qrc -unix { - binfile.files += $$BUILDDIR/$$TARGET - binfile.path += /usr/bin/ - icon.files += $$PWD/Qkinz.png - icon.path += /usr/share/$$TARGET - desktop.path = /usr/share/applications/ - desktop.files = $$PWD/Qkinz.desktop - INSTALLS += binfile - INSTALLS += icon - INSTALLS += desktop -} - -QMAKE_CLEAN += $$BUILDDIR/*.o \ - $$BUILDDIR/moc_* \ - $$BUILDDIR/ui_* - -QMAKE_DISTCLEAN += $$PWD/Makefile \ - $$PWD/*.pro.* +QMAKE_CLEAN += $$BUILDDIR/src/objects/*.o \ + $$BUILDDIR/src/moc/moc_* \ + $$BUILDDIR/src/rcc/qrc_* \ + $$BUILDDIR/src/ui/ui_* diff --git a/tests/tests.pro b/tests/tests.pro index f49fb59..b4955b7 100644 --- a/tests/tests.pro +++ b/tests/tests.pro @@ -3,6 +3,12 @@ include(../defaults.pri) CONFIG += console CONFIG -= app_bundle +DESTDIR = $$BUILDDIR/tests +OBJECTS_DIR = $$BUILDDIR/tests +MOC_DIR = $$BUILDDIR/tests +RCC_DIR = $$BUILDDIR/tests +UI_DIR = $$BUILDDIR/tests + macx { QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9 QMAKE_CXXFLAGS += -std=c++11 #-O3 @@ -12,7 +18,11 @@ macx { SOURCES += main.cpp -LIBS += -L../src -lkinzgui +LIBS += -L$$BUILDDIR/src -lkinzgui + +HEADERS += catch.hpp -HEADERS += \ - catch.hpp +QMAKE_CLEAN += $$BUILDDIR/tests/*.o \ + $$BUILDDIR/tests/moc_* \ + $$BUILDDIR/tests/qrc_* \ + $$BUILDDIR/tests/ui_* \ No newline at end of file From 2601516fb46f9089979788d7e9220dc7d3d047cc Mon Sep 17 00:00:00 2001 From: vetlewi Date: Wed, 13 Jan 2016 17:37:56 +0100 Subject: [PATCH 2/4] Updated .travis.yml to use correct result build path. --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 68230f4..a1a9517 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,7 @@ before_install: script: - scripts/travis_qmake.sh - make -- ./tests/tests +- ./build/tests/tests before_deploy: - scripts/travis_deploy.sh @@ -35,7 +35,7 @@ deploy: provider: releases api_key: secure: UoWphEeoyOWf+tbeW75g1VfQcxQ+1VOUKUxus7xJ5uIuRShQqLm7UERn7N6hhFr5e4ccQk18zXs7t27kwYqZRDBH6cHwR8ns9EcXuZS4L9FQ20HS4+dqRxsUh2sTyhOx6jfY0PLOc7NvyBiVkcAjNMrybcekHzlrtNO8Gh9g08G1wi8j9dgJ4YDfRtppVkZn8MHcSmfKE4y+5rSun/Ztl91ofDW4Zm7sRct8XRJb+4woFajsPBKd+WhzcqYVohzvuwZFJNZCGofQUo0H6x82aQK63MsylFo2YonajNMeOkeBOYlxD4ZyHrr9nJW03+HtqEeYhcQi00/v8bGgcl79Ir5HbYrbqR9FFFw6HA1IQKNo+2A3t3OllPvuuHhiidXeriA8aDgPzMKJwzgTX4MSViM1JyiZC32W0oFMBHeMN8RGZoGWyYO7f13BllJxgy3GDJXUyNDgYwkH7J+igYz/kZElhZiFpiirl2wts0koqd4NSDDcC3A0iPt0Y3P+NZWnYIojxzA7LxrIXdb0wdIAVkknIMjV1wLFl7e7mdMMmlCAQQYMvNKhDhIiCWLVk2kRyqEYI4ofbAnrJ2ACCAWu5Vml/s4bwposjbP5tJ2zcvgxxYS+QH2OncnQfb5I8V7hClkgWLZ5arjxWa9+Y+8MboBDVNEk5dH3KIy4Hs4WW1M= - file: app/Qkinz.dmg + file: build/app/Qkinz.dmg skip_cleanup: true on: condition: "$TRAVIS_OS_NAME = osx" From 77928224d4c2fbb8b4be686af644f250b99e2e2e Mon Sep 17 00:00:00 2001 From: "Vetle W. Ingeberg" Date: Wed, 13 Jan 2016 18:55:15 +0100 Subject: [PATCH 3/4] Removed ordered and spesified 2 threads for building. --- .travis.yml | 2 +- Qkinz.pro | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index a1a9517..34c136d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,7 @@ before_install: - scripts/travis_osx.sh script: - scripts/travis_qmake.sh -- make +- make -j2 - ./build/tests/tests before_deploy: diff --git a/Qkinz.pro b/Qkinz.pro index 3649c20..572fce1 100644 --- a/Qkinz.pro +++ b/Qkinz.pro @@ -1,5 +1,5 @@ TEMPLATE = subdirs -CONFIG += ordered +# CONFIG += ordered SUBDIRS = \ src \ From 4e9ff596fa92ff34de81bebd22f62b767cead7bd Mon Sep 17 00:00:00 2001 From: "Vetle W. Ingeberg" Date: Wed, 13 Jan 2016 19:11:04 +0100 Subject: [PATCH 4/4] Changed conditional for install block from 'linux-g++' to 'linux'. --- app/app.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/app.pro b/app/app.pro index a2c81d7..cff8583 100644 --- a/app/app.pro +++ b/app/app.pro @@ -25,7 +25,7 @@ SOURCES += main.cpp LIBS += -L$$BUILDDIR/src -lkinzgui -linux-g++ { +linux { binfile.files += $$BUILDDIR/app/$$TARGET binfile.path += /usr/bin/ icon.files += $$PWD/../Qkinz.png