miurahr / aqtinstall

aqt: Another (unofficial) Qt CLI Installer on multi-platforms
https://aqtinstall.readthedocs.io/en/latest/
MIT License
912 stars 84 forks source link

[Bug]: Qt6Dependencies.cmake is incorrect #813

Open DanielMcInnes opened 1 month ago

DanielMcInnes commented 1 month ago

Bug description

When running the following command: aqt install-qt linux desktop 6.6.3 wasm_singlethread -m qtwebsockets qt5compat qtshadertools --outputdir /opt/hostedtoolcache/Qt

... the installed file /opt/hostedtoolcache/Qt/6.6.3/wasm_singlethread/lib/cmake/Qt6/Qt6Dependencies.cmake differs from what gets installed by the Qt MaintenanceTool.

Likewise for /wasm_singlethread/lib/cmake/Qt6BuildInternals/QtBuildInternalsExtra.cmake

Expected behavior

aqt install-qt should install the same files that the qt MaintenanceTool does

aqt and python version

aqtinstall(aqt) v3.1.18 on Python 3.10.12 [CPython GCC 11.4.0]

Operating System

Linux/Unix

Relevant log output

dmcinnes@dmcinnes-System-Product-Name:~/git/victron/gui-v2$ diff /opt/Qt/6.6.3/wasm_singlethread/lib/cmake/Qt6/Qt6Dependencies.cmake /opt/hostedtoolcache/Qt/6.6.3/wasm_singlethread/lib/cmake/Qt6/Qt6Dependencies.cmake &
[3] 37500
dmcinnes@dmcinnes-System-Product-Name:~/git/victron/gui-v2$ 4,5c4,5
< set(__qt_platform_initial_qt_host_path "/opt/Qt/6.6.3/gcc_64")
< set(__qt_platform_initial_qt_host_path_cmake_dir "/opt/Qt/6.6.3/gcc_64/lib/cmake")
---
> set(__qt_platform_initial_qt_host_path "/Users/qt/work/install")
> set(__qt_platform_initial_qt_host_path_cmake_dir "/Users/qt/work/install/lib/cmake")

dmcinnes@dmcinnes-System-Product-Name:~/git/victron/gui-v2$ diff /opt/Qt/6.6.3/wasm_singlethread/lib/cmake/Qt6BuildInternals/QtBuildInternalsExtra.cmake /opt/hostedtoolcache/Qt/6.6.3/wasm_singlethread/lib/cmake/Qt6BuildInternals/QtBuildInternalsExtra.cmake
45,46c45,46
<     set(qtbi_orig_prefix "/opt/Qt")
<     set(qtbi_orig_staging_prefix "/opt/Qt/6.6.3/wasm_singlethread")
---
>     set(qtbi_orig_prefix "C:/Qt/Qt-6.6.3")
>     set(qtbi_orig_staging_prefix "/Users/qt/work/install/target")
dmcinnes@dmcinnes-System-Product-Name:~/git/victron/gui-v2$ diff /opt/Qt/6.6.3/wasm_singlethread/lib/cmake/Qt6BuildInternals/QtBuildInternalsExtra.cmake /opt/hostedtoolcache/Qt/6.6.3/wasm_singlethread/lib/cmake/Qt6BuildInternals/QtBuildInternalsExtra.cmake
45,46c45,46
<     set(qtbi_orig_prefix "/opt/Qt")
<     set(qtbi_orig_staging_prefix "/opt/Qt/6.6.3/wasm_singlethread")
---
>     set(qtbi_orig_prefix "C:/Qt/Qt-6.6.3")
>     set(qtbi_orig_staging_prefix "/Users/qt/work/install/target")
dmcinnes@dmcinnes-System-Product-Name:~/git/victron/gui-v2$

Code of Conduct

miurahr commented 1 month ago

aqtinstall do not have a feature to patch cmake files.

We may need to add a new function to patch cmake file in Update class. https://github.com/miurahr/aqtinstall/blob/master/aqt/updater.py#L269

Fortunately, we have already had a method to patch text files, but we need to determine conditions.

Currently, we don't modify anythings for wasm. Is it also affected in android?