diff --git a/.github/workflows/build_examples_with_cxx_compiler.yml b/.github/workflows/build_examples_with_cxx_compiler.yml index 28fb88652f..f34f82261a 100644 --- a/.github/workflows/build_examples_with_cxx_compiler.yml +++ b/.github/workflows/build_examples_with_cxx_compiler.yml @@ -17,7 +17,6 @@ jobs: - uses: actions/checkout@v5 - name: Generate lv_conf.h run: | - cp lv_conf_template.h lv_conf.h python ./scripts/generate_lv_conf.py \ --template lv_conf_template.h \ --config lv_conf.h \ diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 3824325f5b..baa0ae8475 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -17,7 +17,6 @@ jobs: - uses: actions/checkout@v4 - name: Generate lv_conf.h run: | - cp lv_conf_template.h lv_conf.h python3 ./scripts/generate_lv_conf.py \ --template lv_conf_template.h \ --config lv_conf.h \ diff --git a/.github/workflows/perf_emulation.yml b/.github/workflows/perf_emulation.yml index be59d66222..f0e1ad0722 100644 --- a/.github/workflows/perf_emulation.yml +++ b/.github/workflows/perf_emulation.yml @@ -58,7 +58,6 @@ jobs: fetch-depth: 0 - name: Generate lv_conf.h run: | - cp lv_conf_template.h configs/ci/perf/lv_conf_perf.h python scripts/generate_lv_conf.py \ --template lv_conf_template.h \ --config configs/ci/perf/lv_conf_perf.h \ diff --git a/scripts/build_html_examples.sh b/scripts/build_html_examples.sh index bba1569909..81167a9c41 100755 --- a/scripts/build_html_examples.sh +++ b/scripts/build_html_examples.sh @@ -30,7 +30,6 @@ cd .. # Generate lv_conf 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 \ --template lvgl/lv_conf_template.h \ --config $LV_CONF_PATH \ diff --git a/scripts/generate_lv_conf.py b/scripts/generate_lv_conf.py index 7dc88eda39..ec88fdf4ca 100755 --- a/scripts/generate_lv_conf.py +++ b/scripts/generate_lv_conf.py @@ -3,6 +3,7 @@ import os import re import argparse +from pathlib import Path DIR_SCRIPTS = os.path.dirname(__file__) REPO_ROOT = os.path.join(DIR_SCRIPTS, "..") @@ -48,7 +49,8 @@ def get_args(): if not os.path.exists(args.template): fatal(f"Template file not found at {args.template}") 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): fatal(f"User defaults not found at {args.defaults}") diff --git a/tests/benchmark_emu.py b/tests/benchmark_emu.py index 915f14e516..396ac8ed96 100755 --- a/tests/benchmark_emu.py +++ b/tests/benchmark_emu.py @@ -162,7 +162,6 @@ def generate_config(config_name: str) -> None: output_path = os.path.join(build_dir, "lv_conf.h") generate_script = os.path.join(lvgl_root_dir, "scripts", "generate_lv_conf.py") - shutil.copy(template_path, output_path) cmd = [ sys.executable,