mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-27 20:57:01 +08:00
chore(lvconf_gen): generate empty lv_conf.h if it doesn't exist (#8885)
This commit is contained in:
@@ -17,7 +17,6 @@ jobs:
|
|||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
- name: Generate lv_conf.h
|
- name: Generate lv_conf.h
|
||||||
run: |
|
run: |
|
||||||
cp lv_conf_template.h lv_conf.h
|
|
||||||
python ./scripts/generate_lv_conf.py \
|
python ./scripts/generate_lv_conf.py \
|
||||||
--template lv_conf_template.h \
|
--template lv_conf_template.h \
|
||||||
--config lv_conf.h \
|
--config lv_conf.h \
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Generate lv_conf.h
|
- name: Generate lv_conf.h
|
||||||
run: |
|
run: |
|
||||||
cp lv_conf_template.h lv_conf.h
|
|
||||||
python3 ./scripts/generate_lv_conf.py \
|
python3 ./scripts/generate_lv_conf.py \
|
||||||
--template lv_conf_template.h \
|
--template lv_conf_template.h \
|
||||||
--config lv_conf.h \
|
--config lv_conf.h \
|
||||||
|
|||||||
@@ -58,7 +58,6 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Generate lv_conf.h
|
- name: Generate lv_conf.h
|
||||||
run: |
|
run: |
|
||||||
cp lv_conf_template.h configs/ci/perf/lv_conf_perf.h
|
|
||||||
python scripts/generate_lv_conf.py \
|
python scripts/generate_lv_conf.py \
|
||||||
--template lv_conf_template.h \
|
--template lv_conf_template.h \
|
||||||
--config configs/ci/perf/lv_conf_perf.h \
|
--config configs/ci/perf/lv_conf_perf.h \
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ cd ..
|
|||||||
# Generate lv_conf
|
# Generate lv_conf
|
||||||
LV_CONF_PATH=`pwd`/lvgl/configs/ci/docs/lv_conf_docs.h
|
LV_CONF_PATH=`pwd`/lvgl/configs/ci/docs/lv_conf_docs.h
|
||||||
|
|
||||||
cp lvgl/lv_conf_template.h $LV_CONF_PATH
|
|
||||||
python ./lvgl/scripts/generate_lv_conf.py \
|
python ./lvgl/scripts/generate_lv_conf.py \
|
||||||
--template lvgl/lv_conf_template.h \
|
--template lvgl/lv_conf_template.h \
|
||||||
--config $LV_CONF_PATH \
|
--config $LV_CONF_PATH \
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import argparse
|
import argparse
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
DIR_SCRIPTS = os.path.dirname(__file__)
|
DIR_SCRIPTS = os.path.dirname(__file__)
|
||||||
REPO_ROOT = os.path.join(DIR_SCRIPTS, "..")
|
REPO_ROOT = os.path.join(DIR_SCRIPTS, "..")
|
||||||
@@ -48,7 +49,8 @@ def get_args():
|
|||||||
if not os.path.exists(args.template):
|
if not os.path.exists(args.template):
|
||||||
fatal(f"Template file not found at {args.template}")
|
fatal(f"Template file not found at {args.template}")
|
||||||
if not os.path.exists(args.config):
|
if not os.path.exists(args.config):
|
||||||
fatal(f"User config file not found at {args.config}")
|
print(f"{args.config} not found. Generating it")
|
||||||
|
Path(args.config).touch()
|
||||||
if not os.path.exists(args.defaults):
|
if not os.path.exists(args.defaults):
|
||||||
fatal(f"User defaults not found at {args.defaults}")
|
fatal(f"User defaults not found at {args.defaults}")
|
||||||
|
|
||||||
|
|||||||
@@ -162,7 +162,6 @@ def generate_config(config_name: str) -> None:
|
|||||||
|
|
||||||
output_path = os.path.join(build_dir, "lv_conf.h")
|
output_path = os.path.join(build_dir, "lv_conf.h")
|
||||||
generate_script = os.path.join(lvgl_root_dir, "scripts", "generate_lv_conf.py")
|
generate_script = os.path.join(lvgl_root_dir, "scripts", "generate_lv_conf.py")
|
||||||
shutil.copy(template_path, output_path)
|
|
||||||
|
|
||||||
cmd = [
|
cmd = [
|
||||||
sys.executable,
|
sys.executable,
|
||||||
|
|||||||
Reference in New Issue
Block a user