mirror of
https://github.com/lvgl/lvgl.git
synced 2026-08-18 02:38:01 +08:00
Arduino Lint / lint (push) Canceled after 0s
Build Examples with C++ Compiler / build-examples (push) Canceled after 0s
MicroPython CI / Build esp32 port (push) Canceled after 0s
MicroPython CI / Build rp2 port (push) Canceled after 0s
MicroPython CI / Build stm32 port (push) Canceled after 0s
MicroPython CI / Build unix port (push) Canceled after 0s
C/C++ CI / Build OPTIONS_16BIT - Ubuntu (push) Canceled after 0s
C/C++ CI / Build OPTIONS_24BIT - Ubuntu (push) Canceled after 0s
C/C++ CI / Build OPTIONS_FULL_32BIT - Ubuntu (push) Canceled after 0s
C/C++ CI / Build OPTIONS_NORMAL_8BIT - Ubuntu (push) Canceled after 0s
C/C++ CI / Build OPTIONS_SDL - Ubuntu (push) Canceled after 0s
C/C++ CI / Build OPTIONS_16BIT - cl - Windows (push) Canceled after 0s
C/C++ CI / Build OPTIONS_16BIT - gcc - Windows (push) Canceled after 0s
C/C++ CI / Build OPTIONS_24BIT - cl - Windows (push) Canceled after 0s
C/C++ CI / Build OPTIONS_24BIT - gcc - Windows (push) Canceled after 0s
C/C++ CI / Build OPTIONS_FULL_32BIT - cl - Windows (push) Canceled after 0s
C/C++ CI / Build OPTIONS_FULL_32BIT - gcc - Windows (push) Canceled after 0s
C/C++ CI / Build ESP IDF ESP32S3 (push) Canceled after 0s
C/C++ CI / Run tests with 32bit build (push) Canceled after 0s
C/C++ CI / Run tests with 64bit build (push) Canceled after 0s
BOM Check / bom-check (push) Canceled after 0s
Verify GDB constants are up-to-date / verify-gdb-consts (push) Canceled after 0s
Verify the widget property name / verify-property-name (push) Canceled after 0s
Verify code formatting / verify-formatting (push) Canceled after 0s
Compare file templates with file names / template-check (push) Canceled after 0s
Code Generation / Code Generation (push) Canceled after 0s
Build Docs / build-and-deploy (push) Canceled after 0s
Build .deb packages / build (push) Canceled after 0s
Validate pkg-config and CMake config / cmake (linux) (push) Canceled after 0s
Validate pkg-config and CMake config / pkgconfig (linux) (push) Canceled after 0s
Validate pkg-config and CMake config / cmake (linux-3d) (push) Canceled after 0s
Validate pkg-config and CMake config / pkgconfig (linux-3d) (push) Canceled after 0s
Test API JSON generator / Test API JSON (push) Canceled after 0s
Install LVGL using CMake / build-examples (private) (push) Canceled after 0s
Install LVGL using CMake / build-examples (public) (push) Canceled after 0s
Check Makefile / Build using Makefile (push) Canceled after 0s
Check Makefile for UEFI / Build using Makefile for UEFI (push) Canceled after 0s
Emulated Performance Test / ARM Emulated Benchmark - Script Check (scripts/perf/tests/benchmark_results_comment/test.sh) (push) Canceled after 0s
Emulated Performance Test / ARM Emulated Benchmark - Script Check (scripts/perf/tests/filter_docker_logs/test.sh) (push) Canceled after 0s
Emulated Performance Test / ARM Emulated Benchmark - Script Check (scripts/perf/tests/serialize_results/test.sh) (push) Canceled after 0s
Hardware Performance Test / Hardware Performance Benchmark (push) Canceled after 0s
Hardware Performance Test / HW Benchmark - Save PR Number (push) Canceled after 0s
Performance Tests CI / Perf Tests OPTIONS_TEST_PERF_32B - Ubuntu (push) Canceled after 0s
Performance Tests CI / Perf Tests OPTIONS_TEST_PERF_64B - Ubuntu (push) Canceled after 0s
Port repo release update / run-release-branch-updater (push) Canceled after 0s
Static Checks / Static Checks (push) Canceled after 0s
Verify Font License / verify-font-license (push) Canceled after 0s
Verify Kconfig / verify-kconfig (push) Canceled after 0s
Emulated Performance Test / ARM Emulated Benchmark 32b - lv_conf_perf32b (push) Skipped
Emulated Performance Test / ARM Emulated Benchmark 64b - lv_conf_perf64b (push) Skipped
Emulated Performance Test / ARM Emulated Benchmark - Save PR Number (push) Skipped
64 lines
1.6 KiB
Python
64 lines
1.6 KiB
Python
#!/usr/bin/env python3
|
|
|
|
# Expands the configuration with pcpp, a C preprocessor written in Python
|
|
# Needed for the compilers that can't emit their #define directives like MSVC
|
|
|
|
import shutil
|
|
import subprocess
|
|
|
|
NAME = "pcpp"
|
|
|
|
|
|
def build_args(input_file, output_file, include_dirs, defs):
|
|
"""
|
|
--passthru-defines
|
|
keep the #define directives in the output instead of consuming them
|
|
--line-directive=
|
|
omit the linemarkers
|
|
"""
|
|
args = ["-o", output_file, "--passthru-defines", "--line-directive="]
|
|
|
|
for include_path in include_dirs:
|
|
args.append(f"-I{include_path}")
|
|
|
|
for definition in defs:
|
|
args.append(f"-D{definition}")
|
|
|
|
args.append(input_file)
|
|
|
|
return args
|
|
|
|
|
|
def import_pcpp():
|
|
try:
|
|
import pcpp
|
|
|
|
return pcpp
|
|
|
|
except ImportError:
|
|
return None
|
|
|
|
|
|
def is_available():
|
|
return import_pcpp() is not None or shutil.which("pcpp") is not None
|
|
|
|
|
|
def preprocess(input_file, output_file, include_dirs, defs):
|
|
args = build_args(input_file, output_file, include_dirs, defs)
|
|
|
|
module = import_pcpp()
|
|
if module is not None:
|
|
# argv[0] is the program name, pcpp expects it to be present
|
|
preprocessor = module.CmdPreprocessor(["pcpp"] + args)
|
|
if preprocessor.return_code:
|
|
raise RuntimeError(
|
|
f"pcpp failed with return code: {preprocessor.return_code}"
|
|
)
|
|
return
|
|
|
|
executable = shutil.which("pcpp")
|
|
if executable is None:
|
|
raise RuntimeError("pcpp is not installed")
|
|
|
|
subprocess.run([executable] + args, check=True)
|