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. qt_generate_deploy_qml_app_script not working for static Qt 6.4
Forum Update on Monday, May 27th 2025

qt_generate_deploy_qml_app_script not working for static Qt 6.4

Scheduled Pinned Locked Moved Solved Installation and Deployment
deploying qml cqtquickqt6
3 Posts 2 Posters 588 Views
  • 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.
  • 2 Offline
    2 Offline
    2FingerTyper
    wrote on 25 Apr 2023, 13:08 last edited by 2FingerTyper
    #1

    Hello,
    I am currently trying to build a QtQuick-App. It was created in Design Studio and can be build and run in both Design Studio and Creator on my development machine (win10, 64bit). Now I want to deploy the App to another target pc (win10, 64bit). So I build a static version of the Qt I am using (6.4.3) with the following configure-flags:

    ../configure.bat -static -release -platform win32-g++ -opensource -confirm-license -prefix C:/Users/u4540/programs_and_libs/Qt-6.4.3-Static/Qt643Static -qt-zlib -qt-libpng -qt-webp -qt-libjpeg -qt-freetype  -no-opengl -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdoc -skip qtgamepad -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtremoteobjects -skip qtscript -skip qtsensors -skip qtspeech -skip qtsvg -skip qtwayland -skip qtwebglplugin -skip qtwebview -skip webengine -make libs -nomake tools -nomake examples -nomake tests -skip qtvirtualkeyboard
    

    I added this to the CMakeLists.Txt:

    qt_generate_deploy_qml_app_script(
        TARGET ${CMAKE_PROJECT_NAME}
        FILENAME_VARIABLE deploy_script
    )
    install(SCRIPT ${deploy_script})
    

    However, when trying to configure the build with cmake, it fails:

    cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=C:/stash ../MyProjectDir
    

    Output:

    CMake Error at C:/Users/u4540/programs_and_libs/Qt-6.4.3-Static/Qt643Static/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake:3096 (message):
      Support for installing runtime dependencies is not implemented for this
      target platform (Windows, static Qt libs).
    Call Stack (most recent call first):
      C:/Users/u4540/programs_and_libs/Qt-6.4.3-Static/Qt643Static/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake:3112 (qt6_generate_deploy_qml_app_script)
      CMakeLists.txt:52 (qt_generate_deploy_qml_app_script)
    
    
    -- Configuring incomplete, errors occurred!
    See also "C:/Users/.../build/CMakeFiles/CMakeOutput.log".
    See also "C:/Users/.../build/CMakeFiles/CMakeError.log".
    

    It does however work if I link against the normal (non-static) install of Qt 6.4.3.
    Am I doing something wrong? Or is qt_generate_deploy_qml_app_script() Macro not yet available for static Qt 6.4.3?

    Best Regards

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jobor
      wrote on 30 May 2023, 08:42 last edited by
      #2

      qt_generate_deploy_qml_app_script() is not available for static builds right now.

      In a static Qt build, runtime dependencies are usually baked into the binary. What are you expecting from the deployment API for static Qt builds?

      1 Reply Last reply
      0
      • 2 Offline
        2 Offline
        2FingerTyper
        wrote on 21 Jun 2023, 09:08 last edited by
        #3

        Thanks for the information. I did not realize that all dependencies are build into the application on static builds and therefore the deploy-script is not needed anymore. I got the script to run with my normal (dynamically linked) version of Qt and now I get my deployable this way. Thanks again for the help.

        1 Reply Last reply
        0
        • 2 2FingerTyper has marked this topic as solved on 9 Feb 2024, 12:44

        • Login

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