summaryrefslogtreecommitdiffstats
path: root/qt3dstudio.pro
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@qt.io>2019-03-21 12:43:03 +0200
committerMiikka Heikkinen <miikka.heikkinen@qt.io>2019-03-26 11:31:55 +0000
commitcc2c27f625c2c7f6c0f4a0951833ddd9a7bb9d76 (patch)
tree63464206015ca489caa332ffb3784fae8ee78726 /qt3dstudio.pro
parentff0dba0dbfde3b9f34db4d89a7f94a531bbe547d (diff)
Revert "Remove legacy viewer"
This reverts commit 4193fc4f00c2e687ca82de589603c7fa133bff50. Also made the legacy viewer button show up by default. The viewer doesn't currently show materials correctly, that will be fixed in a separate patch. Task-number: QT3DS-3198 Change-Id: I079eb31d9240abde496d91edc9f5611c3fbbe6a7 Reviewed-by: Jere Tuliniemi <jere.tuliniemi@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'qt3dstudio.pro')
-rw-r--r--qt3dstudio.pro45
1 files changed, 45 insertions, 0 deletions
diff --git a/qt3dstudio.pro b/qt3dstudio.pro
index 7360423e..b5b3fe5e 100644
--- a/qt3dstudio.pro
+++ b/qt3dstudio.pro
@@ -28,6 +28,32 @@ load(qt_parts)
deploytool = windeployqt
exesuffix = .exe
+ # windeployqt will get confused when deploying viewer 1.0, because some of studio
+ # libraries it links detect as Qt libraries due to their naming scheme.
+ # Since viewer and studio have mostly identical Qt dependencies and both are deployed
+ # to the same directory, we can just omit deployment of viewer in windows and
+ # deploy the missing qml bits separately.
+
+ # Viewer 1.0 needs the studio qml plugin
+ # The assumption is that we are deploying release build in case both are built
+ release {
+ QML_FILE_R = QtStudio3D/declarative_qtstudio3d.dll
+ QMAKE_EXTRA_TARGETS += deployReleaseQml
+ deployTarget.depends += deployReleaseQml
+ deployReleaseQml.depends = mkStudioQmlDir
+ deployReleaseQml.commands = \
+ $$QMAKE_COPY $$shell_quote($$shell_path($$OUT_PWD/qml/$$QML_FILE_R)) \
+ $$shell_quote($$shell_path(\$(DEPLOY_DIR)/$$QML_FILE_R))
+ } else {
+ QML_FILE_D = QtStudio3D/declarative_qtstudio3dd.dll
+ QMAKE_EXTRA_TARGETS += deployDebugQml
+ deployTarget.depends += deployDebugQml
+ deployDebugQml.depends += mkStudioQmlDir
+ deployDebugQml.commands = \
+ $$QMAKE_COPY $$shell_quote($$shell_path($$OUT_PWD/qml/$$QML_FILE_D)) \
+ $$shell_quote($$shell_path(\$(DEPLOY_DIR)/$$QML_FILE_D))
+ }
+
# copy QtStudio3D.dll
release {
QTSTUDIO3D_LIB = Qt5Studio3D.dll
@@ -40,6 +66,18 @@ load(qt_parts)
$$QMAKE_COPY $$shell_quote($$shell_path( \
$$OUT_PWD/bin/$$QTSTUDIO3D_LIB)) \
$$shell_quote($$shell_path($$[QT_INSTALL_BINS]/$$QTSTUDIO3D_LIB))
+
+ QMLDIR_FILE = QtStudio3D/qmldir
+ QMAKE_EXTRA_TARGETS += deployQmldir
+ deployTarget.depends += deployQmldir
+ deployQmldir.depends += mkStudioQmlDir
+ deployQmldir.commands = \
+ $$QMAKE_COPY $$shell_quote($$shell_path($$OUT_PWD/qml/$$QMLDIR_FILE)) \
+ $$shell_quote($$shell_path(\$(DEPLOY_DIR)/$$QMLDIR_FILE))
+
+ QMAKE_EXTRA_TARGETS += mkStudioQmlDir
+ mkStudioQmlDir.commands = \
+ $$sprintf($$QMAKE_MKDIR_CMD, $$shell_quote($$shell_path(\$(DEPLOY_DIR)/QtStudio3D)))
}
qtPrepareTool(DEPLOY_TOOL, $$deploytool)
@@ -49,6 +87,13 @@ load(qt_parts)
$$DEPLOY_TOOL $$shell_quote(\$(DEPLOY_DIR)/Qt3DStudio$${exesuffix}) \
-qmldir=$$shell_quote($$PWD/src/Authoring/Studio/Palettes) $$EXTRA_DEPLOY_OPTIONS
+ macos {
+ # Viewer 1.0
+ deployTarget.commands += && \
+ $$DEPLOY_TOOL $$shell_quote(\$(DEPLOY_DIR)/Qt3DViewer$${exesuffix}) \
+ $$EXTRA_DEPLOY_OPTIONS
+ }
+
greaterThan(QT_MAJOR_VERSION, 5)|greaterThan(QT_MINOR_VERSION, 10) {
# Viewer 2.0
win32 {