diff options
author | Sarah Smith <sarah.j.smith@nokia.com> | 2011-07-06 08:49:41 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-07-06 01:51:02 +0200 |
commit | 90fd74a05fb40af9ce3a16164ade390d639ddfd6 (patch) | |
tree | 3f237643bf91a30828a34349dd9693f9edd09f2a /demos | |
parent | 5496d12616816dcca2a0b33bf9b6b5ffbab921ea (diff) |
Refactor packaging.
Packaging was always not so good. With the arrival of yet another
packaging system to support, with QtSDK and Harmattan, it was overdue
time to refactor the build system.
Factored out all the places where Qt3D and QtQuick3D dependencies were
exactly 3 levels below the source .pro file. This catches all of the
examples and all of the demos, except for the ones in the tutorials
directories. It is fine if those don't appear in packages, since their
main value is in examining them in the IDE, rather than just having a
package run them for you. It also catches both of the import plugins.
Thus we save a huge amount of duplication of packaging information and
can place the Qt SDK Harmattan packaging into a couple of variables in a
new pkg.pri file. The two deps are now in a qt3d_pkg_dep.pri and
qt3dquick_pkg_dep.pri file which include the pkg.pri.
Change-Id: I28de17d7faa5ccf9157afad99471079c0b62ee87
Reviewed-on: http://codereview.qt.nokia.com/1191
Reviewed-by: Sarah Jane Smith
Diffstat (limited to 'demos')
-rw-r--r-- | demos/qt3d/cubehouse/cubehouse.pro | 33 | ||||
-rw-r--r-- | demos/qt3d/dirs | 4 | ||||
-rw-r--r-- | demos/qt3d/pageflip/pageflip.pro | 33 | ||||
-rw-r--r-- | demos/qt3d/photobrowser3d/photobrowser3d.pro | 34 | ||||
-rw-r--r-- | demos/qt3d/photobrowser3d/qfocusadaptor.cpp | 1 | ||||
-rw-r--r-- | demos/qt3d/shapes/shapes.pro | 32 | ||||
-rw-r--r-- | demos/qt3d/teaservice/teaservice.pro | 34 | ||||
-rw-r--r-- | demos/quick3d/dirs | 3 | ||||
-rw-r--r-- | demos/quick3d/model_viewer/model_viewer.pro | 50 | ||||
-rw-r--r-- | demos/quick3d/robo_bounce/robo_bounce.pro | 25 | ||||
-rw-r--r-- | demos/quick3d/tea_service/tea_service.pro | 50 |
11 files changed, 20 insertions, 279 deletions
diff --git a/demos/qt3d/cubehouse/cubehouse.pro b/demos/qt3d/cubehouse/cubehouse.pro index 27eae6f8e..a46698156 100644 --- a/demos/qt3d/cubehouse/cubehouse.pro +++ b/demos/qt3d/cubehouse/cubehouse.pro @@ -3,6 +3,8 @@ TARGET = cubehouse CONFIG += qt warn_on !package: CONFIG += qt3d +include(../../../qt3d_pkg_dep.pri) + SOURCES = cubeview.cpp main.cpp projectivetextureeffect.cpp HEADERS = cubeview.h projectivetextureeffect.h win32:DEFINES+=_CRT_SECURE_NO_WARNINGS @@ -12,37 +14,6 @@ OTHER_FILES += \ shaders/objectlineartexgen.frag \ shaders/objectlineartexgen.vert -package { - maemo { - applnk.files = cubehouse.desktop - applnk.path = /usr/share/applications - - icons.files = icon-l-qt3d.png - icons.path = /usr/share/themes/base/meegotouch/icons - INSTALLS += icons applnk - } - 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 - target.path += $$[QT_INSTALL_BINS] - INSTALLS += target -} else { - DESTDIR = ../../../bin -} OTHER_FILES += \ cubehouse.rc diff --git a/demos/qt3d/dirs b/demos/qt3d/dirs deleted file mode 100644 index 7b7a72f28..000000000 --- a/demos/qt3d/dirs +++ /dev/null @@ -1,4 +0,0 @@ -pageflip -photobrowser3d -shapes -teaservice diff --git a/demos/qt3d/pageflip/pageflip.pro b/demos/qt3d/pageflip/pageflip.pro index 3ac9e2505..8f71925fd 100644 --- a/demos/qt3d/pageflip/pageflip.pro +++ b/demos/qt3d/pageflip/pageflip.pro @@ -1,43 +1,14 @@ TEMPLATE = app TARGET = pageflip CONFIG += qt warn_on + !package: CONFIG += qt3d SOURCES = pageflip.cpp pageflipmath.cpp HEADERS = pageflipmath_p.h RESOURCES = pageflip.qrc -package { - maemo { - applnk.files = pageflip.desktop - applnk.path = /usr/share/applications - - icons.files = icon-l-qt3d.png - icons.path = /usr/share/themes/base/meegotouch/icons - INSTALLS += icons applnk - } - 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 - target.path += $$[QT_INSTALL_BINS] - INSTALLS += target -} else { - DESTDIR = ../../../bin -} +include(../../../qt3d_pkg_dep.pri) OTHER_FILES += \ pageflip.rc diff --git a/demos/qt3d/photobrowser3d/photobrowser3d.pro b/demos/qt3d/photobrowser3d/photobrowser3d.pro index 36c0564a2..26a5c0b47 100644 --- a/demos/qt3d/photobrowser3d/photobrowser3d.pro +++ b/demos/qt3d/photobrowser3d/photobrowser3d.pro @@ -1,6 +1,8 @@ TEMPLATE = app TARGET = photobrowser3d CONFIG += qt warn_on + +include(../../../pkg.pri) !package: CONFIG += qt3d package: QT += opengl @@ -54,37 +56,7 @@ OTHER_FILES += \ shaders/replace_texture.fsh \ shaders/replace_texture.vsh -package { - maemo { - applnk.files = photobrowser3d.desktop - applnk.path = /usr/share/applications - - icons.files = icon-l-qt3d.png - icons.path = /usr/share/themes/base/meegotouch/icons - INSTALLS += icons applnk - } - 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 - target.path += $$[QT_INSTALL_BINS] - INSTALLS += target -} else { - DESTDIR = ../../../bin -} +include(../../../qt3d_pkg_dep.pri) symbian { symbian-abld|symbian-sbsv2 { diff --git a/demos/qt3d/photobrowser3d/qfocusadaptor.cpp b/demos/qt3d/photobrowser3d/qfocusadaptor.cpp index cf96f3a01..315086afb 100644 --- a/demos/qt3d/photobrowser3d/qfocusadaptor.cpp +++ b/demos/qt3d/photobrowser3d/qfocusadaptor.cpp @@ -171,6 +171,7 @@ void QFocusAdaptor::calculateValues() qreal qw = (nearDist * sz.x()) / v.width(); qreal q = qMax(qh, qw); + q = qMax(q, qreal(nearDist * 1.05)); d->sourceCenter = cam->center(); d->sourceEye = cam->eye(); diff --git a/demos/qt3d/shapes/shapes.pro b/demos/qt3d/shapes/shapes.pro index 932c78400..804f22ba7 100644 --- a/demos/qt3d/shapes/shapes.pro +++ b/demos/qt3d/shapes/shapes.pro @@ -5,37 +5,7 @@ CONFIG += qt warn_on SOURCES = shapes.cpp -package { - maemo { - applnk.files = shapes.desktop - applnk.path = /usr/share/applications - - icons.files = icon-l-qt3d.png - icons.path = /usr/share/themes/base/meegotouch/icons - INSTALLS += icons applnk - } - 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 - target.path += $$[QT_INSTALL_BINS] - INSTALLS += target -} else { - DESTDIR = ../../../bin -} +include(../../../qt3d_pkg_dep.pri) OTHER_FILES += \ shapes.rc diff --git a/demos/qt3d/teaservice/teaservice.pro b/demos/qt3d/teaservice/teaservice.pro index 7f292419e..f54f3b516 100644 --- a/demos/qt3d/teaservice/teaservice.pro +++ b/demos/qt3d/teaservice/teaservice.pro @@ -1,43 +1,15 @@ TEMPLATE = app TARGET = teaservice CONFIG += qt warn_on + +include(../../../pkg.pri) !package: CONFIG += qt3d SOURCES = teaservice.cpp meshobject.cpp sceneobject.cpp perpixeleffect.cpp HEADERS = meshobject.h sceneobject.h perpixeleffect.h RESOURCES = teaservice.qrc -package { - maemo { - applnk.files = teaservice.desktop - applnk.path = /usr/share/applications - - icons.files = icon-l-qt3d.png - icons.path = /usr/share/themes/base/meegotouch/icons - INSTALLS += icons applnk - } - 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 - target.path += $$[QT_INSTALL_BINS] - INSTALLS += target -} else { - DESTDIR = ../../../bin -} +include(../../../qt3d_pkg_dep.pri) OTHER_FILES += \ teaservice.rc diff --git a/demos/quick3d/dirs b/demos/quick3d/dirs deleted file mode 100644 index 576bd293e..000000000 --- a/demos/quick3d/dirs +++ /dev/null @@ -1,3 +0,0 @@ -robo_bounce -tea_service -model_viewer diff --git a/demos/quick3d/model_viewer/model_viewer.pro b/demos/quick3d/model_viewer/model_viewer.pro index 17c2994d9..1d6d52a4d 100644 --- a/demos/quick3d/model_viewer/model_viewer.pro +++ b/demos/quick3d/model_viewer/model_viewer.pro @@ -1,56 +1,12 @@ TEMPLATE = app TARGET = model_viewer CONFIG += qt warn_on +!package: CONFIG += qt3dquick SOURCES += main.cpp -HEADERS += ../qmlres.h -QT += declarative - -!package:DESTDIR = ../../../bin -# for cleanup on Windows platforms - avoid deletion prompts -win32 { - QMAKE_DEL_FILE = del /q - QMAKE_DEL_DIR = rmdir /s /q -} - -qmlResources.files = qml -symbian { - DEPLOYMENT = qmlResources -} else { - macx { - qmlResources.path = Contents/Resources - QMAKE_BUNDLE_DATA += qmlResources - } else { - !package { - qmlResources.input = qmlResources.files - qmlResources.output = $$OUT_PWD/../../../bin/resources/demos/$$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 - } - } -} - -# for make install use in packages -distInstalls.files = qml -distInstalls.path = $$[QT_INSTALL_DATA]/quick3d/demos/$$TARGET -INSTALLS += distInstalls - -package { - maemo { - applnk.files = model_viewer.desktop - applnk.path = /usr/share/applications - - icons.files = icon-l-qtquick3d.png - icons.path = /usr/share/themes/base/meegotouch/icons - INSTALLS += icons applnk - } - - target.path = $$[QT_INSTALL_BINS] - INSTALLS += target -} +include(../../../qt3dquick_pkg_dep.pri) +include(../../../qml_pkg.pri) OTHER_FILES += \ model_viewer.rc diff --git a/demos/quick3d/robo_bounce/robo_bounce.pro b/demos/quick3d/robo_bounce/robo_bounce.pro index 61a3c23db..a93711aef 100644 --- a/demos/quick3d/robo_bounce/robo_bounce.pro +++ b/demos/quick3d/robo_bounce/robo_bounce.pro @@ -1,32 +1,11 @@ TEMPLATE = app TARGET = robo_bounce CONFIG += qt warn_on +!package: CONFIG += qt3dquick SOURCES += main.cpp -HEADERS += ../qmlres.h -QT += declarative - -!package:DESTDIR = ../../../bin -# for cleanup on Windows platforms - avoid deletion prompts -win32 { - QMAKE_DEL_FILE = del /q - QMAKE_DEL_DIR = rmdir /s /q -} - -package { - maemo { - applnk.files = robo_bounce.desktop - applnk.path = /usr/share/applications - - icons.files = icon-l-qtquick3d.png - icons.path = /usr/share/themes/base/meegotouch/icons - INSTALLS += icons applnk - } - - target.path = $$[QT_INSTALL_BINS] - INSTALLS += target -} +include(../../../qt3dquick_pkg_dep.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 9baf03c55..f289699a8 100644 --- a/demos/quick3d/tea_service/tea_service.pro +++ b/demos/quick3d/tea_service/tea_service.pro @@ -1,56 +1,12 @@ TEMPLATE = app TARGET = tea_service CONFIG += qt warn_on +!package: CONFIG += qt3dquick SOURCES += main.cpp -HEADERS += ../qmlres.h -QT += declarative - -!package:DESTDIR = ../../../bin -# for cleanup on Windows platforms - avoid deletion prompts -win32 { - QMAKE_DEL_FILE = del /q - QMAKE_DEL_DIR = rmdir /s /q -} - -qmlResources.files = qml -symbian { - DEPLOYMENT = qmlResources -} else { - macx { - qmlResources.path = Contents/Resources - QMAKE_BUNDLE_DATA += qmlResources - } else { - !package { - qmlResources.input = qmlResources.files - qmlResources.output = $$OUT_PWD/../../../bin/resources/demos/$$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 - } - } -} - -# for make install use in packages -distInstalls.files = qml -distInstalls.path = $$[QT_INSTALL_DATA]/quick3d/demos/$$TARGET -INSTALLS += distInstalls - -package { - maemo { - applnk.files = tea_service.desktop - applnk.path = /usr/share/applications - - icons.files = icon-l-qtquick3d.png - icons.path = /usr/share/themes/base/meegotouch/icons - INSTALLS += icons applnk - } - - target.path = $$[QT_INSTALL_BINS] - INSTALLS += target -} +include(../../../qt3dquick_pkg_dep.pri) +include(../../../qml_pkg.pri) OTHER_FILES += \ tea_service.rc |