Qt 6.3.1Conan软件包发布

Qt官方宣布推出Qt6.3.1 Conan技术预览包,提供桌面和移动平台的支持。Conan是一个开源的包管理器,帮助开发者更方便地管理依赖、实现模块化,自定义构建配置,并缓存本地二进制文件。通过Qt Conan服务器,开发者可以获取适用于Windows、macOS、Linux和Android的Qt软件包。
摘要由CSDN通过智能技术生成

Qt 6.3.1 Conan packages released

Qt 6.3.1Conan软件包发布

Tuesday June 28, 2022 by Iikka Eklund | Comments

​Iikka Eklund于2022年6月28日星期二发表评论

We are happy to announce the Qt 6.3.1 Conan Technology Preview packages release today. The packages are available with the  Conan package manager from The Qt Company Conan server. Both desktop (Windows MSVC2019 and MinGW, macOS, and Linux) and mobile (Android) packages are available. 

​我们很高兴今天发布Qt 6.3.1Conan技术预览包。Conan软件包管理器可从Qt公司Conan服务器获取这些软件包。桌面(Windows MSVC2019和MinGW、macOS和Linux)和移动(Android)软件包均可用。 

Conan is the open-source, decentralized, and multi-platform package manager to create and share native binaries for C/C++. There are already almost 1,000 developers, who have downloaded and used Qt packages via the Qt Conan server. 

Conan是一个开源的、分散的、多平台的包管理器,用于创建和共享C/C++的本机二进制文件。已经有近1000名开发人员通过Qt Conan服务器下载并使用了Qt软件包。

Why should I use Conan package management? 

为什么要使用Conan软件包管理?

  • Easier to manage any transient dependency - define the dependency and Conan manages the dependencies with exactly the correct package versions.
  • 更容易管理任何暂时的依赖关系-定义依赖关系,Conan使用正确的软件包版本管理依赖关系。
  • Improved modularity - Download only the packages your project needs, nothing else.
  • 改进的模块化—只下载项目所需的软件包,不下载其他软件包。
  • Manage external libraries - Conan helps in using dependencies to any other libraries as long as you have the Conan recipe 
  • 管理外部库-只要您有Conan配方,Conan就可以帮助您使用对任何其他库的依赖关系
  • Custom build configurations - Didn't you find the binaries/build configuration you needed? Just edit the provided build profiles for your needs and pass "--build" and Conan will build everything you need from sources (provided you have compilation tools in your environment). The built binaries are stored in your local Conan cache, from where the binaries can be then easily re-used.
  • 自定义生成配置-您没有找到所需的二进制文件/生成配置吗?只需根据您的需要编辑提供的构建概要文件并传递“-build”,Conan就会从源代码构建您所需的所有内容(前提是您的环境中有编译工具)。构建的二进制文件存储在您的本地Conan缓存中,在那里可以轻松地重用二进制文件。
  • Conan caches the binaries locally so additional installations are faster.
  • 柯南在本地缓存二进制文件,以便更快地进行其他安装。

How to get started?

如何开始?

Install Conan from here. Using a recent version is preferred (1.47 or later).

​从此处安装Conan。最好使用最新版本(1.47或更高版本)。

To get access to our Conan packages, go to the "Conan Package Manager" page in Qt Account to generate your personal credentials for the Conan server.

​要访问我们的Conan软件包,请转到Qt帐户中的“Conan软件包管理器”页面,为Conan服务器生成您的个人凭据。

1. Add the remote to your local configuration:

1、将远程设备添加到本地配置:

$ conan remote add qt https://qtpkgtest.jfrog.io/artifactory/api/conan/qt

2. Authenticate to our server:

2、向我们的服务器进行身份验证:

$ conan user -p PASSWORD -r qt USERNAME


Building an example for desktop

构建桌面示例

1. First, declare the dependencies your application has:

1、首先,声明应用程序的依赖关系:

$ cd <my app folder>
my_app_deps.txt:
[requires]
qtbase/6.3.1@qt/everywhere
qtdeclarative/6.3.1@qt/everywhere

2. To access the pre-built Qt binaries install the build profiles used by Qt CI:

2、要访问预构建的Qt二进制文件,请安装Qt CI使用的构建配置文件:

$ mkdir build && cd build
$ conan install qtbuildprofiles/6.3.1@qt/everywhere --remote=qt

 3. Install the needed dependencies and ask Conan to generate virtual env for you to access those binaries:

3、安装所需的依赖项,并要求Conan为您生成虚拟环境以访问这些二进制文件:

$ conan install my_app_deps.txt --profile=linux-x86_64-gcc --update --generator=virtualenv --remote=qt
 # wait for the installation to complete ...
$ source activate.sh  # on windows run the activate.bat
# build your app
$ cd <my app dir>
$ qt-cmake CMakeLists.txt
$ cmake --build .
# run your app

Building an application for Android

构建Android应用程序

1. First, you need to install the host binaries where you are running the builds:

1、首先,您需要在运行构建的地方安装主机二进制文件:

$ mkdir host  && cd host
$ conan install qtsvg/6.3.1@qt/everywhere --profile ../linux-x86_64-gcc --generator=virtualenv --update -r qt
$ cd ..

2. Then install the Android binaries:

2、然后安装Android二进制文件:

$ mkdir target  && cd target
# Note1: pass the QT_HOST_PATH to build system via Conan using -o qtbase:qt_host_path=<host install folder in step 1. above>
# Note2: pass the Android Sdk and Ndk versions as well
$ conan install qtsvg/6.3.1@qt/everywhere --profile ../unix-android-x86_64-clang --update --build=never -r qt --generator=virtualenv -o qtbase:qt_host_path=/<my work folder>/host/ -o *:android_sdk_version=31 -o *:android_ndk_version=r22b

3. Activate the virtual environments:

3、激活虚拟环境:

$ cd ../host && source activate.sh
# Then activate the target (Android) virtual env:
$ cd ../target && source activate.sh

4. Build your application:

4、构建应用程序:

$ cd <my app folder>
$ qt-cmake CMakeLists.txt
$ make

Conan usage example

Conan使用示例

Please look at more details here.

​请在此查看更多详细信息。

Your feedback is still valuable!

您的反馈仍然很有价值!

We are interested to hear how Qt Conan packages would fit in your workflow? I.e. using Qt "the package manager way". Any of the following feedback channels can be used: 

我们很想知道Qt Conan软件包如何适合您的工作流程?一、 e.使用Qt“包管理器方式”。可以使用以下任何反馈渠道:

  • Please let us know your thoughts in this blog post comments.
  • 请在这篇博客评论中告诉我们你的想法。
  • Please use Qt Bug Tracker to file bugs and suggestions. Please use the component Conan to allow easy filtering.
  • ​请使用Qt Bug Tracker来归档Bug和建议。请使用组件Conan以便于过滤。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值