From ff36de9a4782c6c1d8b462cf11b5600ff8889a56 Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Wed, 13 Mar 2024 00:34:27 +0000 Subject: [PATCH] Fix assets in UFBT SDK --- scripts/assets.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/assets.py b/scripts/assets.py index 9c33dac76f..3dcbda4b5e 100755 --- a/scripts/assets.py +++ b/scripts/assets.py @@ -139,9 +139,10 @@ def icons(self): icons = [] paths = [] is_main_assets = self.args.filename == "assets_icons" - symbols = ( - pathlib.Path(__file__).parent / "../targets/f7/api_symbols.csv" - ).read_text() + symbols = pathlib.Path(__file__).parent.parent + if "UFBT_HOME" in os.environ: + symbols /= "sdk_headers/f7_sdk" + symbols = (symbols / "targets/f7/api_symbols.csv").read_text() api_has_icon = lambda name: f"Variable,+,{name},Icon," in symbols # Traverse icons tree, append image data to source file for dirpath, dirnames, filenames in os.walk(self.args.input_directory):