LVGL (Light and Versatile Graphics Library) is a free and open-source graphics library providing everything you need to create embedded GUI with easy-to-use graphical elements, beautiful visual effects and a low memory footprint.
LVGL是非常好用的gui,但它没有桌面PC端的布局UI工具,在没有板子上可跑程序的情况下,搭建一个windows的环境就尤为重要,话不多说,直接开整。
(因LVGL代码在不停的更新迭代,所以环境搭建也会不定期更新!)
一、代码准备与下载:
因一些同学github仓下载代码会出现下载不全以及失败的问题,所以我们使用将github代码克隆到gitee仓的方法,从gitee库下载代码。
- 准备gitee仓库代码,新建仓库
- 点击导入
- 将https://github.com/lvgl/lv_sim_visual_studio.git 复制到此处,点击导入
- 在你自己的gitee仓就会有 lv_sim_visual_studio, 使用下面的命令,下载到你本地
lv_sim_visual_studio:LVGL PC Simulator using Visual Studio
git clone --recurse-submodule https://gitee.com/wang-lao-ji/lv_sim_visual_studio.git
(ps: https://gitee.com/wang-lao-ji/lv_sim_visual_studio.git 需要替换成你自己库的git)
二、 运行VS2019
- 使用vs2019打开 .sln文件
- 选择x64,点击 本地Windows调试器
这样,LVGL–Windows环境就搭建好了,快乐的开启你的lvgl之路吧。
2022.0707
由于lv_sim_visual_studio库拉下来的代码中 lvgl、lv_drivers、freetype目录为空,所以需要将这三个库下载下来复制到相应的目录中即可
https://github.com/lvgl/lvgl
https://github.com/lvgl/lv_drivers