diff options
author | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2018-03-20 17:43:45 +0200 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2018-03-22 10:28:44 +0000 |
commit | fe725e61ff5376e3db61b598ff5fb36a80da47fa (patch) | |
tree | 7219550d0c67720b8593c8d7dfb89235157bd7d7 /qt3dstudio.pro | |
parent | 22bcb7233ec0ce649578009447522b441d481105 (diff) |
Fix deployqt target
Viewer 1.0 has dependencies to libraries that are detected as
Qt libraries by windeployqt tool due to their name. Since they
are not actually Qt libraries, windeployqt doesn't find them
from Qt installation and fails. Studio3D qml plugin also fails
to deploy.
Worked around this issue by only doing the deployment for studio
executable in Windows. This is okay as both executables are
deployed to the same directory and have roughly same dependencies.
The differences in dependencies are deployed explicitly.
Task-number: QTQAINFRA-1625
Change-Id: Ife07b8bb1d0d894bdad470568199925ab0638db1
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Marianne Yrjänä <marianne.yrjana@qt.io>
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Diffstat (limited to 'qt3dstudio.pro')
-rw-r--r-- | qt3dstudio.pro | 50 |
1 files changed, 47 insertions, 3 deletions
diff --git a/qt3dstudio.pro b/qt3dstudio.pro index 4d520057..7eb9367d 100644 --- a/qt3dstudio.pro +++ b/qt3dstudio.pro @@ -27,17 +27,61 @@ load(qt_parts) } else:win32 { 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 + debug_and_release|CONFIG(release, debug|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)) + } + debug_and_release|CONFIG(debug, debug|release) { + 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)) + } + 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))) + + # Deploy viewer 1.0 qml dependencies when deploying studio + EXTRA_DEPLOY_OPTIONS = -qmldir=$$shell_quote($$PWD/src/Viewer/Qt3DViewer) } qtPrepareTool(DEPLOY_TOOL, $$deploytool) - install_dir = deployTarget.target = deployqt deployTarget.commands = \ $$DEPLOY_TOOL $$shell_quote(\$(DEPLOY_DIR)/Qt3DStudio$${exesuffix}) \ - -qmldir=$$shell_quote($$PWD/src/Authoring/Studio/Palettes) && \ - $$DEPLOY_TOOL $$shell_quote(\$(DEPLOY_DIR)/Qt3DViewer$${exesuffix}) \ + -qmldir=$$shell_quote($$PWD/src/Authoring/Studio/Palettes) $$EXTRA_DEPLOY_OPTIONS + + macos { + deployTarget.commands += && \ + $$DEPLOY_TOOL $$shell_quote(\$(DEPLOY_DIR)/Qt3DViewer$${exesuffix}) \ -qmldir=$$shell_quote($$PWD/src/Viewer/Qt3DViewer) + } + QMAKE_EXTRA_TARGETS += deployTarget } } |