Fixing Qt Deploy

the project: https://pypi.org/project/windeployqt/

install Qt

Install Qt Creator on Windows is complex even using MSYS2. and it didn’t create useful shortcuts.

I write a Python package for it: https://pypi.org/project/install-qt-creator/

deploy Qt

Also, to deploy Qt is also a pain. one need to deal with complex dependencies, also, QMLDIR was not automatically set, and QtQuick base files are hard to locate…

It seems on newer Qt, there is a cmake function to create and copy Main.qml to a qmldir automatically:

qt_add_qml_module(appqtquick_untitled
    URI qtquick_untitled
    VERSION 1.0
    QML_FILES
        Main.qml
)

it results in a directory inside build directory. the code to load it is as follows:

engine.loadFromModule("qtquick_untitled", "Main");

well I also modify the script to add a function to copy this directory to output directory.

symbol links

I recalled that Windows has symbol links recently. this can simplify the build process. but I tried it that it cannot locate dll correctly.

So I added another function to copy the dll in-place…

create shortcut

it’s just a bounous