aqtinstall在Windows Docker容器中安装带有QtWebview模块的Qt时出现问题。

huangapple go评论67阅读模式
英文:

aqtinstall trouble Installing Qt with QtWebview Module in a Windows Docker Container

问题

I'm currently facing an issue while trying to install Qt 5.15.2 using aqt within a Windows Docker container. I'm in the process of setting up a CI/CD pipeline, and one of the requirements is to have Qt installed in the Windows Docker container. However, I specifically need the QtWebview module, along with some other modules.

I've tried specifying the QtWebview module using the command line during installation, but it doesn't seem to work as expected. Even after installation, when I navigate to the installation directory, I can't locate the QtWebview module. Additionally, attempting to compile my code within the container also fails.

Here's the command I've been using for the installation:

aqt install-qt --outputdir c:\Qt --windows desktop 5.15.2 win64_mingw81 --modules all --archives qtbase qtmultimedia qtdeclarative qtsvg qtwebview

I would greatly appreciate any insights or suggestions on how to resolve this issue.

PS: here is the full docker container

# escape=`

# Use the latest Windows Image 20h2
FROM mcr.microsoft.com/windows:20H2
ENV VS160COMNTOOLS C:\Program Files (x86)\Microsoft Visual Studio22\Community\Common7\Tools

WORKDIR C:\init

# Restore the default Windows shell for correct batch processing.
SHELL ["cmd", "/S", "/C"]

# install choco (win package manager like apt-get)
RUN @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

RUN choco install mingw -y

RUN choco install ninja -y

# install cmake
RUN choco install cmake -y `
    && set PATH=%PATH%;C:\Program Files\CMake\bin\

# install git    
RUN choco install git -y `
    && set PATH=%PATH%;C:\Program Files\Git\bin\

# Install Python and pip
RUN choco install python -y
RUN set PATH=%PATH%;C:\Python39\Scripts

# Install aqt 
RUN pip install aqtinstall

# Install qt
RUN  aqt install-qt --outputdir c:\Qt windows desktop 5.15.2 win64_mingw81 --modules all --archives qtbase qtmultimedia qtdeclarative qtsvg qtwebview

# run.bat 
COPY run.bat .

# start run.bat when container started
CMD C:\init\docker\windows\run.bat
英文:

I'm currently facing an issue while trying to install Qt 5.15.2 using aqt within a Windows Docker container. I'm in the process of setting up a CI/CD pipeline, and one of the requirements is to have Qt installed in the Windows Docker container. However, I specifically need the QtWebview module, along with some other modules.

I've tried specifying the QtWebview module using the command line during installation, but it doesn't seem to work as expected. Even after installation, when I navigate to the installation directory, I can't locate the QtWebview module. Additionally, attempting to compile my code within the container also fails.

Here's the command I've been using for the installation:

aqt install-qt --outputdir c:\Qt --windows desktop 5.15.2 win64_mingw81 --modules all --archives qtbase qtmultimedia qtdeclarative qtsvg qtwebview

I would greatly appreciate any insights or suggestions on how to resolve this issue.

PS: here is the full docker container

# escape=`

# Use the latest Windows Image 20h2
FROM mcr.microsoft.com/windows:20H2
ENV VS160COMNTOOLS C:\Program Files (x86)\Microsoft Visual Studio22\Community\Common7\Tools

WORKDIR C:\init

# Restore the default Windows shell for correct batch processing.
SHELL ["cmd", "/S", "/C"]

# install choco (win package manager like apt-get)
RUN @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

RUN choco install mingw -y

RUN choco install ninja -y

# install cmake
RUN choco install cmake -y `
    && set PATH=%PATH%;C:\Program Files\CMake\bin\

# install git    
RUN choco install git -y `
    && set PATH=%PATH%;C:\Program Files\Git\bin\

# Install Python and pip
RUN choco install python -y
RUN set PATH=%PATH%;C:\Python39\Scripts

# Install aqt 
RUN pip install aqtinstall

# Install qt
RUN  aqt install-qt --outputdir c:\Qt windows desktop 5.15.2 win64_mingw81 --modules all --archives qtbase qtmultimedia qtdeclarative qtsvg qtwebview

# run.bat 
COPY run.bat .

# start run.bat when container started
CMD C:\init\docker\windows\run.bat
~              

答案1

得分: 0

针对任何阅读此帖子的人。实际上,在MingW版本5.15.2中无法安装此特定的Qt模块。因此,您必须更改版本或更改方法。

英文:

For anyone reading this post. In fact, it is not possible to install this particular module for Qt for MingW version 5.15.2. You must therefore either change version or change method

huangapple
  • 本文由 发表于 2023年6月26日 15:33:09
  • 转载请务必保留本文链接:https://go.coder-hub.com/76554460.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定