1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-24 19:52:40 +01:00

Fix aqt install on linux and mac

This commit is contained in:
Elias Steurer 2024-10-27 12:06:27 +01:00
parent a46bf9a2e0
commit 5be8baf838
2 changed files with 19 additions and 8 deletions

View File

@ -1,3 +1,4 @@
cmake-format cmake-format
aqtinstall aqtinstall
requests requests
setuptools # distutils

View File

@ -47,19 +47,29 @@ class commands_list():
def download(aqt_path: Path, qt_platform: Path): def download(aqt_path: Path, qt_platform: Path):
qt_packages = "" extra_qt_packages = ""
if system() == "Windows": if system() == "Windows":
os = "windows" os = "windows"
extra_qt_packages = "debug_info "
elif system() == "Darwin": elif system() == "Darwin":
os = "mac" os = "mac"
elif system() == "Linux": elif system() == "Linux":
qt_packages = "qtwaylandcompositor "
os = "linux" os = "linux"
extra_qt_packages = "qtwaylandcompositor debug_info "
qt_packages += "qt3d qtquick3d qtconnectivity qt5compat qtimageformats qtmultimedia qtshadertools qtwebchannel qtwebengine qtwebsockets qtwebview qtpositioning " # Windows: python aqt list-qt windows desktop --arch
qt_packages += "debug_info" # Linux: python3 aqt list-qt windows desktop --arch
qt_packages = "qt3d qtquick3d qtconnectivity qt5compat qtimageformats qtmultimedia qtshadertools qtwebchannel qtwebengine qtwebsockets qtwebview qtpositioning "
qt_packages += extra_qt_packages
# Windows: python -m aqt list-qt windows desktop --modules 6.7.3 win64_msvc2019_64 # Windows: python -m aqt list-qt windows desktop --modules 6.7.3 win64_msvc2019_64
# Linux: python3 -m aqt list-qt linux desktop --modules 6.7.3 gcc_64 # Linux: python3 -m aqt list-qt linux desktop --modules 6.7.3 linux_gcc_64
# Linux: python3 -m aqt list-qt mac desktop --modules 6.7.3 clang_64
# debug_info:
# Mac: Does not exist
# Windows: single package
# Linux: each module has a debug package
print(f"Downloading: {qt_packages} to {aqt_path}") print(f"Downloading: {qt_packages} to {aqt_path}")
execute(f"{defines.PYTHON_EXECUTABLE} -m aqt install-qt -O {aqt_path} {os} desktop {defines.QT_VERSION} {qt_platform} -m {qt_packages}") execute(f"{defines.PYTHON_EXECUTABLE} -m aqt install-qt -O {aqt_path} {os} desktop {defines.QT_VERSION} {qt_platform} -m {qt_packages}")
@ -78,11 +88,11 @@ def setup_qt():
print(f"Setup Qt via aqt at {aqt_path}") print(f"Setup Qt via aqt at {aqt_path}")
if system() == "Windows": if system() == "Windows":
qt_platform = "win64_msvc2019_64" qt_platform = "win64_msvc2019_64" # 6.8.0 win64_msvc2022_64
elif system() == "Darwin": elif system() == "Darwin":
qt_platform = "clang_64" qt_platform = "clang_64"
elif system() == "Linux": elif system() == "Linux":
qt_platform = "gcc_64" qt_platform = "linux_gcc_64"
qt_base_path = aqt_path.joinpath(defines.QT_VERSION).resolve() qt_base_path = aqt_path.joinpath(defines.QT_VERSION).resolve()
qt_path = qt_base_path.joinpath(qt_platform).resolve() qt_path = qt_base_path.joinpath(qt_platform).resolve()