Skip to content

Commit 918326f

Browse files
committed
feat(gen): add lvgl_private.h to the binding
see #6068
1 parent 8aba1e9 commit 918326f

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

gen/gen_mpy.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from itertools import chain
1616
from functools import lru_cache
1717
import json
18+
import os
1819

1920
def memoize(func):
2021
@lru_cache(maxsize=1000000)
@@ -722,6 +723,18 @@ def register_int_ptr_type(convertor, *types):
722723
# Emit Header
723724
#
724725

726+
headers = args.input
727+
for header in headers:
728+
if 'lvgl.h' in header:
729+
path, _ = os.path.split(header)
730+
if path and path != 'lvgl.h':
731+
path = os.path.join(path, 'src', 'lvgl_private.h')
732+
else:
733+
path = 'src/lvgl_private.h'
734+
735+
headers.append(path)
736+
break
737+
725738
print ("""
726739
/*
727740
* Auto-Generated file, DO NOT EDIT!
@@ -760,7 +773,7 @@ def register_int_ptr_type(convertor, *types):
760773
cmd_line=' '.join(argv),
761774
pp_cmd=pp_cmd,
762775
objs=", ".join(['%s(%s)' % (objname, parent_obj_names[objname]) for objname in obj_names]),
763-
lv_headers='\n'.join('#include "%s"' % header for header in args.input)))
776+
lv_headers='\n'.join('#include "%s"' % header for header in headers)))
764777

765778
#
766779
# Enable objects, if supported

0 commit comments

Comments
 (0)