Yocto - bb脚本中使用的SRC_URI、SRCREV和S
我们遇到的各种自己不了解的技术或产品时,都需要阅读用户手册。用户手册里的内容很多时,除了由目录组织文档结构外,通常还有有一个词汇表,一般作为附录放在文档最后。
通过这个按照字母排序的词汇表,可以在对整个文档还不够了解的情况下,快速的定位到自己需要的内容。
比如,我们打开Yocto的manual:Welcome to the Yocto Project Documentation — The Yocto Project ® 4.3.999 documentation
在左侧列表中找到“Reference Manual”,点开,在展开的列表中,继续选择“12 Variables Glossary”,上方点击首字母S,在下方页面中搜索到SRI_URI。
然后就可以得到关于SRI_URI的有用介绍:
See the BitBake manual for the initial description for this variable: SRC_URI.
有关该变量的初始描述,请参阅 BitBake 手册: SRC_URI。
所以,这个变量是用于BitBake的,它会识别和使用这个变量。你在bb脚本中设置这个变量,bitbake在构建时使用。
Bitbake关于此变量的说明的链接:
5 Variables Glossary — Bitbake dev documentation
SRC_URI
源文件列表 - 本地或远程。这个变量告诉 BitBake 在编译时要提取哪些文件,以及如何提取。例如,如果配方或附加文件需要从互联网上获取一个 tar 包,配方或附加文件就会使用 SRC_URI 条目指定该 tar 包。另一方面,如果配方或附加文件需要获取一个压缩包、应用两个补丁并包含一个自定义文件,则配方或附加文件需要一个 SRC_URI 变量来指定所有这些来源。
The list of source files — local or remote. This variable tells BitBake which bits to pull for the build and how to pull them. For example, if the recipe or append file needs to fetch a single tarball from the Internet, the recipe or append file uses a SRC_URI entry that specifies that tarball. On the other hand, if the recipe or append file needs to fetch a tarball, apply two patches, and include a custom file, the recipe or append file needs an SRC_URI variable that specifies all those sources.
下面的列表解释了可用的 URI 协议。URI 协议高度依赖于特定的 BitBake Fetcher 子模块。根据 BitBake 使用的撷取器,会使用不同的 URL 参数。有关所支持的提取器的详细信息,请参阅提取器部分。
The following list explains the available URI protocols. URI protocols are highly dependent on particular BitBake Fetcher submodules. Depending on the fetcher BitBake uses, various URL parameters are employed. For specifics on the supported Fetchers, see the Fetchers section.
* az://: Fetches files from an Azure Storage account using HTTPS.
* bzr://: Fetches files from a Bazaar revision control repository.
* ccrc://: Fetches files from a ClearCase repository.
* cvs://: Fetches files from a CVS revision control repository.
* file://: Fetches files, which are usually files shipped with the Metadata, from the local machine. The path is relative to the FILESPATH variable. Thus, the build system searches, in order, from the following directories, which are assumed to be a subdirectories of the directory in which the recipe file (.bb) or append file (.bbappend) resides:
* ${BPN}: the base recipe name without any special suffix or version numbers.
* ${BP} - ${BPN}-${PV}: the base recipe name and version but without any special package name suffix.
* files: files within a directory, which is named files and is also alongside the recipe or append file.
* ftp://: Fetches files from the Internet using FTP.
* git://: Fetches files from a Git revision control repository.
* gitsm://: Fetches submodules from a Git revision control repository.
* hg://: Fetches files from a Mercurial (hg) revision control repository.
* http://: Fetches files from the Internet using HTTP.
* https://: Fetches files from the Internet using HTTPS.
* npm://: Fetches JavaScript modules from a registry.
* osc://: Fetches files from an OSC (OpenSUSE Build service) revision control repository.
* p4://: Fetches files from a Perforce (p4) revision control repository.
* repo://: Fetches files from a repo (Git) repository.
* ssh://: Fetches files from a secure shell.
* svn://: Fetches files from a Subversion (svn) revision control repository.
这里还有一些值得一提的选项:
Here are some additional options worth mentioning:
-
downloadfilename:指定存储下载文件时使用的文件名。
-
name:在 SRC_URI 中指定多个文件或 git 仓库时,用于识别与 SRC_URI 校验和或 SRCREV 关联的名称。例如
SRC_URI = "git://example.com/foo.git;branch=main;name=first \
git://example.com/bar.git;branch=main;name=second \
http://example.com/file.tar.gz;name=third"
SRCREV_first = "f1d2d2f924e986ac86fdf7b36c94bcdf32beec15"
SRCREV_second = "e242ed3bffccdf271b7fbaf34ed72d089537b42f"
SRC_URI[third.sha256sum] = "13550350a8681c84c861aac2e5b440161c2b33a3e4f302ac680ca5b686de48de"
-
subdir: 将文件(或提取其内容)放入指定的子目录。该选项对于不常见的 tar 包或其他存档文件很有用,因为这些存档中的文件可能没预先放在一个子目录中。
-
subpath: 在使用 Git fetcher 时,将checkout代码仓库的树状文件结构的一部分。如果不设置subpath,也可以在设置S变量时指定使用git代码仓库的某个子目录。
-
unpack: 如果文件是存档格式,控制是否解压缩。默认操作是解压文件。=1是解压,=0是不解压。
SRCREV
12 Variables Glossary — The Yocto Project ® 4.3.999 documentation
用于构建软件包的源代码的修订版本。此变量仅适用于 Subversion、Git、Mercurial 和 Bazaar。如果你想构建一个固定的修订版本,又想避免每次 BitBake 解析你的配方时都在远程版本库中执行查询,你应该指定一个完整修订版本标识符的 SRCREV,而不仅仅是一个标签。
The revision of the source code used to build the package. This variable applies only when using Subversion, Git, Mercurial and Bazaar. If you want to build a fixed revision and you want to avoid performing a query on the remote repository every time BitBake parses your recipe, you should specify a SRCREV that is a full revision identifier and not just a tag.
S
12 Variables Glossary — The Yocto Project ® 4.3.999 documentation
已解压缩的配方要用的源代码,其所在构建目录中的位置。默认情况下,该目录为 ${WORKDIR}/${BPN}-${PV},其中 ${BPN} 是基本配方名称,${PV} 是配方版本。如果源代码压缩包将代码提取到 ${BPN}-${PV} 以外的目录,或者源代码是从 Git 或 Subversion 等 SCM 获取的,则必须在配方中设置 S,以便 OpenEmbedded 构建系统知道在哪里可以找到已解压的源代码。
The location in the Build Directory where unpacked recipe source code resides. By default, this directory is ${WORKDIR}/${BPN}-${PV}, where ${BPN} is the base recipe name and ${PV} is the recipe version. If the source tarball extracts the code to a directory named anything other than ${BPN}-${PV}, or if the source code is fetched from an SCM such as Git or Subversion, then you must set S in the recipe so that the OpenEmbedded build system knows where to find the unpacked source.
举例来说,假设源代码目录的顶级文件夹名为 poky,默认的编译目录为 poky/build。在这种情况下,构建系统用来保存名为db的配方的解压文件的工作目录如下:
As an example, assume a Source Directory top-level folder named poky and a default Build Directory at poky/build. In this case, the work directory the build system uses to keep the unpacked recipe for db is the following:
poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19
解压后的源代码位于 db-5.1.19 文件夹中。
下一个示例假设有一个 Git 仓库。默认情况下,Git 仓库会在 do_fetch 过程中克隆到 ${WORKDIR}/git。由于该路径与默认值 S 不同,因此必须特别设置,以便找到源代码:
The unpacked source code resides in the db-5.1.19 folder.
This next example assumes a Git repository. By default, Git repositories are cloned to ${WORKDIR}/git during do_fetch. Since this path is different from the default value of S, you must set it specifically so the source can be located:
SRC_URI = "git://path/to/repo.git;branch=main"
S = "${WORKDIR}/git"
FETCHERS
4 File Download Support — Bitbake dev documentation
4.3 Fetchers
如前所述,URL 前缀决定了 BitBake 使用哪个提取子模块。每个子模块可以支持不同的 URL 参数,下面将对此进行介绍。
As mentioned earlier, the URL prefix determines which fetcher submodule BitBake uses. Each submodule can support different URL parameters, which are described in the following sections.
4.3.1 Local file fetcher (file://) #本地文件提取器
该子模块处理以 file:// 开头的 URL。在 URL 中指定的文件名可以是文件的绝对路径,也可以是相对路径。如果文件名是相对路径,则使用 FILESPATH 变量的内容,与 PATH 用于查找可执行文件的方式相同。如果找不到文件,则假定在调用download()方法时,文件在 DL_DIR 中可用。
This submodule handles URLs that begin with file://. The filename you specify within the URL can be either an absolute or relative path to a file. If the filename is relative, the contents of the FILESPATH variable is used in the same way PATH is used to find executables. If the file cannot be found, it is assumed that it is available in DL_DIR by the time the download() method is called.
如果指定一个目录,则整个目录都会被解压缩。
下面是几个 URL 示例,第一个是相对 URL,第二个是绝对 URL:
If you specify a directory, the entire directory is unpacked.
Here are a couple of example URLs, the first relative and the second absolute:
SRC_URI = "file://relativefile.patch"
SRC_URI = "file:///Users/ich/very_important_software"
4.3.5 Git Fetcher (git://) #Git仓库提取器
这个提取子模块从 Git 源代码控制系统中取回代码。提取器的工作原理是在 GITDIR(通常是 DL_DIR/git2)中创建一个远程的裸克隆。然后从裸克隆中再clone到工作目录,也就是checkout一个特定的tree,解压到工作目录。这样做是为了尽量减少磁盘上的重复数据量,并使解包过程更快。使用的可执行文件可通过 FETCHCMD_git 设置。
This fetcher submodule fetches code from the Git source control system. The fetcher works by creating a bare clone of the remote into GITDIR, which is usually DL_DIR/git2. This bare clone is then cloned into the work directory during the unpack stage when a specific tree is checked out. This is done using alternates and by reference to minimize the amount of duplicate data on the disk and make the unpack process fast. The executable used can be set with FETCHCMD_git.
此提取器支持的参数如下:
-
“protocol”: The protocol used to fetch the files. The default is “git” when a hostname is set. If a hostname is not set, the Git protocol is “file”. You can also use “http”, “https”, “ssh” and “rsync”.
-
“nocheckout”: Tells the fetcher to not checkout source code when unpacking when set to “1”. Set this option for the URL where there is a custom routine to checkout code. The default is “0”.
-
“rebaseable”: Indicates that the upstream Git repository can be rebased. You should set this parameter to “1” if revisions can become detached from branches. In this case, the source mirror tarball is done per revision, which has a loss of efficiency. Rebasing the upstream Git repository could cause the current revision to disappear from the upstream repository. This option reminds the fetcher to preserve the local cache carefully for future use. The default value for this parameter is “0”.
-
“nobranch”: Tells the fetcher to not check the SHA validation for the branch when set to “1”. The default is “0”. Set this option for the recipe that refers to the commit that is valid for any namespace (branch, tag, …) instead of the branch.
-
“bareclone”: Tells the fetcher to clone a bare clone into the destination directory without checking out a working tree. Only the raw Git metadata is provided. This parameter implies the “nocheckout” parameter as well.
-
“branch”: The branch(es) of the Git tree to clone. Unless “nobranch” is set to “1”, this is a mandatory parameter. The number of branch parameters must match the number of name parameters.
-
“rev”: The revision to use for the checkout. The default is “master”.
-
“tag”: Specifies a tag to use for the checkout. To correctly resolve tags, BitBake must access the network. For that reason, tags are often not used. As far as Git is concerned, the “tag” parameter behaves effectively the same as the “rev” parameter.
-
“subpath”: Limits the checkout to a specific subpath of the tree. By default, the whole tree is checked out.
-
“destsuffix”: The name of the path in which to place the checkout. By default, the path is git/.
-
“usehead”: Enables local git:// URLs to use the current branch HEAD as the revision for use with AUTOREV. The “usehead” parameter implies no branch and only works when the transfer protocol is file://.
注意:
在使用protocol参数时,当协议为 "ssh "时,SRC_URI中的预期URL 与通常传递给 git clone 命令的不同,后者是由 Git 服务器提供的URL来提取内容的。例如,通过 SSH 克隆时,GitLab 服务器返回的 mesa 的 URL 是 git@gitlab.freedesktop.org:mesa/mesa.git,但 SRC_URI 中的预期 URL 却如下:
SRC_URI = "git://git@gitlab.freedesktop.org/mesa/mesa.git;branch=main;protocol=ssh;..."
注意项目路径前的:字符改为/。
一些URL的例子如下:
SRC_URI = "git://github.com/fronteed/icheck.git;protocol=https;branch=${PV};tag=${PV}"
SRC_URI = "git://github.com/asciidoc/asciidoc-py;protocol=https;branch=main"
SRC_URI = "git://git@gitlab.freedesktop.org/mesa/mesa.git;branch=main;protocol=ssh;..."
当使用 git 作为软件主源代码的获取器时,应相应地设置 S:
S = "${WORKDIR}/git"
注意:
不支持在 git:// urls 中直接指定密码。原因有几个: SRC_URI 通常会被写入日志或其他地方,这很容易泄露密码;而且不删除密码的话,会导致元数据共享太容易。可以使用 SSH 密钥、~/.netrc 和 ~/.ssh/config 文件作为替代。
在 git fetcher 中使用标签可能会导致令人惊讶的行为。Bitbake 需要将标签解析到特定版本,为此必须连接并使用上游版本库(upstream repository)。这是因为标签(tag)指向的版本(revision)可能会发生变化,我们曾在著名的公共软件源中看到过这种情况。这可能意味着网络连接比预期的要多得多,而且每次构建时都要重新解析配方。源镜像(Source mirrors)也会被绕过,因为上游版本库是准确解析版本的唯一真实来源。出于这些原因,虽然提取器可以支持标签,但我们还是建议在配方中具体指定修订版本。
联合起来使用
通过上面的介绍,在bb文件中通过这些变量来获取需要构建的目标文件的源代码。
比如,项目里通常会使用git协议来获取源代码。而在本地调试时,可以修改称本地路径。
第一种:
SRC_URI = "git://git@github.com:7999/platform/projectname.git;protocol=ssh;nobranch=1"
SRCREV = "c3f56703e58af33dbf808f903de694bcde3269cd"
S = "${WORKDIR}/git"
第二种:
SRC_URI = "file://${TOPDIR}/../../projectname"
S = "${WORKDIR}/${TOPDIR}/../../projectname"
这里用到了${TOPDIR}。
(结束)
相关文章:

Yocto - bb脚本中使用的SRC_URI、SRCREV和S
我们遇到的各种自己不了解的技术或产品时,都需要阅读用户手册。用户手册里的内容很多时,除了由目录组织文档结构外,通常还有有一个词汇表,一般作为附录放在文档最后。 通过这个按照字母排序的词汇表,可以在对整个文档还…...

LeetCode | 965. 单值二叉树
LeetCode | 965. 单值二叉树 OJ链接 首先判断树为不为空,为空直接true然后判断左子树的val,和根的val相不相同再判断右子树的val,和根的val相不相同最后递归左子树和右子树 bool isUnivalTree(struct TreeNode* root) {if(root NULL)retur…...

YOLOv8创新魔改教程(一)如何进行模块创新
YOLOv8创新魔改教程(一)如何进行模块创新 YOLOv8创新魔改教程 本人研一,最近好多朋友问我要如何修改模型创新模块,就想着不如直接开个专栏歇一歇文章,也算是对自己学习的总结,本专栏以YOLOv8为例…...

postgresql-shared_buffers参数详解
shared_buffers 是 PostgreSQL 中一个非常关键的参数,用于配置服务器使用的共享内存缓冲区的大小。这些缓冲区用于存储数据页,以便数据库可以更快地访问磁盘上的数据。 这个参数在 PostgreSQL 的性能方面有着重要的影响。增加 shared_buffers 可以提高数…...

windows10 Arcgis pro3.0-3.1
我先安装的arcgis pro3.0,然后下载的3.1。 3.0里面有pro、help、sdk、还有一些补丁包根据个人情况安装。 3.1里面也是这些。 下载 正版试用最新的 ArcGIS Pro 21 天教程,仅需五步!-地理信息云 (giscloud.com.cn) 1、安装windowsdesktop-…...

Apache Airflow (十四) :Airflow分布式集群搭建及测试
🏡 个人主页:IT贫道_大数据OLAP体系技术栈,Apache Doris,Clickhouse 技术-CSDN博客 🚩 私聊博主:加入大数据技术讨论群聊,获取更多大数据资料。 🔔 博主个人B栈地址:豹哥教你大数据的个人空间-豹…...

解决VSCode按住Ctrl(or Command) 点击鼠标左键不跳转的问题(不能Go to Definition)
问题出现 往往在升级了VSCode以后,就会出现按住Ctrl(or Command) 点击鼠标左键不跳转的问题,这个问题很常见。 解决办法 1 进入VScode的首选项,选择设置 2 输入Go to definition,找到如下两个设置&#…...

使用DrlParser 检测drl文件是否有错误
为避免运行时候错误,drools 7 可以使用DrlParser预先检测 drl文件是否正常。 parser 过程通常不会返回异常ruleDescr parser.parse(resource); 为空代表有异常 具体测试代码如下: public class DrlParserTest {public static void main(String[] arg…...

ArcGIS中基于人口数据计算人口密度的方法
文章目录 一、密度分析原理二、点密度分析三、线密度分析四、核密度分析一、密度分析原理 密度分析是指根据输入的要素数据集计算整个区域的数据聚集状况,从而产生一个联系的密度表面。通过密度计算,将每个采样点的值散步到整个研究区域,并获得输出栅格中每个像元的密度值。…...

在CentOS 8.2中安装Percona Xtrabackup 8.0.x备份MySql
添加Percona软件库: yum install https://repo.percona.com/yum/percona-release-latest.noarch.rpm 安装Percona Xtrabackup 8.0.x: yum install percona-xtrabackup-80 确认安装完成后,您可以使用以下命令验证Percona Xtrabackup的安装…...

javascript中的正则表达式的相关知识积累
01-javascript中的正则表达式用符号/作为正则表达式的开始符和结束符 javascript中的正则表达式用符号/作为正则表达式的开始符和结束符。 即javascript的正则表达式如下所示: /正则表达式/02-^:匹配字符串的开始 ^: 该符号表示匹配字符串的开始。这个…...

51k+ Star!动画图解、一键运行的数据结构与算法教程!
大家好,我是 Java陈序员。 我们都知道,《数据结构与算法》 —— 是程序员的必修课。 无论是使用什么编程语音,亦或者是前后端开发,都需要修好《数据结构与算法》这门课! 在各个互联网大产的面试中,对数据…...

4.7 矩阵的转置运算(C语言实现)
【题目描述】用键盘从终端输入一个3行4列的矩阵,编写一个函数对该矩阵进行转置操作。 【题目分析】矩阵的转置运算是线性代数中的一个基本运算。显然,一个m行n列的矩阵经过转置运算后就变成了一个n行m列的矩阵。这个问题的解决关键是要解决两个问题&…...

快速掌握Pyqt5的9种显示控件
Pyqt5相关文章: 快速掌握Pyqt5的三种主窗口 快速掌握Pyqt5的2种弹簧 快速掌握Pyqt5的5种布局 快速弄懂Pyqt5的5种项目视图(Item View) 快速弄懂Pyqt5的4种项目部件(Item Widget) 快速掌握Pyqt5的6种按钮 快速掌握Pyqt5的10种容器&…...

【WP】Geek Challenge 2023 web 部分wp
EzHttp http协议基础题 unsign 简单反序列化题 n00b_Upload 很简单的文件上传,上传1.php,抓包,发现php内容被过滤了,改为<? eval($_POST[‘a’]);?>,上传成功,命令执行读取就好了 easy_php …...

Elasticsearch:为现代搜索工作流程和生成式人工智能应用程序铺平道路
作者:Matt Riley Elastic 的创新投资支持开放的生态系统和更简单的开发者体验。 在本博客中,我们希望分享 Elastic 为简化你构建 AI 应用程序的体验而进行的投资。 我们知道,开发人员必须在当今快速发展的人工智能环境中保持灵活性。 然而&a…...

【WinForm.NET开发】Windows窗体开发概述
本文内容 介绍为什么要从 .NET Framework 迁移生成丰富的交互式用户界面显示和操纵数据将应用部署到客户端计算机 Windows 窗体是一个可创建适用于 Windows 的丰富桌面客户端应用的 UI 框架。 Windows 窗体开发平台支持广泛的应用开发功能,包括控件、图形、数据绑…...

WPF 简单绘制矩形
Canvas 画矩形: view和viewModel 绑定一起才显示移动轨迹(可以定义一个string 看是否绑定属性的路径是正确的) 前台(绑定事件和显示移动的线): <Canvas Name"canvas" Background"#01FF…...

crui_lvgl 一个LVGL的DSL辅助工具的设想
设想 Target以LVGL为目标,语法以CSS为Reference。 CSS 规范 略 CSS规范最强大的属于CSS自身的属性很多,可以通过class和伪属性选择器对UI进行直接控制。 QML规范 ApplicationWindow {visible: truewidth: Constants.widthheight: Constants.height…...

公共部门生成式人工智能的未来
作者:Dave Erickson 最近,我与 IDC Government Insights 研究副总裁阿德莱德奥布莱恩 (Adelaide O’Brien) 坐下来讨论了全球公共部门生成式人工智能的当前和未来状况。 完整的对话可以按需查看,但我也想强调讨论中的一些要点。 我们的目标是…...

【报名】2023产业区块链生态日暨 FISCO BCOS 开源六周年生态大会
作为2023深圳国际金融科技节系列活动之一,由深圳市地方金融监督管理局指导,微众银行、金链盟主办的“2023产业区块链生态日暨FISCO BCOS开源六周年生态大会”将于12月15日下午14:00在深圳举办。 今年的盛会将进一步升级,以“FISCO BCOS和TA的…...

MySQL之性能分析和系统调优
MySQL之性能分析和系统调优 性能分析 查看执行计划 EXPLAIN EXPLAIN作为MySQL的性能分析神器,可以用来分析SQL执行计划,需要理解分析结果可以帮助我们优化SQL explain select … from … [where ...]TABLE 表名 查询的每一行记录都对于着一张表 id 该…...

时间复杂度为 O(n^2) 的排序算法 | 京东物流技术团队
对于小规模数据,我们可以选用时间复杂度为 O(n2) 的排序算法。因为时间复杂度并不代表实际代码的执行时间,它省去了低阶、系数和常数,仅代表的增长趋势,所以在小规模数据情况下, O(n2) 的排序算法可能会比 O(nlogn) 的…...

关于前端学习的思考-内边距、边框和外边距
从最简单的盒子开始思考 先把实际应用摆出来: margin:居中,控制边距。 padding:控制边距。 border:制作三角形。 盒子分为内容盒子,内边距盒子,边框和外边距。 如果想让块级元素居中&#…...

【linux】/etc/security/limits.conf配置文件详解、为什么限制、常见限制查看操作
文章目录 一. limits.conf常见配置项详解二. 文件描述符(file descriptor)简述三. 为什么限制四. 相关操作1. 展示当前资源限制2. 查看系统当前打开的文件描述符数量3. 查看某个进程打开的文件描述符数量4. 各进程占用的文件描述符 /etc/security/limits…...

Windows系统下更新后自带的画图软件出现马赛克bug
一.bug的样子🍗 在使用橡皮后,原来写的内容会变成马赛克。而我们希望它是纯白色的。 二.解决方法🍗 第一步 第二步 第三步 三. 解决后的效果🍗 用橡皮擦随便擦都不会出现马赛克了。 更新过后,想用win自带的画图软件会出…...

[HTML]Web前端开发技术6(HTML5、CSS3、JavaScript )DIV与SPAN,盒模型,Overflow——喵喵画网页
希望你开心,希望你健康,希望你幸福,希望你点赞! 最后的最后,关注喵,关注喵,关注喵,佬佬会看到更多有趣的博客哦!!! 喵喵喵,你对我真的…...

SQL练习
建数据库: mysql> create database worker; Query OK, 1 row affected (0.00 sec) mysql> CREATE TABLE worker (-> 部门号 int(11) NOT NULL,-> 职工号 int(11) NOT NULL,-> 工作时间 date NOT NULL,-> 工资 float(8,2) NOT NULL,-> 政治面貌…...

创始人于东来:胖东来员工不想上班,请假不允许不批假!
12月2日早晨,一则关于“胖东来员工不想上班请假不允许不批假”的新闻登上了热搜,引起了广泛关注。熟悉胖东来的网友们可能知道,这并不是这家企业第一次成为热搜的焦点。据白鹿视频12月1日报道,11月25日,河南许昌的胖东…...

C++学习之路(十五)C++ 用Qt5实现一个工具箱(增加16进制颜色码转换和屏幕颜色提取功能)- 示例代码拆分讲解
上篇文章,我们用 Qt5 实现了在小工具箱中添加了《Base64图片编码预览功能》功能。为了继续丰富我们的工具箱,今天我们就再增加两个平时经常用到的功能吧,就是「 16进制颜色码转RGB文本 」和 「屏幕颜色提取」功能。下面我们就来看看如何来规划…...