Remove large unused LVGL files (demos/tests/docs/examples) and build artifacts from tracking

This commit is contained in:
2026-08-31 15:29:13 +08:00
parent 2d2774124e
commit fc57cd831d
24 changed files with 32 additions and 2939 deletions
-27
View File
@@ -1,27 +0,0 @@
cmake_minimum_required(VERSION 3.12)
project (lv_emscripten)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -s USE_SDL=2")
include_directories(${PROJECT_SOURCE_DIR})
add_subdirectory(lvgl)
file(GLOB MY_SOURCES "./*.c")
set(SOURCES ${MY_SOURCES})
add_executable(index ${SOURCES} ${INCLUDES})
if(NOT LVGL_CHOSEN_DEMO)
set(LVGL_CHOSEN_DEMO lv_demo_widgets)
endif()
set_source_files_properties(main.c PROPERTIES COMPILE_FLAGS -DCHOSEN_DEMO=${LVGL_CHOSEN_DEMO})
set(CMAKE_EXECUTABLE_SUFFIX ".html")
target_link_libraries(index
lvgl
lvgl_examples
lvgl_demos
lvgl_thorvg
SDL2
)
set_target_properties(index PROPERTIES LINK_FLAGS "--shell-file ${PROJECT_SOURCE_DIR}/lvgl/.devcontainer/lvgl_shell.html -s SINGLE_FILE=1")
-5
View File
@@ -1,5 +0,0 @@
cd build
emcmake cmake ..
emmake make -j$(nproc)
echo "Built succesfully, opening index.html"
code index.html
@@ -1,17 +0,0 @@
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**",
"/usr/local/emsdk/upstream/emscripten/cache/sysroot/include/"
],
"defines": [],
"compilerPath": "/usr/bin/clang",
"cStandard": "c17",
"cppStandard": "c++14",
"intelliSenseMode": "linux-clang-x64"
}
],
"version": 4
}
-107
View File
@@ -1,107 +0,0 @@
/**
* @file main
*
*/
/*********************
* INCLUDES
*********************/
#include <stdlib.h>
#include <unistd.h>
#define SDL_MAIN_HANDLED /*To fix SDL's "undefined reference to WinMain" issue*/
#include <SDL2/SDL.h>
#include <emscripten.h>
#include "lvgl/lvgl.h"
#include "lvgl/demos/lv_demos.h"
#include "lvgl/examples/lv_examples.h"
/*********************
* DEFINES
*********************/
/*On OSX SDL needs different handling*/
#if defined(__APPLE__) && defined(TARGET_OS_MAC)
# if __APPLE__ && TARGET_OS_MAC
#define SDL_APPLE
# endif
#endif
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
static void hal_init(void);
static int tick_thread(void * data);
static void memory_monitor(lv_timer_t * param);
/**********************
* STATIC VARIABLES
**********************/
static lv_display_t * disp1;
int monitor_hor_res, monitor_ver_res;
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
void do_loop(void *arg);
/* Allows disabling CHOSEN_DEMO */
static void lv_example_noop(void) {
}
int main(int argc, char ** argv)
{
monitor_hor_res = 800;
monitor_ver_res = 480;
printf("Starting with screen resolution of %dx%d px\n", monitor_hor_res, monitor_ver_res);
/*Initialize LittlevGL*/
lv_init();
/*Initialize the HAL (display, input devices, tick) for LittlevGL*/
hal_init();
lv_demo_widgets();
emscripten_set_main_loop_arg(do_loop, NULL, -1, true);
}
void do_loop(void *arg)
{
/* Periodically call the lv_timer handler.
* It could be done in a timer interrupt or an OS task too.*/
lv_timer_handler();
}
/**********************
* STATIC FUNCTIONS
**********************/
/**
* Initialize the Hardware Abstraction Layer (HAL) for the Littlev graphics library
*/
static void hal_init(void)
{
lv_display_t * disp = lv_sdl_window_create(monitor_hor_res, monitor_ver_res);
lv_group_t * g = lv_group_create();
lv_group_set_default(g);
lv_sdl_mouse_create();
lv_indev_t * mousewheel = lv_sdl_mousewheel_create();
lv_indev_set_group(mousewheel, lv_group_get_default());
lv_indev_t * keyboard = lv_sdl_keyboard_create();
lv_indev_set_group(keyboard, lv_group_get_default());
}
-5
View File
@@ -1,5 +0,0 @@
{
"files.associations": {
"sdl.h": "c"
}
}
-28
View File
@@ -1,28 +0,0 @@
{
"image": "mcr.microsoft.com/devcontainers/universal:2",
"features": {
"ghcr.io/ebaskoro/devcontainer-features/emscripten:1": {}
},
"postCreateCommand": "chmod +x /workspace/lvgl_app/lvgl/.devcontainer/setup.sh; /workspace/lvgl_app/lvgl/.devcontainer/setup.sh",
"postStartCommand": ". /usr/local/emsdk/emsdk_env.sh;",
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
//"searKing.preview-vscode"
"analytic-signal.preview-html"
]
}
},
"hostRequirements": {
"cpus": 4
},
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace/lvgl_app/lvgl,type=bind",
"workspaceFolder": "/workspace/lvgl_app"
}
-70
View File
@@ -1,70 +0,0 @@
LV_COLOR_DEPTH 32
LV_MEM_SIZE (1024 * 1024)
LV_DRAW_THREAD_STACK_SIZE (64 * 1024)
LV_USE_MATRIX 1
LV_USE_FLOAT 1
LV_USE_LOTTIE 1
LV_USE_DRAW_SW_COMPLEX_GRADIENTS 1
LV_OBJ_STYLE_CACHE 1
LV_USE_LOG 1
LV_LOG_PRINTF 1
LV_USE_PERF_MONITOR 1
LV_USE_SYSMON 1
LV_USE_ASSERT_MEM_INTEGRITY 1
LV_USE_ASSERT_OBJ 1
LV_USE_ASSERT_STYLE 1
LV_FONT_MONTSERRAT_12 1
LV_FONT_MONTSERRAT_14 1
LV_FONT_MONTSERRAT_16 1
LV_FONT_MONTSERRAT_18 1
LV_FONT_MONTSERRAT_20 1
LV_FONT_MONTSERRAT_22 1
LV_FONT_MONTSERRAT_24 1
LV_FONT_MONTSERRAT_26 1
LV_FONT_MONTSERRAT_28 1
LV_FONT_MONTSERRAT_30 1
LV_FONT_MONTSERRAT_32 1
LV_FONT_MONTSERRAT_34 1
LV_FONT_MONTSERRAT_36 1
LV_FONT_MONTSERRAT_38 1
LV_FONT_MONTSERRAT_40 1
LV_FONT_MONTSERRAT_42 1
LV_FONT_MONTSERRAT_44 1
LV_FONT_MONTSERRAT_46 1
LV_FONT_MONTSERRAT_48 1
LV_FONT_MONTSERRAT_28_COMPRESSED 1
LV_FONT_DEJAVU_16_PERSIAN_HEBREW 1
LV_FONT_SOURCE_HAN_SANS_SC_16_CJK 1
LV_FONT_UNSCII_8 1
LV_USE_IMGFONT 1
LV_USE_FS_STDIO 1
LV_FS_STDIO_LETTER 'A'
LV_USE_FS_MEMFS 1
LV_FS_MEMFS_LETTER 'M'
LV_USE_THORVG_INTERNAL 1
LV_USE_LZ4_INTERNAL 1
LV_USE_VECTOR_GRAPHIC 1
LV_USE_TINY_TTF 1
LV_USE_BARCODE 1
LV_USE_QRCODE 1
LV_USE_RLE 1
LV_BIN_DECODER_RAM_LOAD 1
LV_USE_TJPGD 1
LV_USE_BMP 1
LV_USE_LODEPNG 1
LV_USE_SDL 1
LV_USE_DEMO_WIDGETS 1
LV_USE_DEMO_KEYPAD_AND_ENCODER 1
LV_USE_DEMO_BENCHMARK 1
LV_USE_DEMO_RENDER 1
LV_USE_DEMO_STRESS 1
LV_USE_DEMO_MUSIC 1
LV_USE_DEMO_FLEX_LAYOUT 1
LV_USE_DEMO_MULTILANG 1
LV_USE_DEMO_TRANSFORM 1
LV_USE_DEMO_SCROLL 1
-85
View File
@@ -1,85 +0,0 @@
<html>
<head>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no'/>
<style type="text/css">
html, body {
margin: 0;
width: 100%;
height: 100%;
min-width: 100%;
min-height: 100%;
}
body {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.git-commit-info {
font-family: Consolas, 'Courier New', Courier, monospace;
background-color: #f1f1f1;
padding: 2px;
text-align: left;
}
#git-hash {
text-align: center;
}
#output {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<div id="git-hash"></div>
<p id="output">
<canvas id="canvas"></canvas>
</p>
<script src="gitrev.js"></script>
<script>
var siteURL = new URL(window.location.href);
var w = siteURL.searchParams.get("w") || "800";
var h = siteURL.searchParams.get("h") || "480";
var canvas = document.getElementById('canvas');
canvas.setAttribute("width", w);
canvas.setAttribute("height", h);
console.log("Requested " + w + "x" + h + " px");
var Module = {
print: function(text) {
console.log(text);
},
printErr: function(text) {
console.error(text);
},
canvas: (function() {
return canvas;
})(),
arguments: [ siteURL.searchParams.get("w") || "800", siteURL.searchParams.get("h") || "480", siteURL.searchParams.get("example") ?? "default" ]
};
if(typeof window.git_hash != 'undefined') {
var gitHashDiv = document.querySelector("#git-hash");
var gitLink = document.createElement("div");
var gitHashComponents = window.git_hash.split(" ").filter(component => component.trim().length > 0);
for(var i = 0; i < gitHashComponents.length; i++) {
console.log(gitHashComponents[i], gitHashComponents[i].length);
/* This is an extremely lazy way of checking for a Git hash, but it works */
if(gitHashComponents[i].length == 40) {
gitHashComponents[i] = `<a href="https://github.com/lvgl/${gitHashComponents[i+1]}/commit/${gitHashComponents[i]}">${gitHashComponents[i]}</a>`;
} else {
/* Repository name */
gitHashComponents[i] += "<br/>";
}
}
gitLink.classList.add("git-commit-info");
gitLink.innerHTML = gitHashComponents.join(" ");
gitHashDiv.textContent = "LVGL compiled to Emscripten. Git commit information:";
gitHashDiv.appendChild(gitLink);
}
window.addEventListener("click", () => window.focus());
</script>
{{{ SCRIPT }}}
</body>
</html>
-19
View File
@@ -1,19 +0,0 @@
#!/bin/sh
echo ". /usr/local/emsdk/emsdk_env.sh" >> /home/codespace/.bashrc
cd /workspace/lvgl_app
sudo chmod 777 .
mkdir build
mkdir vscode
cd lvgl/.devcontainer
cp __CMakeLists.txt__ ../../CMakeLists.txt
cp __main.c__ ../../main.c
cp __build_all.sh__ ../../build_all.sh
cp __c_cpp_properties.json__ ../../.vscode/c_cpp_properties.json
cp __settings.json__ ../../.vscode/settings.json
touch ../../lv_conf.h
../scripts/generate_lv_conf.py --template ../lv_conf_template.h --config ../../lv_conf.h
chmod +x ../../build_all.sh
-41
View File
@@ -1,41 +0,0 @@
cmake_minimum_required(VERSION 3.12.4)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
if(NOT ESP_PLATFORM)
project(lvgl LANGUAGES C HOMEPAGE_URL https://github.com/lvgl/lvgl)
if(NOT (CMAKE_C_COMPILER_ID STREQUAL "MSVC"))
enable_language(CXX ASM)
else()
enable_language(CXX)
endif()
endif()
set(LVGL_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR})
if(ESP_PLATFORM)
include(${CMAKE_CURRENT_LIST_DIR}/env_support/cmake/esp.cmake)
elseif(ZEPHYR_BASE)
include(${CMAKE_CURRENT_LIST_DIR}/env_support/cmake/zephyr.cmake)
elseif(MICROPY_DIR)
include(${CMAKE_CURRENT_LIST_DIR}/env_support/cmake/micropython.cmake)
else()
include(${CMAKE_CURRENT_LIST_DIR}/env_support/cmake/os_desktop.cmake)
endif()
#[[
unfortunately CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS does not work for global data.
for global data we still need decl specs.
Check out the docs to learn more about the limitations of CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
https://cmake.org/cmake/help/latest/prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS.html#prop_tgt:WINDOWS_EXPORT_ALL_SYMBOLS
For all compiled sources within the library (i.e. basically all lvgl files) we need to use dllexport.
For all compiled sources from outside the library (i.e. files which include lvgl headers) we need to use dllimport.
We can do this by using CMakes INTERFACE and PRIVATE keyword.
]]
if (MSVC)
target_compile_definitions(lvgl
INTERFACE LV_ATTRIBUTE_EXTERN_DATA=__declspec\(dllimport\)
PRIVATE LV_ATTRIBUTE_EXTERN_DATA=__declspec\(dllexport\)
)
endif()
-160
View File
@@ -1,160 +0,0 @@
{
"version": 3,
"configurePresets": [
{
"name": "_base",
"hidden": true,
"cacheVariables": {
}
},
{
"name": "windows-base",
"inherits": "_base",
"generator": "Visual Studio 17 2022",
"binaryDir": "${sourceDir}/build/${presetName}",
"installDir": "${sourceDir}/build/install/${presetName}",
"cacheVariables": {
"CMAKE_C_COMPILER": "cl.exe",
"CMAKE_CXX_COMPILER": "cl.exe",
"BUILD_SHARED_LIBS": "ON"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
},
"architecture": {
"value": "x64",
"strategy": "external"
}
},
{
"name": "linux-base",
"inherits": "_base",
"displayName": "Linux",
"description": "Setup WSL or native linux",
"generator": "Ninja Multi-Config",
"binaryDir": "${sourceDir}/build/${presetName}",
"installDir": "${sourceDir}/build/${presetName}",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
},
"vendor": {
"microsoft.com/VisualStudioRemoteSettings/CMake/1.0": {
"sourceDir": "$env{HOME}/.vs/$ms{projectDirName}"
}
},
"cacheVariables": {
"BUILD_SHARED_LIBS": "ON"
}
},
{
"name": "linux-kconfig",
"inherits": "linux-base",
"displayName": "Linux/Kconfig",
"description": "Setup WSL or native linux, using Kconfig",
"generator": "Ninja Multi-Config",
"binaryDir": "${sourceDir}/build/${presetName}",
"installDir": "${sourceDir}/build/${presetName}",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
},
"vendor": {
"microsoft.com/VisualStudioRemoteSettings/CMake/1.0": {
"sourceDir": "$env{HOME}/.vs/$ms{projectDirName}"
}
},
"cacheVariables": {
"BUILD_SHARED_LIBS": "ON",
"BUILD_LV_USE_KCONFIG": "ON"
}
},
{
"name": "windows-kconfig",
"inherits": "_base",
"generator": "Visual Studio 17 2022",
"binaryDir": "${sourceDir}/build/${presetName}",
"installDir": "${sourceDir}/build/install/${presetName}",
"cacheVariables": {
"CMAKE_C_COMPILER": "cl.exe",
"CMAKE_CXX_COMPILER": "cl.exe",
"BUILD_SHARED_LIBS": "ON",
"LV_BUILD_USE_KCONFIG": "ON"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
},
"architecture": {
"value": "x64",
"strategy": "external"
}
}
],
"buildPresets": [
{
"name": "_base",
"hidden": true,
"jobs": 12
},
{
"name": "windows-base_dbg",
"inherits": "_base",
"displayName": "Debug",
"configurePreset": "windows-base",
"configuration": "Debug"
},
{
"name": "windows-base_rel",
"inherits": "_base",
"displayName": "Release",
"configurePreset": "windows-base",
"configuration": "Release"
},
{
"name": "linux-base_dbg",
"inherits": "_base",
"displayName": "Debug",
"configurePreset": "linux-base",
"configuration": "Debug"
},
{
"name": "linux-base_rel",
"inherits": "_base",
"displayName": "Release",
"configurePreset": "linux-base",
"configuration": "Release"
}
],
"testPresets": [
{
"name": "windows-base_dbg",
"displayName": "Debug",
"configurePreset": "windows-base",
"configuration": "Debug"
},
{
"name": "windows-base_rel",
"displayName": "Release",
"configurePreset": "windows-base",
"configuration": "Release"
},
{
"name": "linux-base_dbg",
"displayName": "Debug",
"configurePreset": "linux-base",
"configuration": "Debug"
},
{
"name": "linux-base_rel",
"displayName": "Release",
"configurePreset": "linux-base",
"configuration": "Release"
}
]
}
-2205
View File
File diff suppressed because it is too large Load Diff
-11
View File
@@ -1,11 +0,0 @@
# RT-Thread building script for bridge
import os
from building import *
objs = []
cwd = GetCurrentDir()
objs = objs + SConscript(cwd + '/env_support/rt-thread/SConscript')
Return('objs')
-104
View File
@@ -1,104 +0,0 @@
# ESP-IDF component file for make based commands
COMPONENT_SRCDIRS := . \
src \
src/core \
src/extra \
src/font \
src/hal \
src/tick \
src/display \
src/indev \
src/osal \
src/misc \
src/misc/cache \
src/misc/cache/class \
src/misc/cache/instance \
src/draw \
src/draw/arm2d \
src/draw/nxp \
src/draw/sdl \
src/draw/stm32_dma2d \
src/draw/sw \
src/draw/sw/blend \
src/draw/swm342_dma2d \
src/others \
src/layouts \
src/layouts/flex \
src/layouts/grid \
src/libs \
src/libs/bin_decoder \
src/libs/bmp \
src/libs/ffmpeg \
src/libs/freetype \
src/libs/fsdrv \
src/libs/gif \
src/libs/libpng \
src/libs/lodepng \
src/libs/png \
src/libs/qrcode \
src/libs/rlottie \
src/libs/rle \
src/libs/sjgp \
src/libs/tiny_ttf \
src/libs/tjpgd \
src/libs/libjpeg_turbo \
src/others/fragment \
src/others/gridnav \
src/others/ime \
src/others/imgfont \
src/others/monkey \
src/others/msg \
src/others/observer \
src/others/snapshot \
src/others/sysmon \
src/others/test \
src/others/xml \
src/others/xml/parsers \
src/themes \
src/themes/basic \
src/themes/default \
src/themes/mono \
src/themes/simple \
src/widgets \
src/widgets/animimg \
src/widgets/arc \
src/widgets/bar \
src/widgets/button \
src/widgets/buttonmatrix \
src/widgets/calendar \
src/widgets/canvas \
src/widgets/chart \
src/widgets/checkbox \
src/widgets/colorwheel \
src/widgets/dropdown \
src/widgets/image \
src/widgets/imgbtn \
src/widgets/keyboard \
src/widgets/label \
src/widgets/led \
src/widgets/line \
src/widgets/list \
src/widgets/menu \
src/widgets/meter \
src/widgets/msgbox \
src/widgets/roller \
src/widgets/scale \
src/widgets/slider \
src/widgets/span \
src/widgets/spinbox \
src/widgets/spinner \
src/widgets/switch \
src/widgets/table \
src/widgets/tabview \
src/widgets/textarea \
src/widgets/tileview \
src/widgets/win \
src/stdlib \
src/stdlib/builtin
ifeq ($(CONFIG_LV_USE_THORVG_INTERNAL),y)
COMPONENT_SRCDIRS += src/libs/thorvg
endif
COMPONENT_ADD_INCLUDEDIRS := $(COMPONENT_SRCDIRS) .
-5
View File
@@ -1,5 +0,0 @@
description: LVGL - Light and Versatile Graphics Library
url: https://lvgl.io/
repository: https://github.com/lvgl/lvgl.git
documentation: https://docs.lvgl.io/
issues: https://github.com/lvgl/lvgl/issues
-17
View File
@@ -1,17 +0,0 @@
{
"name": "lvgl",
"version": "9.3.0",
"keywords": "graphics, gui, embedded, tft, lvgl",
"description": "Graphics library to create embedded GUI with easy-to-use graphical elements, beautiful visual effects and low memory footprint. It offers anti-aliasing, opacity, and animations using only one frame buffer.",
"repository": {
"type": "git",
"url": "https://github.com/lvgl/lvgl.git"
},
"build": {
"includeDir": "."
},
"license": "MIT",
"homepage": "https://lvgl.io",
"frameworks": "*",
"platforms": "*"
}
-10
View File
@@ -1,10 +0,0 @@
name=lvgl
version=9.3.0
author=kisvegabor
maintainer=kisvegabor,embeddedt,pete-pjb
sentence=Full-featured Graphics Library for Embedded Systems
paragraph=Powerful and easy-to-use embedded GUI with many widgets, advanced visual effects (opacity, antialiasing, animations) and low memory requirements (16K RAM, 64K Flash).
category=Display
url=https://lvgl.io
architectures=*
includes=lvgl.h
-12
View File
@@ -1,12 +0,0 @@
LVGL_PATH ?= ${shell pwd}/lvgl
ASRCS += $(shell find $(LVGL_PATH)/src -type f -name '*.S')
CSRCS += $(shell find $(LVGL_PATH)/src -type f -name '*.c')
CSRCS += $(shell find $(LVGL_PATH)/demos -type f -name '*.c')
CSRCS += $(shell find $(LVGL_PATH)/examples -type f -name '*.c')
CXXEXT := .cpp
CXXSRCS += $(shell find $(LVGL_PATH)/src -type f -name '*${CXXEXT}')
AFLAGS += "-I$(LVGL_PATH)"
CFLAGS += "-I$(LVGL_PATH)"
CXXFLAGS += "-I$(LVGL_PATH)"
-10
View File
@@ -1,10 +0,0 @@
prefix="@CMAKE_INSTALL_PREFIX@"
includedir="${prefix}/@INC_INSTALL_DIR@"
libdir=${prefix}/lib
Name: lvgl
Description: Light and Versatile Graphics Library
URL: https://lvgl.io/
Version: @LVGL_VERSION@
Cflags: -I${includedir}
Libs: -L${libdir} -llvgl