Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Basic Qt3D Example fails to run correctly when deployed.

Basic Qt3D Example fails to run correctly when deployed.

Scheduled Pinned Locked Moved Solved Installation and Deployment
3 Posts 2 Posters 822 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • DiracsbracketD Offline
    DiracsbracketD Offline
    Diracsbracket
    wrote on last edited by Diracsbracket
    #1

    Hi.
    I have used windeployqt.exe before to deploy both C++ and QML applications on Windows 10.

    However, as I tried to deploy the Qt3D: QML wireframe Example and run it, only the window shows; the trefoil knot does not (running the example in Qt Creator works).

    I used the following script for the deployment:

    @echo off
    if not defined in_subprocess (cmd /k set in_subprocess=y ^& %0 %*) & exit )
    
    call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
    
    set BUILD_DIR="D:\Qt\Examples\Qt-5.11.0\qt3d\build-wireframe-Desktop_Qt_5_11_0_MSVC2017_64bit3-Debug\debug"
    set DEPLOY_EXE=D:\Qt\5.11.0\msvc2017_64\bin\windeployqt.exe
    set BUILD_EXE=wireframe.exe
    set OUT_EXE="wireframe.exe"
    set OUTDIR=%BUILD_DIR%\..\..\_Deployment\Wireframe_Debug
    set BUILD_DRIVE=%BUILD_DIR:~1,1%:
    set CD_BUILD=cd %BUILD_DIR%
    set QMLDIR="D:\Qt\5.11.0\msvc2017_64\qml"
    set DEPLOY=%DEPLOY_EXE% --dir %OUTDIR% --qmldir %QMLDIR% %BUILD_EXE% --compiler-runtime --force --verbose 1
    
    %BUILD_DRIVE%
    %CD_BUILD%
    %DEPLOY%
    
    copy %BUILD_EXE% %OUTDIR%\%OUT_EXE%
    %SystemRoot%\explorer.exe %OUTDIR%
    
    set /p=Hit ENTER to continue...
    

    Since QT_OPENGL needs to be set to desktop instead of angle, I also made sure that environment variable is defined as such in my Windows system environment settings (I used to only change it in the Qt Creator Run-time environment settings) , but to no avail.

    Also the Dependencies tool did not report any missing dependencies for the binary.

    Any ideas what I am missing here?
    Thanks!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      I don't remember for which version it was fixed but there were plugins missing when deploying Qt3D based application at some point.

      Check that.

      You can verify what is currently loaded running your application with the QT_DEBUG_PLUGIN environment variable set to 1.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      DiracsbracketD 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi,

        I don't remember for which version it was fixed but there were plugins missing when deploying Qt3D based application at some point.

        Check that.

        You can verify what is currently loaded running your application with the QT_DEBUG_PLUGIN environment variable set to 1.

        DiracsbracketD Offline
        DiracsbracketD Offline
        Diracsbracket
        wrote on last edited by
        #3

        @SGaist said in Basic Qt3D Example fails to run correctly when deployed.:

        QT_DEBUG_PLUGIN

        Thank you!
        I should have looked to the Debugging Techniques page first...

        Setting the above environment variable resulted in the following output when deployed:

        qrc:/main.qml:53:1: module "Qt3D.Render" is not installed
        qrc:/main.qml:55:1: module "Qt3D.Extras" is not installed
        qrc:/main.qml:54:1: module "Qt3D.Input" is not installed
        qrc:/main.qml:52:1: module "Qt3D.Core" is not installed
        

        So all that needed to be done was to copy the Qt\5.11.0\msvc2017_64\qml\Qt3D folder to the deployment folder.

        Cheers!

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved