From 3e87fc47a02138b7424f30392495408b57cca6ce Mon Sep 17 00:00:00 2001 From: Dominik Holland Date: Thu, 17 Oct 2019 17:17:56 +0200 Subject: ivigenerator: Move all templates into a separate 'templates' folder Currently all builtin templates are hardcoded in generate.py and the templates are next to the generate.py, including a rather ugly 'template_' prefix in the folder name and yaml file. To make this more clean, all templates are moved into a 'templates' folder and renamed to remove the prefix. The templates are also not hardcoded anymore in generate.py and instead the 'templates' folder is scanned for them. This also makes it possible for the user to install their own templates into the same folder and make them behave like builtin templates. Change-Id: I27d581df8f4850db6918c5b350ce41c4a35175f4 Reviewed-by: Robert Griebl --- mkspecs/features/ivigenerator.prf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/ivigenerator.prf b/mkspecs/features/ivigenerator.prf index 3330fdc..93bce6b 100644 --- a/mkspecs/features/ivigenerator.prf +++ b/mkspecs/features/ivigenerator.prf @@ -98,10 +98,10 @@ qface_sources.target = $$relative_path($$PRI, $$OUT_PWD) qface_sources.commands = $$SLEEP && $$ENV $$system_path($$IVI_GENERATOR) $$IVI_GENERATOR_OPTIONS $$system_quote($$system_path($$QFACE_ABS_PWD/$${QFACE_FILE})) $$system_quote($$system_path($$QFACE_OUTPUT_DIR)) qface_sources.depends = $$IVI_GENERATOR_PATH/generate.py qface_sources.depends += $$QFACE_ABS_PWD/$${QFACE_FILE} -qface_sources.depends += $$files($$IVI_GENERATOR_PATH/common/*) +qface_sources.depends += $$files($$IVI_GENERATOR_PATH/templates/common/*) # Add all templates of the generator format as dependency -QFACE_TEMPLATE_PWD = $$IVI_GENERATOR_PATH/templates_$${QFACE_FORMAT} +QFACE_TEMPLATE_PWD = $$IVI_GENERATOR_PATH/templates/$${QFACE_FORMAT} exists($$QFACE_TEMPLATE_PWD) { qface_sources.depends += $$files($${QFACE_TEMPLATE_PWD}/*) } else: exists($${QFACE_FORMAT}) { -- cgit v1.2.1