WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@AdelKS
Copy link

@AdelKS AdelKS commented Oct 26, 2025

windeployqt expects to find qmlimportscanner next to it

This fixes this issue

windeployqt6.exe --qmldir ../src/QML/ ZeGrapher.exe
C:\msys64\home\adelk\ZeGrapher\deploy-windows\ZeGrapher.exe 64 bit, release executable [QML]
Scanning ..\src\QML\:
Process failed to start: The system cannot find the file specified.

Also reported on a Reddit post

It also expects lconvert in /bin

@ognevny
Copy link
Collaborator

ognevny commented Oct 27, 2025

it seems you are trying to do this in a wrong package. qmlimportscanner.exe is not presented in this package

pkgfile qmlimportscanner.exe
mingw64/mingw-w64-x86_64-qt5-declarative
mingw64/mingw-w64-x86_64-qt5-static
mingw64/mingw-w64-x86_64-qt6-declarative
mingw64/mingw-w64-x86_64-qt6-static
ucrt64/mingw-w64-ucrt-x86_64-qt5-declarative
ucrt64/mingw-w64-ucrt-x86_64-qt5-static
ucrt64/mingw-w64-ucrt-x86_64-qt6-declarative
ucrt64/mingw-w64-ucrt-x86_64-qt6-static
clang64/mingw-w64-clang-x86_64-qt5-declarative
clang64/mingw-w64-clang-x86_64-qt5-static
clang64/mingw-w64-clang-x86_64-qt6-declarative
clang64/mingw-w64-clang-x86_64-qt6-static

@AdelKS
Copy link
Author

AdelKS commented Oct 27, 2025

it seems you are trying to do this in a wrong package

Indeed thanks for the double check

pacman -F /mingw64/share/qt6/bin/qmlimportscanner.exe
mingw64/share/qt6/bin/qmlimportscanner.exe is owned by mingw64/mingw-w64-x86_64-qt6-declarative 6.10.0-1

Let me fix that

@AdelKS AdelKS changed the title qt6-base: make qmlimportscanner available in /bin mingw-w64-qt6-declarative: make qmlimportscanner available in /bin Oct 27, 2025
@ognevny
Copy link
Collaborator

ognevny commented Oct 27, 2025

please bump pkgrel for the package

@AdelKS
Copy link
Author

AdelKS commented Oct 27, 2025

Okay fixed the second issue with lconvert.

One potential issue, these version-less additions to /bin can cause conflicts with qt5 , we can otherwise patch windeployqt so it looks for the names we have here.

@AdelKS AdelKS changed the title mingw-w64-qt6-declarative: make qmlimportscanner available in /bin Fix windeploy-qt6 Oct 27, 2025
@MehdiChinoune
Copy link
Collaborator

windeploqt6 doesn't expect qmlimportscanner to be in bin/ directory, It searches for it in qmake6 -query QT_INSTALL_QML` directory. So Instead of copying it there, Find the issue why was it not found.
see: https://invent.kde.org/qt/qt/qtbase/-/blob/v6.10.0/src/tools/windeployqt/main.cpp,
And about lconvert, we already patched windeployqt6 to search for lconvert-qt6

- const QString binary = QStringLiteral("lconvert");

Could you show where the issue you are encoutering with it

@MehdiChinoune MehdiChinoune marked this pull request as draft October 28, 2025 06:35
@AdelKS
Copy link
Author

AdelKS commented Oct 28, 2025

windeploqt6 doesn't expect qmlimportscanner to be in bin/ directory, It searches for it in qmake6 -query QT_INSTALL_QML` directory

You give it too much credit: https://invent.kde.org/qt/qt/qtbase/-/blob/v6.10.0/src/tools/windeployqt/qmlutils.cpp#L89

Alright, I'll make a patch for that.

Could you show where the issue you are encoutering with it

For lconvert the issue happens only when using the ucrt package, the mingw64 doesn't have it somehow

Edit: It went smoothly on a pipeline https://github.com/AdelKS/ZeGrapher/actions/runs/18872958087/job/53855639663 without the lconvert workaround, but it wasn't working on my Windows-11 VM, maybe it was just an isolated case (and I also did not do pacman -Syu).

…scanner-qt6

windeployqt expects to find qmlimportscanner next to it, and it's patched to
use qmlimportscanner-qt6
@AdelKS AdelKS marked this pull request as ready for review October 28, 2025 12:33
@MehdiChinoune
Copy link
Collaborator

You give it too much credit: https://invent.kde.org/qt/qt/qtbase/-/blob/v6.10.0/src/tools/windeployqt/qmlutils.cpp#L89

Alright, I'll make a patch for that.

Could you explain what do you mean?, If there is an issue in packaging or windeployqt you should report to Qt first.

@AdelKS
Copy link
Author

AdelKS commented Oct 28, 2025

Could you explain what do you mean?

It needs a patch just like you shown in your message above

- const QString binary = QStringLiteral("lconvert");

This patch

- const QString binary = QStringLiteral("qmlimportscanner");

Then, I didn't look at it deep enough so I may be wrong: the upstream code is like this

    const QString binary = QStringLiteral("qmlimportscanner");
    if (!runProcess(binary, arguments, QDir::currentPath(), &exitCode, &stdOut, &stdErr,
                    errorMessage, timeout))
        return result;

It uses QDir::currentPath() which kind of says that windeployqt just assumes qmlimportscanner sits next to it in the same folder.

Thus my two commits in this PR

@MehdiChinoune
Copy link
Collaborator

Then, I didn't look at it deep enough so I may be wrong: the upstream code is like this

    const QString binary = QStringLiteral("qmlimportscanner");
    if (!runProcess(binary, arguments, QDir::currentPath(), &exitCode, &stdOut, &stdErr,
                    errorMessage, timeout))
        return result;

It uses QDir::currentPath() which kind of says that windeployqt just assumes qmlimportscanner sits next to it in the same folder.

Thus my two commits in this PR

That's what I am talking about, the upstream code has an issue, It shouldn't look in the current directory, so you should report the issue to the upstream.

@AdelKS
Copy link
Author

AdelKS commented Oct 28, 2025

It shouldn't look in the current directory, so you should report the issue to the upstream.

I think the "should" and "should not" are debatable in this case: assuming an executable is in /bin doesn't sound as a too crazy of an assumption (well in this case the assumption is windeployqt and qmlimportscanner are in the same folder).

Also, I am not willing to go fight this fight with upstream Qt, I don't even know where to start x)

@MehdiChinoune
Copy link
Collaborator

I think the "should" and "should not" are debatable in this case: assuming an executable is in /bin doesn't sound as a too crazy of an assumption (well in this case the assumption is windeployqt and qmlimportscanner are in the same folder).

No, If It assumes It's in bin then it should install it there. So the issue is either in code or in packaging and you should report it to Qt so we see what should we do, fix the code or the packaging.

@AdelKS
Copy link
Author

AdelKS commented Oct 28, 2025

Yeah I agree, their cmake install should indeed then put qmlimportscanner in the same folder as windeployqt, although they are in two separate packages.

@AdelKS
Copy link
Author

AdelKS commented Oct 28, 2025

Alright, I remembered I already opened a bug report once, here's what you asked for: https://bugreports.qt.io/browse/QTBUG-141545

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants