summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Burke <patrick.burke@nokia.com>2011-07-18 16:44:46 +1000
committerQt by Nokia <qt-info@nokia.com>2011-08-02 10:47:58 +0200
commitc161bd4e3f8cb4b16214a144afccab32e4168f48 (patch)
treede2b5c28f9ac0434fe3b9d8061a25ede28f9923f
parent04955b2e5b834f7040dfd5f426fc13cfba18c452 (diff)
Build system refactorings - squashed.
Deployment updates. Reviewed-on: http://codereview.qt.nokia.com/1732 Deployment updates. Reviewed-on: http://codereview.qt.nokia.com/1856 More deployment updates. Reviewed-on: http://codereview.qt.nokia.com/1912 Tidying up build system removing need for qml_pkg.pri. Reviewed-on: http://codereview.qt.nokia.com/2229 Tidying up build system removing need for qt3dquick_pkg_dep.pri. Reviewed-on: http://codereview.qt.nokia.com/2230 Tidying up build system removing need for qt3d_pkg_dep.pri. Reviewed-on: http://codereview.qt.nokia.com/2232 Final major change to cleanup build system. Should eliminate problems where the "qml" directories aren't being updated upon rebuilds, and allows easier deployment to devices via Qt Creator. Reviewed-on: http://codereview.qt.nokia.com/2247 Change-Id: Iedc926ef421fcb9039833c328cca8b0802b3bd44 Reviewed-on: http://codereview.qt.nokia.com/2494 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com>
-rw-r--r--demos/qt3d/cubehouse/cubehouse.pro3
-rw-r--r--demos/qt3d/pageflip/pageflip.pro3
-rw-r--r--demos/qt3d/photobrowser3d/photobrowser3d.pro3
-rw-r--r--demos/qt3d/shapes/shapes.pro3
-rw-r--r--demos/qt3d/teaservice/teaservice.pro3
-rw-r--r--demos/quick3d/model_viewer/model_viewer.pro7
-rw-r--r--demos/quick3d/qmlres.h7
-rw-r--r--demos/quick3d/robo_bounce/robo_bounce.pro3
-rw-r--r--demos/quick3d/tea_service/tea_service.pro7
-rw-r--r--examples/qt3d/basket/basket.pro3
-rw-r--r--examples/qt3d/builder/builder.pro3
-rw-r--r--examples/qt3d/cube/cube.pro3
-rw-r--r--examples/qt3d/cylinder/cylinder.pro3
-rw-r--r--examples/qt3d/geometry/geometry.pro3
-rw-r--r--examples/qt3d/graphicsview/graphicsview.pro3
-rw-r--r--examples/qt3d/nesting/nesting.pro3
-rw-r--r--examples/qt3d/solarsystem/solarsystem.pro3
-rw-r--r--examples/qt3d/tank/tank.pro3
-rw-r--r--examples/qt3d/teapot/teapot.pro3
-rw-r--r--examples/quick3d/basket/basket.pro5
-rw-r--r--examples/quick3d/cube/cube.pro7
-rw-r--r--examples/quick3d/forest/forest.pro3
-rw-r--r--examples/quick3d/lander/lander.pro7
-rw-r--r--examples/quick3d/matrix_animation/matrix_animation.pro7
-rw-r--r--examples/quick3d/monkeygod/monkeygod.pro7
-rw-r--r--examples/quick3d/moon/moon.pro7
-rw-r--r--examples/quick3d/photoroom/photoroom.pro7
-rw-r--r--examples/quick3d/qmlres.h7
-rw-r--r--examples/quick3d/shaders/shaders.pro7
-rw-r--r--examples/quick3d/sphere/sphere.pro7
-rw-r--r--pkg.pri198
-rw-r--r--qml_pkg.pri25
-rw-r--r--qt3d_pkg_dep.pri25
-rw-r--r--qt3dquick_pkg_dep.pri29
-rw-r--r--src/imports/shapes/shapes.pro4
-rw-r--r--src/imports/threed/threed.pro4
-rw-r--r--tests/manual/animations/animations.pro7
-rw-r--r--tests/manual/displaymodel/displaymodel.pro7
-rw-r--r--tests/manual/model3ds/model3ds.pro7
-rw-r--r--tests/manual/navigation1/navigation1.pro7
-rw-r--r--tests/manual/qrc/qrc.pro7
-rw-r--r--tests/manual/rotation/rotation.pro7
-rw-r--r--tests/manual/scaling/scaling.pro7
-rw-r--r--tests/manual/submesh/submesh.pro7
-rw-r--r--tests/manual/transformations/transformations.pro7
-rw-r--r--tests/manual/translation/translation.pro7
-rw-r--r--tests/shared/qmlres.h7
-rw-r--r--tutorials/quick3d/qmlres.h7
-rw-r--r--tutorials/quick3d/teapot_bounce_qml/teapot_bounce_qml.pro6
-rw-r--r--tutorials/quick3d/teapot_qml/teapot_qml.pro6
-rw-r--r--util/qt3d/qglinfo/qglinfo.pro3
51 files changed, 372 insertions, 152 deletions
diff --git a/demos/qt3d/cubehouse/cubehouse.pro b/demos/qt3d/cubehouse/cubehouse.pro
index a46698156..64501aa2f 100644
--- a/demos/qt3d/cubehouse/cubehouse.pro
+++ b/demos/qt3d/cubehouse/cubehouse.pro
@@ -3,7 +3,8 @@ TARGET = cubehouse
CONFIG += qt warn_on
!package: CONFIG += qt3d
-include(../../../qt3d_pkg_dep.pri)
+CONFIG += qt3d_deploy_pkg
+include(../../../pkg.pri)
SOURCES = cubeview.cpp main.cpp projectivetextureeffect.cpp
HEADERS = cubeview.h projectivetextureeffect.h
diff --git a/demos/qt3d/pageflip/pageflip.pro b/demos/qt3d/pageflip/pageflip.pro
index 8f71925fd..1a39adc93 100644
--- a/demos/qt3d/pageflip/pageflip.pro
+++ b/demos/qt3d/pageflip/pageflip.pro
@@ -8,7 +8,8 @@ SOURCES = pageflip.cpp pageflipmath.cpp
HEADERS = pageflipmath_p.h
RESOURCES = pageflip.qrc
-include(../../../qt3d_pkg_dep.pri)
+CONFIG += qt3d_deploy_pkg
+include(../../../pkg.pri)
OTHER_FILES += \
pageflip.rc
diff --git a/demos/qt3d/photobrowser3d/photobrowser3d.pro b/demos/qt3d/photobrowser3d/photobrowser3d.pro
index 60b3ecf6e..fc3083aa8 100644
--- a/demos/qt3d/photobrowser3d/photobrowser3d.pro
+++ b/demos/qt3d/photobrowser3d/photobrowser3d.pro
@@ -56,7 +56,8 @@ OTHER_FILES += \
shaders/replace_texture.fsh \
shaders/replace_texture.vsh
-include(../../../qt3d_pkg_dep.pri)
+CONFIG += qt3d_deploy_pkg
+include(../../../pkg.pri)
OTHER_FILES += \
photobrowser.rc
diff --git a/demos/qt3d/shapes/shapes.pro b/demos/qt3d/shapes/shapes.pro
index 804f22ba7..ea06164a7 100644
--- a/demos/qt3d/shapes/shapes.pro
+++ b/demos/qt3d/shapes/shapes.pro
@@ -5,7 +5,8 @@ CONFIG += qt warn_on
SOURCES = shapes.cpp
-include(../../../qt3d_pkg_dep.pri)
+CONFIG += qt3d_deploy_pkg
+include(../../../pkg.pri)
OTHER_FILES += \
shapes.rc
diff --git a/demos/qt3d/teaservice/teaservice.pro b/demos/qt3d/teaservice/teaservice.pro
index f54f3b516..9debf19a7 100644
--- a/demos/qt3d/teaservice/teaservice.pro
+++ b/demos/qt3d/teaservice/teaservice.pro
@@ -9,7 +9,8 @@ SOURCES = teaservice.cpp meshobject.cpp sceneobject.cpp perpixeleffect.cpp
HEADERS = meshobject.h sceneobject.h perpixeleffect.h
RESOURCES = teaservice.qrc
-include(../../../qt3d_pkg_dep.pri)
+CONFIG += qt3d_deploy_pkg
+include(../../../pkg.pri)
OTHER_FILES += \
teaservice.rc
diff --git a/demos/quick3d/model_viewer/model_viewer.pro b/demos/quick3d/model_viewer/model_viewer.pro
index 1d6d52a4d..7a2c916c4 100644
--- a/demos/quick3d/model_viewer/model_viewer.pro
+++ b/demos/quick3d/model_viewer/model_viewer.pro
@@ -5,8 +5,11 @@ CONFIG += qt warn_on
SOURCES += main.cpp
-include(../../../qt3dquick_pkg_dep.pri)
-include(../../../qml_pkg.pri)
+INSTALL_DIRS = qml
+
+CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
+include(../../../pkg.pri)
+qtcAddDeployment()
OTHER_FILES += \
model_viewer.rc
diff --git a/demos/quick3d/qmlres.h b/demos/quick3d/qmlres.h
index 98af7019b..2dae2ee8f 100644
--- a/demos/quick3d/qmlres.h
+++ b/demos/quick3d/qmlres.h
@@ -48,6 +48,9 @@
#include <QtCore/qdebug.h>
+#define internal_xstr(s) internal_str(s)
+#define internal_str(s) #s
+
/*!
\internal
Returns a string with the path to qml resources, including qml sources,
@@ -60,7 +63,11 @@ static QString q_get_qmldir(const QString &name)
QString qml = name;
// try for a Linux package install first
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
+#ifdef QT3D_USE_OPT
+ QDir pkgdir(QLatin1String("/opt/mt/applications/" internal_xstr(QT3D_USE_OPT)));
+#else
QDir pkgdir(QLatin1String("/usr/share/qt5/quick3d/demos"));
+#endif
#else
QDir pkgdir(QLatin1String("/usr/share/qt4/quick3d/demos"));
#endif
diff --git a/demos/quick3d/robo_bounce/robo_bounce.pro b/demos/quick3d/robo_bounce/robo_bounce.pro
index a93711aef..9198ffda8 100644
--- a/demos/quick3d/robo_bounce/robo_bounce.pro
+++ b/demos/quick3d/robo_bounce/robo_bounce.pro
@@ -5,7 +5,8 @@ CONFIG += qt warn_on
SOURCES += main.cpp
-include(../../../qt3dquick_pkg_dep.pri)
+CONFIG += qt3dquick_deploy_pkg
+include(../../../pkg.pri)
OTHER_FILES += \
robo_bounce.rc
diff --git a/demos/quick3d/tea_service/tea_service.pro b/demos/quick3d/tea_service/tea_service.pro
index f289699a8..8dbf953a9 100644
--- a/demos/quick3d/tea_service/tea_service.pro
+++ b/demos/quick3d/tea_service/tea_service.pro
@@ -5,8 +5,11 @@ CONFIG += qt warn_on
SOURCES += main.cpp
-include(../../../qt3dquick_pkg_dep.pri)
-include(../../../qml_pkg.pri)
+INSTALL_DIRS = qml
+
+CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
+include(../../../pkg.pri)
+qtcAddDeployment()
OTHER_FILES += \
tea_service.rc
diff --git a/examples/qt3d/basket/basket.pro b/examples/qt3d/basket/basket.pro
index 750ee5e1c..384572b99 100644
--- a/examples/qt3d/basket/basket.pro
+++ b/examples/qt3d/basket/basket.pro
@@ -3,7 +3,8 @@ TARGET = basket
CONFIG += qt warn_on
!package: CONFIG += qt3d
-include(../../../qt3d_pkg_dep.pri)
+CONFIG += qt3d_deploy_pkg
+include(../../../pkg.pri)
SOURCES = basketview.cpp main.cpp
HEADERS = basketview.h basket_data.h
diff --git a/examples/qt3d/builder/builder.pro b/examples/qt3d/builder/builder.pro
index d06ffdfb2..eeb25762f 100644
--- a/examples/qt3d/builder/builder.pro
+++ b/examples/qt3d/builder/builder.pro
@@ -9,7 +9,8 @@ SOURCES = builder.cpp \
HEADERS = builder.h
RESOURCES += builder.qrc
-include(../../../qt3d_pkg_dep.pri)
+CONFIG += qt3d_deploy_pkg
+include(../../../pkg.pri)
OTHER_FILES += \
builder.rc
diff --git a/examples/qt3d/cube/cube.pro b/examples/qt3d/cube/cube.pro
index 7b2d2877e..d180d7cb4 100644
--- a/examples/qt3d/cube/cube.pro
+++ b/examples/qt3d/cube/cube.pro
@@ -7,7 +7,8 @@ SOURCES = cubeview.cpp main.cpp
HEADERS = cubeview.h
RESOURCES = cube.qrc
-include(../../../qt3d_pkg_dep.pri)
+CONFIG += qt3d_deploy_pkg
+include(../../../pkg.pri)
OTHER_FILES += \
cube.rc
diff --git a/examples/qt3d/cylinder/cylinder.pro b/examples/qt3d/cylinder/cylinder.pro
index a7e90f48a..6c95819bd 100644
--- a/examples/qt3d/cylinder/cylinder.pro
+++ b/examples/qt3d/cylinder/cylinder.pro
@@ -7,7 +7,8 @@ SOURCES = cylinderview.cpp main.cpp
HEADERS = cylinderview.h
RESOURCES = cylinder.qrc
-include(../../../qt3d_pkg_dep.pri)
+CONFIG += qt3d_deploy_pkg
+include(../../../pkg.pri)
OTHER_FILES += \
cylinder.rc
diff --git a/examples/qt3d/geometry/geometry.pro b/examples/qt3d/geometry/geometry.pro
index 66cbc9484..367ae5dfb 100644
--- a/examples/qt3d/geometry/geometry.pro
+++ b/examples/qt3d/geometry/geometry.pro
@@ -12,7 +12,8 @@ HEADERS = geometryview.h \
quadplane.h
RESOURCES = geometry.qrc
-include(../../../qt3d_pkg_dep.pri)
+CONFIG += qt3d_deploy_pkg
+include(../../../pkg.pri)
OTHER_FILES += \
geometry.rc
diff --git a/examples/qt3d/graphicsview/graphicsview.pro b/examples/qt3d/graphicsview/graphicsview.pro
index 758957e69..ea5fc7fcd 100644
--- a/examples/qt3d/graphicsview/graphicsview.pro
+++ b/examples/qt3d/graphicsview/graphicsview.pro
@@ -26,7 +26,8 @@ HEADERS = \
RESOURCES = \
graphicsview.qrc
-include(../../../qt3d_pkg_dep.pri)
+CONFIG += qt3d_deploy_pkg
+include(../../../pkg.pri)
OTHER_FILES += \
graphicsview.rc
diff --git a/examples/qt3d/nesting/nesting.pro b/examples/qt3d/nesting/nesting.pro
index f1b179702..16d43baf6 100644
--- a/examples/qt3d/nesting/nesting.pro
+++ b/examples/qt3d/nesting/nesting.pro
@@ -7,7 +7,8 @@ SOURCES = cubeview.cpp main.cpp
HEADERS = cubeview.h
RESOURCES = nesting.qrc
-include(../../../qt3d_pkg_dep.pri)
+CONFIG += qt3d_deploy_pkg
+include(../../../pkg.pri)
OTHER_FILES += \
nesting.rc
diff --git a/examples/qt3d/solarsystem/solarsystem.pro b/examples/qt3d/solarsystem/solarsystem.pro
index 71e9e595e..f1f6dea03 100644
--- a/examples/qt3d/solarsystem/solarsystem.pro
+++ b/examples/qt3d/solarsystem/solarsystem.pro
@@ -9,7 +9,8 @@ HEADERS = solarsystem.h
RESOURCES += solarsystem.qrc
DEPENDPATH += resources
-include(../../../qt3d_pkg_dep.pri)
+CONFIG += qt3d_deploy_pkg
+include(../../../pkg.pri)
OTHER_FILES += \
resources/moon-texture.jpg \
diff --git a/examples/qt3d/tank/tank.pro b/examples/qt3d/tank/tank.pro
index 1f1daef2c..a734e4cdc 100644
--- a/examples/qt3d/tank/tank.pro
+++ b/examples/qt3d/tank/tank.pro
@@ -12,7 +12,8 @@ HEADERS += tankview.h \
tank.h \
quadplane.h
-include(../../../qt3d_pkg_dep.pri)
+CONFIG += qt3d_deploy_pkg
+include(../../../pkg.pri)
OTHER_FILES += \
tank.rc
diff --git a/examples/qt3d/teapot/teapot.pro b/examples/qt3d/teapot/teapot.pro
index dbd8de35f..22b79a32f 100644
--- a/examples/qt3d/teapot/teapot.pro
+++ b/examples/qt3d/teapot/teapot.pro
@@ -6,7 +6,8 @@ CONFIG += qt warn_on
SOURCES = teapotview.cpp main.cpp
HEADERS = teapotview.h
-include(../../../qt3d_pkg_dep.pri)
+CONFIG += qt3d_deploy_pkg
+include(../../../pkg.pri)
OTHER_FILES += \
teapot.rc
diff --git a/examples/quick3d/basket/basket.pro b/examples/quick3d/basket/basket.pro
index 4ebc0c053..36182b4c3 100644
--- a/examples/quick3d/basket/basket.pro
+++ b/examples/quick3d/basket/basket.pro
@@ -5,8 +5,9 @@ CONFIG += qt warn_on
SOURCES += main.cpp
-include(../../../qt3dquick_pkg_dep.pri)
-include(../../../qml_pkg.pri)
+CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
+include(../../../pkg.pri)
+qtcAddDeployment()
OTHER_FILES += \
basket_qml.rc
diff --git a/examples/quick3d/cube/cube.pro b/examples/quick3d/cube/cube.pro
index 1ac7a469d..3b151c90b 100644
--- a/examples/quick3d/cube/cube.pro
+++ b/examples/quick3d/cube/cube.pro
@@ -5,8 +5,11 @@ CONFIG += qt warn_on
SOURCES += main.cpp
-include(../../../qt3dquick_pkg_dep.pri)
-include(../../../qml_pkg.pri)
+INSTALL_DIRS = qml
+
+CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
+include(../../../pkg.pri)
+qtcAddDeployment()
OTHER_FILES += \
cube_qml.rc
diff --git a/examples/quick3d/forest/forest.pro b/examples/quick3d/forest/forest.pro
index 16b3963db..df47c5d1a 100644
--- a/examples/quick3d/forest/forest.pro
+++ b/examples/quick3d/forest/forest.pro
@@ -5,7 +5,8 @@ CONFIG += qt warn_on
SOURCES += main.cpp
-include(../../../qt3dquick_pkg_dep.pri)
+CONFIG += qt3dquick_deploy_pkg
+include(../../../pkg.pri)
OTHER_FILES += \
forest.rc
diff --git a/examples/quick3d/lander/lander.pro b/examples/quick3d/lander/lander.pro
index f9eb251db..5be893063 100644
--- a/examples/quick3d/lander/lander.pro
+++ b/examples/quick3d/lander/lander.pro
@@ -5,8 +5,11 @@ CONFIG += qt warn_on
SOURCES += main.cpp
-include(../../../qt3dquick_pkg_dep.pri)
-include(../../../qml_pkg.pri)
+INSTALL_DIRS = qml
+
+CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
+include(../../../pkg.pri)
+qtcAddDeployment()
OTHER_FILES += \
lander.rc
diff --git a/examples/quick3d/matrix_animation/matrix_animation.pro b/examples/quick3d/matrix_animation/matrix_animation.pro
index 1715d5613..ea1fa93b2 100644
--- a/examples/quick3d/matrix_animation/matrix_animation.pro
+++ b/examples/quick3d/matrix_animation/matrix_animation.pro
@@ -5,8 +5,11 @@ CONFIG += qt warn_on
SOURCES += main.cpp
-include(../../../qt3dquick_pkg_dep.pri)
-include(../../../qml_pkg.pri)
+INSTALL_DIRS = qml
+
+CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
+include(../../../pkg.pri)
+qtcAddDeployment()
OTHER_FILES += \
matrix_animation.rc
diff --git a/examples/quick3d/monkeygod/monkeygod.pro b/examples/quick3d/monkeygod/monkeygod.pro
index 9bf5b82fb..88bbf1510 100644
--- a/examples/quick3d/monkeygod/monkeygod.pro
+++ b/examples/quick3d/monkeygod/monkeygod.pro
@@ -5,8 +5,11 @@ CONFIG += qt warn_on
SOURCES += main.cpp
-include(../../../qt3dquick_pkg_dep.pri)
-include(../../../qml_pkg.pri)
+INSTALL_DIRS = qml
+
+CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
+include(../../../pkg.pri)
+qtcAddDeployment()
OTHER_FILES += \
monkeygod.rc
diff --git a/examples/quick3d/moon/moon.pro b/examples/quick3d/moon/moon.pro
index a5e81a53f..e78467f5a 100644
--- a/examples/quick3d/moon/moon.pro
+++ b/examples/quick3d/moon/moon.pro
@@ -5,8 +5,11 @@ CONFIG += qt warn_on
SOURCES += main.cpp
-include(../../../qt3dquick_pkg_dep.pri)
-include(../../../qml_pkg.pri)
+INSTALL_DIRS = qml
+
+CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
+include(../../../pkg.pri)
+qtcAddDeployment()
OTHER_FILES += \
moon.rc
diff --git a/examples/quick3d/photoroom/photoroom.pro b/examples/quick3d/photoroom/photoroom.pro
index a352d190a..1341b8c4e 100644
--- a/examples/quick3d/photoroom/photoroom.pro
+++ b/examples/quick3d/photoroom/photoroom.pro
@@ -5,8 +5,11 @@ CONFIG += qt warn_on
SOURCES += main.cpp
-include(../../../qt3dquick_pkg_dep.pri)
-include(../../../qml_pkg.pri)
+INSTALL_DIRS = qml
+
+CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
+include(../../../pkg.pri)
+qtcAddDeployment()
OTHER_FILES += \
photoroom.rc
diff --git a/examples/quick3d/qmlres.h b/examples/quick3d/qmlres.h
index f8d7399ef..36aae07ad 100644
--- a/examples/quick3d/qmlres.h
+++ b/examples/quick3d/qmlres.h
@@ -48,6 +48,9 @@
#include <QtCore/qdebug.h>
+#define internal_xstr(s) internal_str(s)
+#define internal_str(s) #s
+
/*!
\internal
Returns a string with the path to qml resources, including qml sources,
@@ -60,7 +63,11 @@ static QString q_get_qmldir(const QString &name)
QString qml = name;
// try for a Linux package install first
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
+#ifdef QT3D_USE_OPT
+ QDir pkgdir(QLatin1String("/opt/mt/applications/" internal_xstr(QT3D_USE_OPT)));
+#else
QDir pkgdir(QLatin1String("/usr/share/qt5/quick3d/examples"));
+#endif
#else
QDir pkgdir(QLatin1String("/usr/share/qt4/quick3d/examples"));
#endif
diff --git a/examples/quick3d/shaders/shaders.pro b/examples/quick3d/shaders/shaders.pro
index 5dd55aa93..071d015ec 100644
--- a/examples/quick3d/shaders/shaders.pro
+++ b/examples/quick3d/shaders/shaders.pro
@@ -5,8 +5,11 @@ CONFIG += qt warn_on
SOURCES += main.cpp
-include(../../../qt3dquick_pkg_dep.pri)
-include(../../../qml_pkg.pri)
+INSTALL_DIRS = qml
+
+CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
+include(../../../pkg.pri)
+qtcAddDeployment()
OTHER_FILES += \
shaders.rc
diff --git a/examples/quick3d/sphere/sphere.pro b/examples/quick3d/sphere/sphere.pro
index 4d0278c61..6e3230c3a 100644
--- a/examples/quick3d/sphere/sphere.pro
+++ b/examples/quick3d/sphere/sphere.pro
@@ -5,8 +5,11 @@ CONFIG += qt warn_on
SOURCES += main.cpp
-include(../../../qt3dquick_pkg_dep.pri)
-include(../../../qml_pkg.pri)
+INSTALL_DIRS = qml
+
+CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
+include(../../../pkg.pri)
+qtcAddDeployment()
OTHER_FILES += \
sphere.rc
diff --git a/pkg.pri b/pkg.pri
index 22e5d53fb..e69eaafac 100644
--- a/pkg.pri
+++ b/pkg.pri
@@ -1,13 +1,8 @@
-!CONFIG(pkg_pri_included) {
-CONFIG+=pkg_pri_included
-
# Config for making example and demo apps packageable
# Note that the paths here all assumed the including .pro file
# is exactly 3 levels of directory tree below the root
-# Include this file after qt3d_pkg_dep.pri or qt3dquick_pkg_dep.pri
-
qtc_harmattan {
CONFIG += maemo
CONFIG += package
@@ -26,6 +21,54 @@ qtc_harmattan {
QT3D_INSTALL_DATA = $$[QT_INSTALL_DATA]
}
+qt3dquick_deploy_pkg {
+ CONFIG += qt3d_deploy_pkg
+
+ package {
+ macx:CONFIG(qt_framework, qt_framework|qt_no_framework) {
+ LIBS += -framework Qt3DQuick -F../../../src/quick3d
+ INCLUDEPATH += ../../../src/quick3d/Qt3DQuick.framework/Versions/1/Headers
+ } else {
+ win32 {
+ CONFIG(debug, debug|release) {
+ TARGET = $$member(TARGET, 0)d
+ LIBS += ..\\..\\..\\src\\quick3d\\debug\\Qt3DQuickd.lib
+ } else {
+ LIBS += ..\\..\\..\\src\\quick3d\\release\\Qt3DQuick.lib
+ }
+ } else {
+ LIBS += -L../../../src/quick3d -lQt3DQuick
+ }
+ INCLUDEPATH += ../../../include/Qt3DQuick
+ }
+ QT += declarative opengl
+
+ maemo: icons.files = icon-l-qtquick3d.png
+ }
+}
+
+qt3d_deploy_pkg {
+ package {
+ macx:CONFIG(qt_framework, qt_framework|qt_no_framework) {
+ LIBS += -framework Qt3D -F../../../src/threed
+ INCLUDEPATH += ../../../src/threed/Qt3D.framework/Versions/1/Headers
+ } else {
+ win32 {
+ CONFIG(debug, debug|release) {
+ TARGET = $$member(TARGET, 0)d
+ LIBS += ..\\..\\..\\src\\threed\\debug\\Qt3Dd.lib
+ } else {
+ LIBS += ..\\..\\..\\src\\threed\\release\\Qt3D.lib
+ }
+ } else {
+ LIBS += -L../../../src/threed -lQt3D
+ }
+ INCLUDEPATH += ../../../include/Qt3D
+ }
+ QT += opengl
+ }
+}
+
contains(TEMPLATE, app) {
package {
maemo {
@@ -35,11 +78,152 @@ contains(TEMPLATE, app) {
# icons.files is set by qt3dquick_pkg_dep.pri or qt3d_pkg_dep.pri
icons.path = /usr/share/themes/base/meegotouch/icons
INSTALLS += icons applnk
+
+ target.path += $$QT3D_INSTALL_BINS
+ INSTALLS += target
+ } else {
+ mt {
+ applnk.files = info.json
+ applnk.path = /opt/mt/applications/$${TARGET}
+
+ # icons.files is set by qt3dquick_pkg_dep.pri or qt3d_pkg_dep.pri
+ icons.path = /opt/mt/applications/$${TARGET}
+ INSTALLS += icons applnk
+ target.path += /opt/mt/applications/$${TARGET}
+ INSTALLS += target
+
+ DEFINES += QT3D_USE_OPT=$${TARGET}
+ } else {
+ target.path += $$QT3D_INSTALL_BINS
+ INSTALLS += target
+ }
}
- target.path += $$QT3D_INSTALL_BINS
- INSTALLS += target
} else {
DESTDIR = ../../../bin
}
}
+
+qt3d_deploy_qml {
+ mt {
+ TARGET_DIR = /opt/mt/applications/$$TARGET
+ } else {
+ TARGET_DIR = $$QT3D_INSTALL_DATA/quick3d/examples/$$TARGET
+ }
+
+ macx {
+ TARGET_DIR = .
+ } else {
+ !package {
+ TARGET_DIR = ../../../bin/resources/examples/$$TARGET
+ }
+ }
+
+ for(dir, INSTALL_DIRS) {
+ di.source = $${dir}
+ di.target = $$TARGET_DIR
+ DEPLOYMENTFOLDERS += di
+ }
+}
+
+# The following code was generated by the Qt Quick Application wizard of Qt Creator.
+# The file it was contained in was qmlapplicationviewer.pri, if necessary it should
+# be possible to simply cut & paste the code straight out of the latest version to
+# update it.
+#
+# The only changes has been to comment out the installPrexfix line below, this
+# will probably be necessary to replicate when replacing.
+#
+defineTest(qtcAddDeployment) {
+ MAINPROFILEPWD = $$PWD
+
+ win32 {
+ copyCommand =
+ for(deploymentfolder, DEPLOYMENTFOLDERS) {
+ source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
+ source = $$replace(source, /, \\)
+ sourcePathSegments = $$split(source, \\)
+ target = $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(sourcePathSegments)
+ target = $$replace(target, /, \\)
+ !isEqual(source,$$target) {
+ !isEmpty(copyCommand):copyCommand += &&
+ isEqual(QMAKE_DIR_SEP, \\) {
+ copyCommand += $(COPY_DIR) \"$$source\" \"$$target\"
+ } else {
+ source = $$replace(source, \\\\, /)
+ target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
+ target = $$replace(target, \\\\, /)
+ copyCommand += test -d \"$$target\" || mkdir -p \"$$target\" && cp -r \"$$source\" \"$$target\"
+ }
+ }
+ }
+ !isEmpty(copyCommand) {
+ copyCommand = @echo Copying application data... && $$copyCommand
+ copydeploymentfolders.commands = $$copyCommand
+ first.depends = $(first) copydeploymentfolders
+ export(first.depends)
+ export(copydeploymentfolders.commands)
+ QMAKE_EXTRA_TARGETS += first copydeploymentfolders
+ }
+ } else:unix {
+ maemo5 {
+ desktopfile.files = $${TARGET}.desktop
+ desktopfile.path = /usr/share/applications/hildon
+ icon.files = $${TARGET}64.png
+ icon.path = /usr/share/icons/hicolor/64x64/apps
+ } else {
+ desktopfile.files = $${TARGET}_harmattan.desktop
+ desktopfile.path = /usr/share/applications
+ icon.files = $${TARGET}80.png
+ icon.path = /usr/share/icons/hicolor/80x80/apps
+ copyCommand =
+ for(deploymentfolder, DEPLOYMENTFOLDERS) {
+ source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
+ source = $$replace(source, \\\\, /)
+ macx {
+ target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target)
+ } else {
+ target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
+ }
+ target = $$replace(target, \\\\, /)
+ sourcePathSegments = $$split(source, /)
+ targetFullPath = $$target/$$last(sourcePathSegments)
+ !isEqual(source,$$targetFullPath) {
+ !isEmpty(copyCommand):copyCommand += &&
+ copyCommand += $(MKDIR) \"$$target\"
+ copyCommand += && $(COPY_DIR) \"$$source\" \"$$target\"
+ }
+ }
+ !isEmpty(copyCommand) {
+ copyCommand = @echo Copying application data... && $$copyCommand
+ copydeploymentfolders.commands = $$copyCommand
+ first.depends = $(first) copydeploymentfolders
+ export(first.depends)
+ export(copydeploymentfolders.commands)
+ QMAKE_EXTRA_TARGETS += first copydeploymentfolders
+ }
+ }
+# installPrefix = /opt/$${TARGET}
+ for(deploymentfolder, DEPLOYMENTFOLDERS) {
+ item = item$${deploymentfolder}
+ itemfiles = $${item}.files
+ $$itemfiles = $$eval($${deploymentfolder}.source)
+ itempath = $${item}.path
+ $$itempath = $${installPrefix}/$$eval($${deploymentfolder}.target)
+ export($$itemfiles)
+ export($$itempath)
+ INSTALLS += $$item
+ }
+ target.path = $${installPrefix}/bin
+ export(icon.files)
+ export(icon.path)
+ export(desktopfile.files)
+ export(desktopfile.path)
+ export(target.path)
+ INSTALLS += desktopfile icon target
+ }
+
+ export (ICON)
+ export (INSTALLS)
+ export (LIBS)
+ export (QMAKE_EXTRA_TARGETS)
}
diff --git a/qml_pkg.pri b/qml_pkg.pri
deleted file mode 100644
index 5c77efbd2..000000000
--- a/qml_pkg.pri
+++ /dev/null
@@ -1,25 +0,0 @@
-# Manages deploying the QML files and resources along with the binary
-
-distInstalls.files = qml
-distInstalls.path = $$QT3D_INSTALL_DATA/quick3d/examples/$$TARGET
-INSTALLS += distInstalls
-
-win32 {
- QMAKE_DEL_FILE = del /q
- QMAKE_DEL_DIR = rmdir /s /q
-}
-
-qmlResources.files = qml
-macx {
- qmlResources.path = Contents/Resources
- QMAKE_BUNDLE_DATA += qmlResources
-} else {
- !package {
- qmlResources.input = qmlResources.files
- qmlResources.output = $$OUT_PWD/../../../bin/resources/examples/$$TARGET/qml
- qmlResources.commands = $$QMAKE_COPY_DIR ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
- qmlResources.CONFIG += no_link_no_clean
- qmlResources.variable_out = POST_TARGETDEPS
- QMAKE_EXTRA_COMPILERS += qmlResources
- }
-}
diff --git a/qt3d_pkg_dep.pri b/qt3d_pkg_dep.pri
deleted file mode 100644
index e93d24e6f..000000000
--- a/qt3d_pkg_dep.pri
+++ /dev/null
@@ -1,25 +0,0 @@
-# See README for an explanation of package build mode
-# Note that the paths here all assumed the including .pro file
-# is exactly 3 levels of directory tree below the root
-
-include(pkg.pri)
-
-package {
- macx:CONFIG(qt_framework, qt_framework|qt_no_framework) {
- LIBS += -framework Qt3D -F../../../src/threed
- INCLUDEPATH += ../../../src/threed/Qt3D.framework/Versions/1/Headers
- } else {
- win32 {
- CONFIG(debug, debug|release) {
- TARGET = $$member(TARGET, 0)d
- LIBS += ..\\..\\..\\src\\threed\\debug\\Qt3Dd.lib
- } else {
- LIBS += ..\\..\\..\\src\\threed\\release\\Qt3D.lib
- }
- } else {
- LIBS += -L../../../src/threed -lQt3D
- }
- INCLUDEPATH += ../../../include/Qt3D
- }
- QT += opengl
-}
diff --git a/qt3dquick_pkg_dep.pri b/qt3dquick_pkg_dep.pri
deleted file mode 100644
index 4d0103524..000000000
--- a/qt3dquick_pkg_dep.pri
+++ /dev/null
@@ -1,29 +0,0 @@
-# See README for an explanation of package build mode
-# Note that the paths here all assumed the including .pro file
-# is exactly 3 levels of directory tree below the root
-
-include(qt3d_pkg_dep.pri)
-
-package {
- macx:CONFIG(qt_framework, qt_framework|qt_no_framework) {
- LIBS += -framework Qt3DQuick -F../../../src/quick3d
- INCLUDEPATH += ../../../src/quick3d/Qt3DQuick.framework/Versions/1/Headers
- } else {
- win32 {
- CONFIG(debug, debug|release) {
- TARGET = $$member(TARGET, 0)d
- LIBS += ..\\..\\..\\src\\quick3d\\debug\\Qt3DQuickd.lib
- } else {
- LIBS += ..\\..\\..\\src\\quick3d\\release\\Qt3DQuick.lib
- }
- } else {
- LIBS += -L../../../src/quick3d -lQt3DQuick
- }
- INCLUDEPATH += ../../../include/Qt3DQuick
- }
- QT += declarative opengl
-
- maemo: icons.files = icon-l-qtquick3d.png
-}
-
-include(pkg.pri)
diff --git a/src/imports/shapes/shapes.pro b/src/imports/shapes/shapes.pro
index 3a71d9114..ae5556df5 100644
--- a/src/imports/shapes/shapes.pro
+++ b/src/imports/shapes/shapes.pro
@@ -2,8 +2,8 @@ TEMPLATE = lib
TARGET = qshapesqmlplugin
CONFIG += qt plugin
-include(../../../qt3d_pkg_dep.pri)
-include(../../../qt3dquick_pkg_dep.pri)
+CONFIG += qt3dquick_deploy_pkg
+include(../../../pkg.pri)
# See the README in the root dir re this code
package {
diff --git a/src/imports/threed/threed.pro b/src/imports/threed/threed.pro
index 0de3f99d4..aa7e56597 100644
--- a/src/imports/threed/threed.pro
+++ b/src/imports/threed/threed.pro
@@ -2,8 +2,8 @@ TEMPLATE = lib
TARGET = qthreedqmlplugin
CONFIG += qt plugin
-include(../../../qt3d_pkg_dep.pri)
-include(../../../qt3dquick_pkg_dep.pri)
+CONFIG += qt3dquick_deploy_pkg
+include(../../../pkg.pri)
# See the README in the root dir re this code
package {
diff --git a/tests/manual/animations/animations.pro b/tests/manual/animations/animations.pro
index 7e4cdf02a..6cda0e12a 100644
--- a/tests/manual/animations/animations.pro
+++ b/tests/manual/animations/animations.pro
@@ -5,5 +5,8 @@ CONFIG += qt warn_on
SOURCES += main.cpp
-include(../../../qt3dquick_pkg_dep.pri)
-include(../../../qml_pkg.pri)
+INSTALL_DIRS = qml
+
+CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
+include(../../../pkg.pri)
+qtcAddDeployment()
diff --git a/tests/manual/displaymodel/displaymodel.pro b/tests/manual/displaymodel/displaymodel.pro
index 85a9fcbe9..ea5596f6b 100644
--- a/tests/manual/displaymodel/displaymodel.pro
+++ b/tests/manual/displaymodel/displaymodel.pro
@@ -5,5 +5,8 @@ CONFIG += qt warn_on
SOURCES += main.cpp
-include(../../../qt3dquick_pkg_dep.pri)
-include(../../../qml_pkg.pri)
+INSTALL_DIRS = qml
+
+CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
+include(../../../pkg.pri)
+qtcAddDeployment()
diff --git a/tests/manual/model3ds/model3ds.pro b/tests/manual/model3ds/model3ds.pro
index 94acaf63d..cc8f0dc47 100644
--- a/tests/manual/model3ds/model3ds.pro
+++ b/tests/manual/model3ds/model3ds.pro
@@ -5,5 +5,8 @@ CONFIG += qt warn_on
SOURCES += main.cpp
-include(../../../qt3dquick_pkg_dep.pri)
-include(../../../qml_pkg.pri)
+INSTALL_DIRS = qml
+
+CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
+include(../../../pkg.pri)
+qtcAddDeployment()
diff --git a/tests/manual/navigation1/navigation1.pro b/tests/manual/navigation1/navigation1.pro
index ae30a596c..8cc414403 100644
--- a/tests/manual/navigation1/navigation1.pro
+++ b/tests/manual/navigation1/navigation1.pro
@@ -5,5 +5,8 @@ CONFIG += qt warn_on
SOURCES += main.cpp
-include(../../../qt3dquick_pkg_dep.pri)
-include(../../../qml_pkg.pri)
+INSTALL_DIRS = qml
+
+CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
+include(../../../pkg.pri)
+qtcAddDeployment()
diff --git a/tests/manual/qrc/qrc.pro b/tests/manual/qrc/qrc.pro
index bddc5a248..22b16abd1 100644
--- a/tests/manual/qrc/qrc.pro
+++ b/tests/manual/qrc/qrc.pro
@@ -6,8 +6,11 @@ CONFIG += qt warn_on
SOURCES += main.cpp
-include(../../../qt3dquick_pkg_dep.pri)
-include(../../../qml_pkg.pri)
+INSTALL_DIRS = qml
+
+CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
+include(../../../pkg.pri)
+qtcAddDeployment()
OTHER_FILES += \
qml/tst_cube.qml
diff --git a/tests/manual/rotation/rotation.pro b/tests/manual/rotation/rotation.pro
index edb7deec4..35fa91cd5 100644
--- a/tests/manual/rotation/rotation.pro
+++ b/tests/manual/rotation/rotation.pro
@@ -5,5 +5,8 @@ CONFIG += qt warn_on
SOURCES += main.cpp
-include(../../../qt3dquick_pkg_dep.pri)
-include(../../../qml_pkg.pri)
+INSTALL_DIRS = qml
+
+CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
+include(../../../pkg.pri)
+qtcAddDeployment()
diff --git a/tests/manual/scaling/scaling.pro b/tests/manual/scaling/scaling.pro
index a98d3a2cb..f2d1cc49d 100644
--- a/tests/manual/scaling/scaling.pro
+++ b/tests/manual/scaling/scaling.pro
@@ -5,5 +5,8 @@ CONFIG += qt warn_on
SOURCES += main.cpp
-include(../../../qt3dquick_pkg_dep.pri)
-include(../../../qml_pkg.pri)
+INSTALL_DIRS = qml
+
+CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
+include(../../../pkg.pri)
+qtcAddDeployment()
diff --git a/tests/manual/submesh/submesh.pro b/tests/manual/submesh/submesh.pro
index d9f4a5f4b..6b1138cc0 100644
--- a/tests/manual/submesh/submesh.pro
+++ b/tests/manual/submesh/submesh.pro
@@ -5,5 +5,8 @@ CONFIG += qt warn_on
SOURCES += main.cpp
-include(../../../qt3dquick_pkg_dep.pri)
-include(../../../qml_pkg.pri)
+INSTALL_DIRS = qml
+
+CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
+include(../../../pkg.pri)
+qtcAddDeployment()
diff --git a/tests/manual/transformations/transformations.pro b/tests/manual/transformations/transformations.pro
index 7a221d545..a74b4546d 100644
--- a/tests/manual/transformations/transformations.pro
+++ b/tests/manual/transformations/transformations.pro
@@ -5,5 +5,8 @@ CONFIG += qt warn_on
SOURCES += main.cpp
-include(../../../qt3dquick_pkg_dep.pri)
-include(../../../qml_pkg.pri)
+INSTALL_DIRS = qml
+
+CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
+include(../../../pkg.pri)
+qtcAddDeployment()
diff --git a/tests/manual/translation/translation.pro b/tests/manual/translation/translation.pro
index f6adcab73..e3cd35844 100644
--- a/tests/manual/translation/translation.pro
+++ b/tests/manual/translation/translation.pro
@@ -5,5 +5,8 @@ CONFIG += qt warn_on
SOURCES += main.cpp
-include(../../../qt3dquick_pkg_dep.pri)
-include(../../../qml_pkg.pri)
+INSTALL_DIRS = qml
+
+CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
+include(../../../pkg.pri)
+qtcAddDeployment()
diff --git a/tests/shared/qmlres.h b/tests/shared/qmlres.h
index f8d7399ef..36aae07ad 100644
--- a/tests/shared/qmlres.h
+++ b/tests/shared/qmlres.h
@@ -48,6 +48,9 @@
#include <QtCore/qdebug.h>
+#define internal_xstr(s) internal_str(s)
+#define internal_str(s) #s
+
/*!
\internal
Returns a string with the path to qml resources, including qml sources,
@@ -60,7 +63,11 @@ static QString q_get_qmldir(const QString &name)
QString qml = name;
// try for a Linux package install first
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
+#ifdef QT3D_USE_OPT
+ QDir pkgdir(QLatin1String("/opt/mt/applications/" internal_xstr(QT3D_USE_OPT)));
+#else
QDir pkgdir(QLatin1String("/usr/share/qt5/quick3d/examples"));
+#endif
#else
QDir pkgdir(QLatin1String("/usr/share/qt4/quick3d/examples"));
#endif
diff --git a/tutorials/quick3d/qmlres.h b/tutorials/quick3d/qmlres.h
index 9c61eee90..f54fe1703 100644
--- a/tutorials/quick3d/qmlres.h
+++ b/tutorials/quick3d/qmlres.h
@@ -48,6 +48,9 @@
#include <QtCore/qdebug.h>
+#define internal_xstr(s) internal_str(s)
+#define internal_str(s) #s
+
/*!
\internal
Returns a string with the path to qml resources, including qml sources,
@@ -60,7 +63,11 @@ static QString q_get_qmldir(const QString &name)
QString qml = name;
// try for a Linux package install first
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
+#ifdef QT3D_USE_OPT
+ QDir pkgdir(QLatin1String("/opt/mt/applications/" internal_xstr(QT3D_USE_OPT)));
+#else
QDir pkgdir(QLatin1String("/usr/share/qt5/quick3d/examples"));
+#endif
#else
QDir pkgdir(QLatin1String("/usr/share/qt4/quick3d/examples"));
#endif
diff --git a/tutorials/quick3d/teapot_bounce_qml/teapot_bounce_qml.pro b/tutorials/quick3d/teapot_bounce_qml/teapot_bounce_qml.pro
index 5980f79b2..44c475ff1 100644
--- a/tutorials/quick3d/teapot_bounce_qml/teapot_bounce_qml.pro
+++ b/tutorials/quick3d/teapot_bounce_qml/teapot_bounce_qml.pro
@@ -8,4 +8,8 @@ HEADERS += ../qmlres.h
DESTDIR = ../../../bin
-include(../../../qml_pkg.pri)
+INSTALL_DIRS = qml
+
+CONFIG += qt3d_deploy_qml
+include(../../../pkg.pri)
+qtcAddDeployment()
diff --git a/tutorials/quick3d/teapot_qml/teapot_qml.pro b/tutorials/quick3d/teapot_qml/teapot_qml.pro
index 3546e15e7..0ae0d9dad 100644
--- a/tutorials/quick3d/teapot_qml/teapot_qml.pro
+++ b/tutorials/quick3d/teapot_qml/teapot_qml.pro
@@ -9,4 +9,8 @@ HEADERS += ../qmlres.h
DESTDIR = ../../../bin
-include(../../../qml_pkg.pri)
+INSTALL_DIRS = qml
+
+CONFIG += qt3d_deploy_qml
+include(../../../pkg.pri)
+qtcAddDeployment()
diff --git a/util/qt3d/qglinfo/qglinfo.pro b/util/qt3d/qglinfo/qglinfo.pro
index 7a4e40e18..423b0291e 100644
--- a/util/qt3d/qglinfo/qglinfo.pro
+++ b/util/qt3d/qglinfo/qglinfo.pro
@@ -1,7 +1,8 @@
TARGET = qglinfo
!package: CONFIG += qt3d
-include(../../../qt3d_pkg_dep.pri)
+CONFIG += qt3d_deploy_pkg
+include(../../../pkg.pri)
SOURCES += main.cpp \
qglinfowindow.cpp \